• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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