Skip to content
User Avatar
#4083
Auto-translated
Hello! Has anyone created a code for adding an extra buff to buff-granting objects? For example, I want to give an object, like the "Tattered Flag" (which provides bonuses to morale and luck for one battle), an additional bonus, say, a speed buff. Naturally, the buff would work the same way as the original, i.e., through GiveHeroBattleBonus(). It would be applied to everyone who touches the object and would not be reapplied until the hero fights someone. Currently, I'm thinking of writing a code that would add everyone who touches the object to a list and assign them a tag like allow_touch = 0 (if 0, then the buff will not be applied upon repeated contact), and then in the function from COMBAT_RESULTS_TRIGGER, track who completed the battle, and if it's one of our visitors, give them permission (change 0 to 1) to be re-buffed by the flag. But maybe there's a simpler way?

Всякое/карты:

Добавление недостающей музыки гномам