My friend made a spell which is based off Shadow Strike. It's called Holy Defender
He wants 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.
He tried (first time) working with Game Cache, but he couldn't figure it out.. Any tips?
Here's hes 2 triggers:
Holy Prevention
He wants 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.
He tried (first time) working with Game Cache, but he couldn't figure it out.. Any tips?
Here's hes 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>
- 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