• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Is this ability idea possible?

Status
Not open for further replies.
Level 7
Joined
Jul 1, 2008
Messages
1,025
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