- Joined
- May 13, 2023
- Messages
- 72
Hello, I have this simple spell that gives the caster bonus attack damage based on the caster's lost hitpoints. The trigger works fine but the problem starts when more than 1 unit uses the ability simultaneously. The unit that casts first get's their damage reverted back but the following units don't. Would appreciate any help.
-
Berserk Init
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Berserk
-
-
Actions
-
Set BerserkCaster = (Triggering unit)
-
Set BerserkInitDamage = (Base Damage of BerserkCaster for weapon index 1)
-
Set BerserkBonusDamage = (((Max life of BerserkCaster) - (Life of BerserkCaster)) x 0.08)
-
Countdown Timer - Start BerserkTimer as a One-shot timer that will expire in 15.00 seconds
-
Unit - Set Base Damage of BerserkCaster to ((Base Damage of BerserkCaster for weapon index 1) + (Integer(BerserkBonusDamage))) for weapon index: 1
-
Trigger - Turn on Berserk End <gen>
-
-
-
Berserk End
-
Events
-
Time - BerserkTimer expires
-
-
Conditions
-
Actions
-
Unit - Set Base Damage of BerserkCaster to BerserkInitDamage for weapon index: 1
-
Trigger - Turn off (This trigger)
-
-