Users browsing this thread: 2 Guest(s)
HP Script (Zeemis)

#23
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
I don't understand why you use the "if monster is in slot..." conditional for this purpose. It seems unnecessary.

This is the variation that I used for Brave New World:

Quote:FC 06 36 50 ; If target self has less or equal than 10240 HP
F5 00 00 01 ; Monsters #1 , if hidden/dead, brought in with their HP restored, suddently
F9 00 00 00 ; VAR000 toggle bit: 0
F8 01 81 __ ; 1 added to VAR001
FC 0D 01 02 ; If variable VAR001 is greater than or equal to 2
FB 0B 07 __ ; Monster gains hidden status: Death
F5 0C 01 FF ; Monsters #1, #2, #3, #4, #5, #6 are killed, dies like a boss
FE __ __ __ ; End If and reset targeting

I use the HP conditional rather than checking for death as a safeguard, since bosses are vulnerable to seizure in our mod and seizure/poison damage will not check the reactive portion of the battle script. Further, it does not appear that desperation attacks (which show up more commonly in my mod) do, either.

Toggling bit 0 on VAR000 is optional, as it simply allows the boss's opening attack to be used again. To the astute player, this will signal the beginning of a new round (as several of my bosses change scripts on subsequent "lives"). Otherwise, it's just an opportunity to add a bit of variety with an uncommon attack.

Further, the forced setting of the "death" status is optional. This is done because enemies force-killed through the "dies like a boss" opcode will not leave GP, experience, or items. As with the original game, none of my bosses leave gold or experience to avoid headaches in this department. However, several of my bosses drop items, thus necessitating this.

The nested conditional wherein it checks to see if the boss is out of lives functions a bit oddly. First, it sees VAR001 as it was before the attack occurred (in other words, it doesn't notice the 1 that's added to VAR001 just before the check occurs), so the boss in this script actually has a total of *three* lives. It took me awhile to wrap my head around that one.

Secondly, I learned (the hard way, of course) that a single FE will *not* close out multiple conditionals. What this means is that every time this conditional is checked, it will keep going past that FE and through the rest of the reactive portion of the script. In this particular case, it's desired behavior, as I'd rather not a boss's normal reactive behavior be interrupted by its HP reaching a certain threshold (even though I initially coded it like this to save space). However, I actively avoid using nested conditionals anywhere else in my scripts.
Quote  



Messages In This Thread
HP Script (Zeemis) - by Zeemis - 06-07-2009, 12:02 AM
RE: HP Script (Zeemis) - by Ultima - 01-02-2010, 02:21 PM
RE: HP Script (Zeemis) - by SSJ Rick - 01-02-2010, 04:45 PM
RE: HP Script (Zeemis) - by Lord Envoy - 01-02-2010, 09:27 PM
RE: HP Script (Zeemis) - by SSJ Rick - 01-03-2010, 07:51 PM
RE: HP Script (Zeemis) - by smokehound - 04-23-2010, 02:44 AM
RE: HP Script (Zeemis) - by NeoBahamut - 03-09-2010, 05:50 PM
RE: HP Script (Zeemis) - by kefkaroth - 04-25-2010, 07:13 PM
RE: HP Script (Zeemis) - by Zeemis - 04-25-2010, 10:30 PM
RE: HP Script (Zeemis) - by kefkaroth - 04-26-2010, 12:08 PM
RE: HP Script (Zeemis) - by Zeemis - 04-26-2010, 01:51 PM
RE: HP Script (Zeemis) - by kefkaroth - 04-26-2010, 04:14 PM
RE: HP Script (Zeemis) - by Lord Envoy - 12-23-2010, 08:21 AM
RE: HP Script (Zeemis) - by kefkaroth - 03-17-2011, 09:26 PM
RE: HP Script (Zeemis) - by Gi Nattak - 03-17-2011, 09:42 PM
RE: HP Script (Zeemis) - by kefkaroth - 03-24-2011, 07:36 AM
RE: HP Script (Zeemis) - by Zeemis - 03-17-2011, 09:49 PM
RE: HP Script (Zeemis) - by kefkaroth - 03-18-2011, 07:45 PM
RE: HP Script (Zeemis) - by kefkaroth - 03-23-2011, 12:24 AM
RE: HP Script (Zeemis) - by Zeemis - 03-23-2011, 09:07 AM
RE: HP Script (Zeemis) - by MugenHeadNinja - 01-01-2012, 02:40 AM
RE: HP Script (Zeemis) - by madsiur - 01-01-2012, 02:50 AM
RE: HP Script (Zeemis) - by BTB - 06-18-2013, 02:18 PM
RE: HP Script (Zeemis) - by Lord Envoy - 06-18-2013, 03:05 PM
RE: HP Script (Zeemis) - by BTB - 07-03-2013, 04:59 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite