NVM Not perfect
This system does not account for creatures that you get via Torture, Prison, Temple sacrifice, and Make Hero.
Here is a hybrid system that does both and does not wastes portal time and enforces the killing of any unit that you acquire over a set limit.
This is an improved version that almost acts as a MIN - MAX type system. You get a MIN 4 and a MAX of 8. Making second nested if > 4 makes MIN 4 - MAX 4
This can replace the available creatures section in a map's script
Code:
IF(PLAYER0,SORCEROR < 4)
NEXT_COMMAND_REUSABLE
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)
ENDIF
IF(PLAYER0,SORCEROR >= 4)
NEXT_COMMAND_REUSABLE
CREATURE_AVAILABLE(PLAYER0,SORCEROR,0,0)
IF(PLAYER0,SORCEROR > 8)
NEXT_COMMAND_REUSABLE
KILL_CREATURE(PLAYER0,SORCEROR,LEAST_EXPERIENCED,1)
ENDIF
ENDIF