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

Seemingly Simple Spell

Status
Not open for further replies.
Level 2
Joined
May 21, 2005
Messages
7
I asked about this earlier, but the answer I got, I couldn't make sence out of. (Sorry whoever answered it)

So I'm wondering if anyone could make me either a JASS script or a Trigger that I can edit to incorperate any spell I want to use it with.

The spell should go like this:
1 Character Casts Spell
2 Game Calculates How Much Mana Character Has
3 If the Mana = A Certain Number, Set the Damage to do ##% of the Actuall Damage Set in the Spell
4 Then it Hits the Character

an example of #3 is

Mana: 300 = 150% Damage
Mana: 3000 = 1500% Damage

Stuff like that.

Thanks to Anyone Who Can Help,
Nubi
 
Level 4
Joined
Aug 6, 2005
Messages
64
You dont need a JASS script to do that simple of a trigger.

Events:
Unit - A unit begins casting an ability
Conditions:
(Ability being cast) equal to "name of the ability you want to use"
Actions:
Unit - Cause (casting unit) to damage (target of ability being cast), dealing ((Mana of (casting unit)/ 2.00) damage of attack type "whatever you want" and damage type "whatever you want"

That should work, just make sure you use Mana and not Max Mana.

This is for if you meant 300 = 150 damage not 150% I have no clue as to what you mean by if you actually meant percent. Do you mean you deal 150% of your normal damage?
 
Level 3
Joined
Mar 2, 2006
Messages
40
Nubifier said:
3 If the Mana = A Certain Number, Set the Damage to do ##% of the Actuall Damage Set in the Spell
the way I understand it, you want the trigger to set the damage in the ability, which isn't possible. You have to make the ability only for eye candy, the actual damage is done by the trigger. Here's an example :
Code:
Mana Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (whatever you called the ability)
    Actions
        Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (100.00 x (1.00 + ((Mana of (Casting unit)) / 600.00))) damage of attack type Magic and damage type Magic
This will deal 100 damage + 50% of it for every 300 points of mana. If this is a hero ability, maked it deal :
Code:
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (100.00 x (1.00 + ((Mana of (Casting unit)) / 600.00))) damage of attack type Magic and damage type Magic
Change values as nescesary to make it deal as much damage as you want it to.
 
Status
Not open for further replies.
Top