I made a spell which is based off Shadow Strike. It's called Holy Defender
I want it to work that when the Hero has used the spell on an enemy, he gets a buff (the buff part works, the unit gets the buff) but I want it to work that when the enemy tries to cast a spell while the buff is active, he takes damage.
Tried (first time) working with Game Cache, but I couldn't figure it out.. Any tips?
Here's my 2 triggers:
Holy Prevention
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Holy Prevention
Actions
Game Cache - Store (Casting unit) as HolyDef of StoredHeroes in HolyDefender
Trigger - Turn on Holy Prevention 2 <gen>
Holy Prevention 2
Events
Unit - A unit Starts the effect of an ability
Conditions
((Casting unit) has buff Holy Prevention ) Equal to True
Actions
Set HolyDefender = (Last created game cache)
Unit Group - Pick every unit in (Units of type (Unit-type((Load HolyDef of StoredHeroes from (Last created game cache))))) and do (Actions)
Loop - Actions
Unit - Cause (Picked unit) to damage (Casting unit), dealing 500.00 damage of attack type Spells and damage type Normal
I've searched the forum but no results...
I want it to work that when the Hero has used the spell on an enemy, he gets a buff (the buff part works, the unit gets the buff) but I want it to work that when the enemy tries to cast a spell while the buff is active, he takes damage.
Tried (first time) working with Game Cache, but I couldn't figure it out.. Any tips?
Here's my 2 triggers:
Holy Prevention
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Holy Prevention
Actions
Game Cache - Store (Casting unit) as HolyDef of StoredHeroes in HolyDefender
Trigger - Turn on Holy Prevention 2 <gen>
Holy Prevention 2
Events
Unit - A unit Starts the effect of an ability
Conditions
((Casting unit) has buff Holy Prevention ) Equal to True
Actions
Set HolyDefender = (Last created game cache)
Unit Group - Pick every unit in (Units of type (Unit-type((Load HolyDef of StoredHeroes from (Last created game cache))))) and do (Actions)
Loop - Actions
Unit - Cause (Picked unit) to damage (Casting unit), dealing 500.00 damage of attack type Spells and damage type Normal
I've searched the forum but no results...
Last edited: