• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Moonfire

Status
Not open for further replies.
Level 14
Joined
Jul 26, 2008
Messages
1,009
So I have this spell called moonfire. Here's it's description:

Call down a lucent beam of moonlight upon foe and friend alike. Should they be your ally, they will recieve a random amount of health and magical shielding. Foes, on the other hand, take damage and are blinded.

Allies recieve 60-120 health and are shield from 150 magical damage. Foes, on the other hand, take 50-100 damage and are blinded.

  • MoonfireTrig Copy
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Moonfire
    • Actions
      • Custom script: local integer i
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Target unit of ability being cast) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
          • Then - Actions
            • Custom script: set i = GetRandomInt(( 50 * GetUnitAbilityLevelSwapped('TotM', GetTriggerUnit()) ), ( 100 * GetUnitAbilityLevelSwapped('TotM', GetTriggerUnit()) ))
            • Unit - Cause (Triggering unit) to damage (Targeted unit), dealing 1.00 damage of attack type Magic and damage type Divine
            • Floating Text - Create floating text that reads (String((i))) above (Target unit of ability being cast) with Z offset 0.00, using font size 16.00, color (0.00%, 0.75%, 1.00%), and 0.00% transparency
            • Unit - Create 1 caster for (Owner of (Triggering unit)) at (Target point of ability being cast) facing (Position of (Casting unit))
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Unit - Add Blindness of the Moon to (Last created unit)
            • Unit - Set level of Blindness of the Moon for (Last created unit) to (Level of Moonfire for (Triggering unit))
            • Unit - Order (Last created unit) to Undead Banshee - Curse (Target unit of ability being cast)
          • Else - Actions
            • Custom script: set i = GetRandomInt(( 60 * GetUnitAbilityLevelSwapped('TotM', GetTriggerUnit()) ), ( 120 * GetUnitAbilityLevelSwapped('TotM', GetTriggerUnit()) ))
            • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 1.00)
            • Floating Text - Create floating text that reads (String((i))) above (Target unit of ability being cast) with Z offset 0.00, using font size 16.00, color (0.00%, 0.75%, 1.00%), and 0.00% transparency
            • Unit - Create 1 caster for (Owner of (Triggering unit)) at (Target point of ability being cast) facing (Position of (Casting unit))
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Unit - Add Shield of the Moon (Magic Resistance) to (Last created unit)
            • Unit - Set level of Shield of the Moon (Magic Resistance) for (Last created unit) to (Level of Moonfire for (Triggering unit))
            • Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Target unit of ability being cast)
None of it is going off. :\ None. I imagine it has to do with the IF statement.

PS. Bonus to anyone who can give me the formula to make it go 60:120:240-120:240:480 and 50:100:200-100:200:400 in damage.
 
Status
Not open for further replies.
Top