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

RegenerateMana spell help

Status
Not open for further replies.
Level 3
Joined
Aug 15, 2007
Messages
37
I'm looking for some suggestions on the best way to implement this autocasting spell I would like to make.
The spell will be called Regenerate_Mana, and it will be used by a Mana Well, which is a structure that stores mana of a certain type (white,black,red,etc) for a player. When a player uses a spell or anything that costs mana, it will be taken from the Mana Well.

Here are the properties of the spell:
1)When manaually cast, it will auto-target itself, increase its mana by 1, and decrease players gold by 1.
2)When autocast (rclicked), it will continually cast until the player has no gold, or the spell is rclicked again. (cooldown = 20 secs)
3)If a player has no gold, it disables the ability.
4)If the wells mana is at max, it disables the ability.

Other things will take place as well, but that is the basics.
What type of unit would you base the Mana Well off of? What spell would you use as the base?
Or just any suggestions as how to approach this.
Thanks.
 
Level 4
Joined
Jul 12, 2007
Messages
116
  • Your spell
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Owner of (Casting unit)) Current gold) Greater than or equal to 20
          • (Ability being cast) Equal to Spirit Touch
    • Actions
      • Player - Add -20 to (Owner of (Casting unit)) Current gold

  • Your spell part 2
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Spirit Touch
          • Or - Any (Conditions) are true
            • Conditions
              • ((Owner of (Casting unit)) Current gold) Less than 20
              • (Integer((Percentage mana of (Casting unit)))) Equal to 100
    • Actions
      • Unit - Order (Casting unit) to Stop

and set the target allowed for Spirit Touch to self. :thumbs_up:
 
Level 3
Joined
Aug 15, 2007
Messages
37
One thing I forgot to note was that I changed "gold" in the game interface to read as "Magic". So, when my worker mines, he adds to magic, and the wells use that magic and convert it into the desired mana type. So, the first trigger won't work because the spell shouldn't add to gold.
Keep the suggestions coming, though. Thanks.
 
Level 3
Joined
Aug 15, 2007
Messages
37
Sorry, I didn't mean for it sound like I changed gold to magic, literally. I just wanted to state that I changed the text to read as magic just so it would make more sense about what the spell was doing. But still, the spell isn't supposed to increase gold (magic), It is still mined from a gold mine (Magic Mine).

Everything works fine when you manually cast it, but it will not autocast. I don't have a clue why.

edit: I'm an idiot. I just noticed that the action added (-)20. Sorry for the confusion.
Still can't get it to autocast though.
 
Last edited:
Level 3
Joined
Aug 15, 2007
Messages
37
Bloodlust doesn't work either, but the heal ability sounds promising.
How would I go about putting the negative regen aura on the unit though?
 
Level 3
Joined
Aug 15, 2007
Messages
37
I can't understand this for the life of me!! There must be a way to get a unit to autocast a spell targeting itself. I've tried everything.
The heal thing almost works... It doesn't cast the spell automatically, but once you cast it manually it will. Why?
 
Status
Not open for further replies.
Top