ZQuestClassic / ZQuestClassic

ZQuest Classic is a game engine for creating games similar to the original NES Zelda
https://zquestclassic.com
GNU General Public License v3.0
453 stars 79 forks source link

feat: add enemy flag to control if affected by "Kill All Enemies" #933

Closed Jambu1989 closed 1 week ago

Jambu1989 commented 2 weeks ago

Ringleader Rooms, Cheats, and KillAllEnemies Items will now kill adult Digdoggers.

EmilyV99 commented 2 weeks ago

This change would break any old quest that relies on... well, this NOT happening. This would need a compat QR added.

connorjclark commented 2 weeks ago

kickbucket effects:

but does not impact scripting npc Remove (despite the ZASM being called NPCKICKBUCKET...)

Mostly related to cheats or cheat-like weapons. I can't see a quest relying on this behavior, so I suggest we don't need a QR compat rule.

EmilyV99 commented 2 weeks ago

I think we need to articulate a real way this would break a quest before jumping to a QR.

Quests may expect their boss not to die to an instakill ability that can possibly drop from the boss's minions in a dropset.

connorjclark commented 2 weeks ago

would a new enemy flag for "ignored by kill all enemies" be better than a qr?

EmilyV99 commented 2 weeks ago

would a new enemy flag for "ignored by kill all enemies" be better than a qr?

Aye, that sounds perfect

Jambu1989 commented 2 weeks ago

A Behavior Flag it is then?

connorjclark commented 2 weeks ago

Yes, let's do that. I think we can also consider making the "Kill all enemies" cheat ignore the flag too, but that can come later.

I think the next flag would be 0x00020000 on flags2? https://github.com/ZQuestClassic/ZQuestClassic/blob/48660bfcbfad6ef6890913e9e565945e6deb3f4a/src/base/zdefs.h#L1364C1-L1364C35

Wow, we really haven't added a new flag in over 8 years. I'm not certain what the process is, but it will involve adding code in readguys / writeguys; and readguys will need to check the guyversion to set the existing enemies that are excluded from "kill em all" but won't be in new versions. for example

this will need to be bumped https://github.com/ZQuestClassic/ZQuestClassic/blob/48660bfcbfad6ef6890913e9e565945e6deb3f4a/src/base/zdefs.h#L153

then the editor needs to expose a checkbox for this new flag

then of course, the superman=1 lines needs to be removed, and kickbucket needs to check (in addition to superman) this new flag

you might want to wait for Emily to give any additional advice or corrections to mine before starting.

Jambu1989 commented 1 week ago

Added the flag.

Jambu1989 commented 1 week ago

@connorjclark should be ready to go now

connorjclark commented 1 week ago

well done 🎉