• 🏆 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!

Help me!

Status
Not open for further replies.
Level 25
Joined
Sep 26, 2009
Messages
2,378
You can't do it via object editor, you have to trigger the whole damage (or perhaps the whole spell).
Afaik you'll also have to keep track of caster's damage - which is quite complicated since he can be affected by many beneficial buffs that increase damage and you need to know how they stack with each other.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Well, you can do that probably but then your spells won't deal much damage. If you look ingame at heroes attribute they range between cca 10 to 40 depending on level, and some other things like items, etc.
If you deal 7% out of 40, you'll deal about 2.8 damage :D

If you want your spells to be simple, you may want to forget the idea about spells dealing % of unit's damage and instead make them deal % of attribute (for example 120% of main attribute, etc.)
If you still want your spells to deal a percentage of unit's damage, then you will need to make your own database (via variable or hashtable in trigger editor) and save into it unit-type's Combat - Attack Damage, Combat - Number of Dices, Combat - Sides per Dice and unit's main attribute (as only main attribute increases damage).
You will also need to keep track of what buffs and debuffs the unit has, you will need to know how they stack one with another. You will need to keep track of items that increase unit's damage.
You will also need to keep track of techs that upgrade unit's damage (like basic units have for example Steel Forged Swords upgrade, etc.) - of course that aplies only if the unit uses such upgrades.

The buff/debuff part is probably the hardest one, as you need to always check your units whenever any unit casts spell that applies damage increasing/decreasing buff/debuff and then through periodic trigger you will need to pick all affected units and check each and every buff and debuff that increases/decreases damage.
Or make/find a custom buff system and set it up so it efficiently keeps track of (de)buffs on each unit.
 
Status
Not open for further replies.
Top