Hi guys
>i was fooling around with the italic lines, i cant figure out how to do this:
It needs to deal damage based on the hero’s current mana, but with a max.
25% mana reserved (max damage: 75% of hero’s current mana)
Like: Hero has 1000 mana, uses ability on level 1: 750 damage, 750 mana used.
Code:
thunderbolt
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Thunderbolt
Actions
Set TriggerUnit = (Triggering unit)
Set TargetUnit = (Target unit of ability being cast)
Sound - Play LightningShieldTarget <gen> at 100.00% volume, located at (Position of (Casting unit)) with Z offset 0.00
Wait 0.20 seconds
[I]Unit - Cause TriggerUnit to damage TargetUnit, dealing ((Mana of TriggerUnit) - (Max(800.00, (Min(150.00, 150.00))))) damage of attack type Spells and damage type Normal
Unit - Set mana of TriggerUnit to ((Mana of TriggerUnit) - (Max(800.00, (Min(150.00, 150.00)))))[/I]
Special Effect - Create a special effect attached to the origin of TargetUnit using war3mapImported\LightStrikeArray.mdx
Sound - Play LightningBolt <gen> at 100.00% volume, located at (Position of TargetUnit) with Z offset 0.00
Wait 0.80 seconds
Special Effect - Destroy (Last created special effect)
>i was fooling around with the italic lines, i cant figure out how to do this:
It needs to deal damage based on the hero’s current mana, but with a max.
25% mana reserved (max damage: 75% of hero’s current mana)
Like: Hero has 1000 mana, uses ability on level 1: 750 damage, 750 mana used.