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

Ability's damage increase by stat.

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,994
Hey guys. I got a little problem here. I've seen pretty much maps where a hero has an ability that says: "Damage is increased by 125% of your strength". That's an example, it can be Agility, etc..

:fp:Note: I bet it's a trigger and my skills in triggers are not the best. (Yes I can do triggers, just not good ones)

So thanks a lot. Help will be apreciated! :grin:
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,994
It's triggered, tell me exactly what ability you want and i'll design it in GUI for you when I get home tonight.

Hmm.. I wanted to see a sample and by this learn to do it myself. And btw is GUI = Jass thingy? Cause I have no idea how to work with it. I have 9 heroes on my map and I wanted to implement that type of spells to 2 or 3 of them. But ok. Let's say that I want to do that on the Storm Bolt ability.

Note: Don't even try to spent of your time if I won't be able to edit the spell after that. I mean it's name/description etc...
 
Level 15
Joined
Oct 16, 2010
Messages
942
Here is an example ability I did really quick for you based off Storm Bolt. Whenever a unit casts Storm Bolt it will deal (40 + (20 * level of storm bolt) + 25% of strength) to the target.

  • Storm Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • -------- Set initial ability stats --------
      • Set Base_Damage = 40.00
      • Set PerLevel_Damage = 20.00
      • Set Strength_Gain = 0.25
      • -------- Calculate damage --------
      • Set Temp_Damage = (Base_Damage + (PerLevel_Damage x (Real((Level of Storm Bolt for (Triggering unit))))))
      • Set Temp_Damage = (Temp_Damage + (Strength_Gain x (Real((Strength of (Triggering unit) (Include bonuses))))))
      • -------- Deal damage --------
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Temp_Damage damage of attack type Spells and damage type Normal
 
Status
Not open for further replies.
Top