HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Damage Bonus

06-05-2006, 10:33 AM#1
StockBreak
Is there a way to detect a unit's damage bonus (i mean pure damage, not attributes)? Thanks

P.S: I don't use WEU.
06-05-2006, 01:36 PM#2
TaintedReality
So you want to find +damage from items? You could just check for all +damage item abilities on the unit, and add all of them up. You'd have to check for all possible +damage abilities they might have, but it wouldn't be too bad. If that's not what you want please clarify.
06-05-2006, 03:09 PM#3
shadow1500
You need to be able to get the damage each item gives, then u can just go through all items in inventory and add all damage.
Or you can trigger the damage the item gives.
06-06-2006, 10:42 AM#4
StockBreak
Thank you very much for help, I'll follow your advices. I hoped there was an easier way, but...
06-07-2006, 01:20 AM#5
sheep.spirit
How bout using the bonus mod weddaar made?

Collapse JASS:
function getBonus takes unit who,integer t returns integer

looks nice to me and is simpler
06-07-2006, 01:25 AM#6
TaintedReality
I believe that would only add up default item abilities, and bonuses added using his mod. So if you use purely his mod, then yes it would be easier. But I think Stock probably has most or all of his items made and wants to find their damage. Dunno though, depends on what he's doing.
06-07-2006, 06:04 AM#7
Blade.dk
Yes, BonusMod only returns bonuses it has added itself, for obvious reasons.

But you can just drop everything about bonuses on items, and when units pick up items apply the bonuses with BonusMod.