Well, that was dull. Let's give the monsters the ability to act by putting this form into the file:
(add monster acp-per-turn 4)
The add
form is very useful; it says to modify the existing
type named monster
, setting the property acp-per-turn
to 4, overwriting whatever value might have been there previously.
The acp-per-turn
property gives the monster the ability to act,
up to 4 actions in each turn.
By default, the ability to act is 1-1 with the speed of the unit,
so the monster can also move into a new cell 4 times each turn.
If you run the game now, you will find that your monster can now get
around just fine.
Why 4?
Actually, at this point the exact value doesn't matter,
since nothing else is happening. If the speed is 1, then the turns
go faster; if the speed is 10, then they go slower and more action
happens in a single turn.
In a complete design however, the exact speed of each unit can be
a critical design parameter, and for this game, I figured that a speed
of 4 allowed a monster to cover several cells in a hurry while not
being able to get too far.
Also, I'm planning to make panic-stricken mobs have a speed of 1,
which is the slowest possible.
Making actions 1-1 with speed is usually the right thing to do,
since then a player will get to move 4 times each turn
(later on we will see reasons for other combinations of values).
The add
form works on most types of objects. It has the
general form
(add <type(s)/object(s)> <property name> <value(s)>)
The type or object may be a list, in which the value is either given to all members of the list, or if it is a list itself, then the list of values is matched up with the list of types.