odamex icon indicating copy to clipboard operation
odamex copied to clipboard

[Feature] Add `limit` field to HORDEDEF

Open electricbrass opened this issue 1 year ago • 0 comments

Addresses #679

This is a revisit of my previous PR from a year ago.

addmonster "DoomImp" { limit = 4 }

When adding a monster or boss to a horde wave definition, there is an optional limit field. If this is defined for a monster, it limits the total number of that monster type that are able to be alive at once during that wave. Bosses now properly obey the limits and the total bosshealth. When bosses are initially spawned, if there is a limit set, they are spawned until the limit is reached, and the horde state returns to PRESSURE, as before. Now, if the total bosshealth was not reached, when bosses are killed, it will reenter WANTBOSS to spawn more bosses. Bosses and regular monsters of the same type have independent limits.

Please look over this, I feel the logic for bosses needs double checking. It all seems to work but I'm sure this could use some additional playtesting.

electricbrass avatar Jun 26 '23 19:06 electricbrass