- Joined
- Mar 24, 2020
- Messages
- 80
Hi guys,
I'm trying to create a spell that reduces an enemy units resistance to spells. I've created an ability that uses an item ability (runed bracers) and made it -1.000 to double the damage from spells.
I've created the below trigger, but am I right to think you shouldn't put 'Waits' in loops?
Is there a better way to do this?
Thanks!
I'm trying to create a spell that reduces an enemy units resistance to spells. I've created an ability that uses an item ability (runed bracers) and made it -1.000 to double the damage from spells.
I've created the below trigger, but am I right to think you shouldn't put 'Waits' in loops?
Is there a better way to do this?
-
Magic Resist Reduction
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Priestess - [|cffffcc00Silence|r]
-
-
Actions
-
Set VariableSet AttackPoint = (Target point of ability being cast)
-
Set VariableSet SilenceGroup[(Player number of (Owner of (Triggering unit)))] = (Units within 300.00 of AttackPoint matching ((((Triggering unit) is A structure) Equal to False) and (((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True)).)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in SilenceGroup[(Player number of (Owner of (Triggering unit)))] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A Hero) Equal to True
-
-
Then - Actions
-
Unit - Add Spell Damage Weakness (-100%) to (Picked unit)
-
Wait 6.00 game-time seconds
-
Unit - Remove Spell Damage Weakness (-100%) from (Picked unit)
-
-
Else - Actions
-
Unit - Add Spell Damage Weakness (-100%) to (Picked unit)
-
Wait 10.00 game-time seconds
-
Unit - Remove Spell Damage Weakness (-100%) from (Picked unit)
-
-
-
-
-
Custom script: call RemoveLocation(udg_AttackPoint)
-
-
Thanks!
Last edited: