View Single Post
Old 10-25-2009, 01:20 AM   #22
requires vJass
grim001's Avatar

Code Moderator
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001

Originally Posted by Anitarf
Actually tracking what the unit's life should be and whether the damage will kill it would be a lot more complicated and less robust. It probably is technically possible, but I really don't want to go down that road.
Well, I don't blame you, I tried to do that with DamageMod and it was extremely difficult, and I never quite got it working perfectly.

Originally Posted by Anitarf
You could still easily write a wrapper library that would provide a modifyIncomingDamage module and a modifyOutgoingDamage module while using DamageModifiers internally.
It is not quite possible. It's because DamageModifier structs are analogous to a specific-unit-event, whereas the function interface setup is analogous to an any-unit-event. It would require vex to add onCreate, allow onCreate within modules, and allow onDestroy within modules. It would also require over twice as much code and an extra TriggerEvaluate per event.

Like I said, I can't force you to change it, but I don't see any situation where it is more elegant, I only see lots of situations where it is more of a hassle, and usually takes twice as much typing.

Anyway, let us know once you've made all the changes you want to make.
grim001 is offline   Reply With Quote