Users browsing this thread: 1 Guest(s)
DoomGaze

#4
Posts: 52
Threads: 5
Thanks Received: 24
Thanks Given: 0
Joined: Jun 2010
Reputation: 6
Status
None
No no no, as I said:
Quote:only the last one would write its HP back
In your scenario, for the second encounter they would only be missing 1000 health.
Put another way: only damage dealt to the last enemy will be remembered. Any damage dealt to any other enemies is completely disregarded.
The last enemy being the one in the highest numbered enemy slot.

Now that I think about it, it probably wouldn't be too hard to code it to look at all the enemies at the end of battle, tally all the damage taken, and put the final value into the HP variable. The only problem would be if you do enough damage to have killed one of them, but have done the damage spread between them. You'd wind up with 0 stored for their HP after the battle had ended.
What you'd need to do is constantly update all of their HPs anytime any of them took damage, which could be rather troublesome when dealing with multi-targeting spells.
Quote  



Messages In This Thread
DoomGaze - by Fire Storm - 09-04-2012, 04:40 AM
RE: DoomGaze - by Drakkhen - 09-04-2012, 07:53 AM
RE: DoomGaze - by Fire Storm - 09-04-2012, 08:05 AM
RE: DoomGaze - by Drakkhen - 09-04-2012, 09:56 AM
RE: DoomGaze - by CrumpledMedal - 09-04-2012, 12:13 PM
RE: DoomGaze - by Drakkhen - 09-04-2012, 02:42 PM
RE: DoomGaze - by Fire Storm - 09-04-2012, 03:15 PM
RE: DoomGaze - by Drakkhen - 09-04-2012, 10:20 PM
RE: DoomGaze - by Fire Storm - 09-04-2012, 10:23 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite