| 07-10-2006, 07:11 AM | #1 |
Suppose I want to cast a spell which deals damage that is equal to a percentage of my attack damage, how would I be able to achieve this? This has to take +dmg gears, bonus primary stats and such into account. Thanks for everyone's help! |
| 07-10-2006, 07:18 AM | #2 |
A) Give up / compromise <recommended> B) List everything that affects damage <nightmare> C) Reverse engineer warcraft and write a native that uses the built in damage calculation routines <not a nightmare, but precludes bnet distribution of map> |
| 07-10-2006, 09:16 AM | #3 |
you forgot D) Record damage of attacks and use the average of the last few attacks as your value. Can fail if the hero uses the skill right after acquireing a super item, without doing any attacks first, or if used right after the hero got 3 criticals in a row or did a few attacks against a unit with hardened skin... so, yeah, not a good option either. Vote for A) |
| 07-10-2006, 10:33 AM | #4 |
Aye, A is your best bet. Use something WCIII can actually count. |
| 07-10-2006, 10:52 AM | #5 |
For a hero it's actually not that hard, you just have to be reasonable and not include +damage from items. Set the hero's primary attribute to 0 and get its base dice. (The base damage, usually like 5-9 or something like that) Take the average of the upper and lower bounds and store it to some variable. Now you'll need to hardcode what heros have what primary attributes into a function somewhere and then add to your damage total their primary attribute value including bonuses. It's actually incredibly accurate. That'll work up until you get to items, which if you also want items then compromise/give up sounds wonderful. |
