- Joined
- Jun 20, 2017
- Messages
- 380
I have 3 different tiers of a tower with 3 feedback abilities, each one can burn a different amount of mana!
This tower's attacks destroy 200 mana per hit against any hero.
This tower's attacks destroy 300 mana per hit against any hero.
This tower's attacks destroy 400 mana per hit against any hero.
based on this
[General] - Lightning Attack & Feedback(mana break)
I ran into some problems!
It works and suddenly it doesn't work!
If a target reaches 0 mana, it will not work on a new target!
If the target is a structure/unit, it can still burn mana!
This tower's attacks destroy 200 mana per hit against any hero.
This tower's attacks destroy 300 mana per hit against any hero.
This tower's attacks destroy 400 mana per hit against any hero.
based on this
[General] - Lightning Attack & Feedback(mana break)
I ran into some problems!
It works and suddenly it doesn't work!
If a target reaches 0 mana, it will not work on a new target!
If the target is a structure/unit, it can still burn mana!
-
Feedback
-
Events
- Unit - A unit Takes damage
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Level of Feedback [Custom] Energy Tower / Storm Hammers for (Damage source)) Greater than 0
- (Level of Feedback [Custom] Energy Tower (Super) / Storm Hammers for (Damage source)) Greater than 0
- (Level of Feedback [Custom] Energy Tower (Ultra) / Storm Hammers for (Damage source)) Greater than 0
-
Conditions
- (Damage From Normal Attack) Equal to True
- ((Damage Target) belongs to an enemy of (Owner of (Damage source)).) Equal to True
-
Or - Any (Conditions) are true
-
Actions
- -------- Set Target. --------
- Set VariableSet Feedback_Target = (Damage Target)
- -------- --------
- -------- Set Source. --------
- Set VariableSet Feedback_Source = (Damage source)
- -------- --------
- Set VariableSet Feedback_SourcePlayer = (Owner of Feedback_Source)
- -------- --------
- -------- Setup Special Effect. --------
- Special Effect - Create a special effect attached to the origin of Feedback_Target using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
- Set VariableSet Feedback_SpecialEffect = (Last created special effect)
- Special Effect - Destroy Feedback_SpecialEffect
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Max mana of Feedback_Target) Greater than 0.00
-
Then - Actions
- -------- Get the amount of mana that should be burned. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Feedback_Target is alive) Equal to True
- (Feedback_Target is A Hero) Equal to True
- (Feedback_Target is A structure) Equal to False
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Feedback_Source) Equal to Energy Tower
-
Then - Actions
- Set VariableSet Feedback_Amount2[(Player number of Feedback_SourcePlayer)] = 200.00
- Set VariableSet Feedback_Multiplier = 1.00
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Feedback_Source) Equal to Energy Tower (Super)
-
Then - Actions
- Set VariableSet Feedback_Amount2[(Player number of Feedback_SourcePlayer)] = 300.00
- Set VariableSet Feedback_Multiplier = 1.00
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Feedback_Source) Equal to Energy Tower (Ultra)
-
Then - Actions
- Set VariableSet Feedback_Amount2[(Player number of Feedback_SourcePlayer)] = 400.00
- Set VariableSet Feedback_Multiplier = 1.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- -------- --------
- -------- Calculate the total mana burned. --------
- Set VariableSet Feedback_ManaLost = ((Mana of Feedback_Target) - Feedback_Amount2[(Player number of Feedback_SourcePlayer)])
- -------- --------
- -------- If the unit had less mana than the amount being burned then account for this. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Feedback_ManaLost Less than 0.00
-
Then - Actions
- Set VariableSet Feedback_Amount2[(Player number of Feedback_SourcePlayer)] = (Feedback_Amount2[(Player number of Feedback_SourcePlayer)] + Feedback_ManaLost)
- Else - Actions
-
If - Conditions
- -------- --------
- -------- Subtract the mana from the target. --------
- Unit - Set mana of Feedback_Target to ((Mana of Feedback_Target) - Feedback_Amount2[(Player number of (Owner of Feedback_Source))])
- -------- --------
- -------- Deal the damage. The "Feedback_Multiplier" is the Ratio that can be found on the ability. --------
- Unit - Cause Feedback_Source to damage Feedback_Target, dealing (Feedback_Amount2[(Player number of Feedback_SourcePlayer)] x Feedback_Multiplier) damage of attack type Spells and damage type Normal
- Else - Actions
-
If - Conditions
-
Events