• 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.

Is this ability idea possible?

Status
Not open for further replies.
Level 7
Joined
Jul 1, 2008
Messages
1,024
I'm trying to create a spell where upon activation has a %50 chance the caster will take HP damage and a %50 chance the caster gains some mana points, so if he wants more mana he has to risk loosing HP, like a gamble.

Anyone have any ideas for implementing this?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin

Actually it's very simple, so I just give you the basic structure of it:

  • TestTrigger3100
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 50
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 50.00)
        • Else - Actions
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 50.00)
Greetings
~ The Bomb King > Dr. Boom
 
Status
Not open for further replies.
Top