Test
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to (==) [B]Animate Dead[/B]
Actions
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Real((Random integer number between [B]43[/B] and [B]50[/B]))) x [I]2.00[/I]) damage of attack type Spells and damage type Normal
I don't want a trigger dealing 43-50 damage x2, my hero can level up -_-
Spell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Stormhammer
Actions
Game Cache - Store (Triggering unit) as Hero of Hero in (Last created game cache)
Game Cache - Save (Last created game cache)
Game Cache - Restore Hero of Hero from (Last created game cache) for (Owner of (Triggering unit)) at (Center of Rect 000 <gen>) facing 0.00
Unit - Create 1 Dummy for Neutral Hostile at (Center of Rect 000 <gen>) facing Default building facing (270.0) degrees
Unit - Order (Last restored unit) to Attack (Last created unit)
Trigger - Add to DamageDetect <gen> the event (Unit - (Last created unit) Takes damage)
Set Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Set Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
Set Dummy[(Player number of (Owner of (Triggering unit)))] = (Last restored unit)
DamageDetect
Events
Conditions
Or - Any (Conditions) are true
Conditions
(Damage source) Equal to Dummy[1]
(Damage source) Equal to Dummy[2]
(Damage source) Equal to Dummy[3]
(Damage source) Equal to Dummy[4]
(Damage source) Equal to Dummy[5]
(Damage source) Equal to Dummy[6]
(Damage source) Equal to Dummy[7]
(Damage source) Equal to Dummy[8]
(Damage source) Equal to Dummy[9]
(Damage source) Equal to Dummy[10]
(Damage source) Equal to Dummy[11]
(Damage source) Equal to Dummy[12]
Actions
Unit - Cause Caster[(Player number of (Owner of (Damage source)))] to damage Target[(Player number of (Owner of (Damage source)))], dealing ((Damage taken) x 2.00) damage of attack type Spells and damage type Normal
Unit - Remove (Damage source) from the game
Unit - Remove (Triggering unit) from the game