Pharaoh_
The epic journey will soon begin... Prepare!
- Reaction score
- 136
I have a buffer, who is supposed to buff you for 50 gold each buff. Since the buffs are actual abilities, i triggered it, so that it consumes (Current gold of (Owner of (Target unit of ability being cast) - 50)), whenever the buffer casts an ability for the target unit.
There are 4 buffs on this buffer.
The 2 buffs are standard, out of the Object Editor. The rest 2 are fake ones (based on abilities that give buff), meaning trigger-involved, such as attribute bonus and magic resistance bonus. Now, if a Player has Less than 50 Gold, the buffer is stopped, will not cast the spell and the gold of the Player will not get lost of course. What it is done instead in the map, is the buffer stopping, but still consuming that 50 gold, because it is considered as it is casting the ability. How will i make it, so that it doesn't absorb gold out of a Player's pool and still NOT turn off the trigger (because it would require turning off the trigger, which is what calls gold absorption)?
Another issue:Those 4 buffs; there is another one, called Buff Remover. It is supposed to check how many and what type of buffs the unit has that refer to the buffer's buffs. So, if a Player casts this Buff Remover, all buffs that belong to the buffer, no matter how many they are (even if they are 4/3/2/1), they will ALL be gone away. I can't seem to figure it out though: how am i supposed to do this?
I guess it has to do with "Count buffs of type" or store them in a variable, but how can i know what type of buff each is (magical/ physical), when 2 of them are fake buffs and refer to triggers? Like i said, one gives magic resistance through a new ability added and the other custom buff refers to attribute bonuses. What type of buffs are they supposed to be? The other standard are based off Bloodlust and Inner Fire. What are they too? How will i avoid removing positive buffs that do not belong to the buffers' buffs?
+rep to the answers. Thank you. It's not only for my current project, but i would like to know what's wrong, damn.
There are 4 buffs on this buffer.
The 2 buffs are standard, out of the Object Editor. The rest 2 are fake ones (based on abilities that give buff), meaning trigger-involved, such as attribute bonus and magic resistance bonus. Now, if a Player has Less than 50 Gold, the buffer is stopped, will not cast the spell and the gold of the Player will not get lost of course. What it is done instead in the map, is the buffer stopping, but still consuming that 50 gold, because it is considered as it is casting the ability. How will i make it, so that it doesn't absorb gold out of a Player's pool and still NOT turn off the trigger (because it would require turning off the trigger, which is what calls gold absorption)?
Another issue:Those 4 buffs; there is another one, called Buff Remover. It is supposed to check how many and what type of buffs the unit has that refer to the buffer's buffs. So, if a Player casts this Buff Remover, all buffs that belong to the buffer, no matter how many they are (even if they are 4/3/2/1), they will ALL be gone away. I can't seem to figure it out though: how am i supposed to do this?
I guess it has to do with "Count buffs of type" or store them in a variable, but how can i know what type of buff each is (magical/ physical), when 2 of them are fake buffs and refer to triggers? Like i said, one gives magic resistance through a new ability added and the other custom buff refers to attribute bonuses. What type of buffs are they supposed to be? The other standard are based off Bloodlust and Inner Fire. What are they too? How will i avoid removing positive buffs that do not belong to the buffers' buffs?
+rep to the answers. Thank you. It's not only for my current project, but i would like to know what's wrong, damn.