Hi, sorry, new guy here. Having trouble figuring out how to go about implementing a type of enemy in my game.
I am building a combat system that involves locational damage. A person has at least one head, at least one torso, and an arbitrary number of limbs (arms, legs, wings, tails). But some enemies will have multiple torso segments in a row, like an insect or a centipede, with their own limbs.
The player can shoot locations to damage and then destroy the parts of an opponent’s body (a body part has [ok, wounded, disabled] states before it is [destroyed]). If a “person’s” head or all torso sections are disabled or destroyed they are killed.
I want to make a “centipede” type of enemy made of at least three torsos (but possibly an arbitrary number of torsos), and if a middle torso is destroyed, then the two separate end pieces can act of their own accord, continuing to fight separately with the limbs still attached, or even doing different actions according to their behaviour priority (e.g. shooting the rear segment off the centipede might cause it to scuttle away, while the rest of the centipede continues to fight, or result in the player having to fight two small centipedes at once).
I’m not looking for specific coding help, but how to implement the concept of this in Inform7 in broad strokes. How would you approach this?
Should I just be building a bunch of different length centipedes, store them in nowhere, and then swap out a 5-segment centipede that is cut in half for two 2-segment centipedes (or a 3-segment and 1-segment, depending on which torso piece is destroyed)?
Or should I be defining each separate centipede segment as its own person, store a bunch of them in nowhere, then make an arbitrary centipede out of the necessary number of them, but a body segment will only act on its own if the torso part ahead of it is destroyed/nonexistent?
Is there a better way I haven’t considered? Or is this a terrible idea, do not do this.
Also if this is not the right place to ask this sort of question - sorry.