You can move around a player on an island and meet different enemies. You have 5
hitpoints to lose before death. Enemies start with different amounts of
-hitpoints, depending on their species. Dead enemies become dirt, skeletons or
-"magic meat" -- such objects can be collected, and "magic meat" can be consumed
-to gain hitpoints (if allowed to lie on the ground for a while it may even
-multiply ...). Note that different kinds of movements/actions take different
-numbers of turns to finish.
+hitpoints, depending on their species. Dead enemies become dirt, skeletons, or
+food to consume (each turn reduces one's "satiation", and the lower it is, the
+stronger the chance of suffering from hunger and thereby losing hitpoints). Note
+that different kinds of movements/actions take different numbers of turns to
+finish.
Enemies' AI is very dumb so far: Each turn, they look out for actors of
different species to flee from (if their type starts out with more hitpoints
yet, create it with default name "(none)", corpse ID equal to the new thing
type's ID, and remaining thing type attributes to 0.
-TT_CONSUMABLE [0-255]
+TT_CONSUMABLE [0-65535]
Set selected thing type's consumability value to argument – the number of
-lifepoints earned by consuming/using things of that type.
+.satiation score points earned by consuming/using things of that type.
TT_START_NUMBER [0-255]
Set selected thing type's number of things of type to spawn on successful
TT_LIFEPOINTS 0
TT_SYMBOL m
TT_NAME 'MAGIC MEAT'
-TT_CONSUMABLE 3
+TT_CONSUMABLE 512
TT_PROLIFERATE 255
TT_ID 0
return err_line(1, "No thing type defined to manipulate yet.");
}
int16_t id;
- if ( parse_val(tok0,tok1,s[S_CMD_TT_CONSUM],'8',(char *) &tt->consumable)
+ if ( parse_val(tok0,tok1,s[S_CMD_TT_CONSUM],'u',(char *) &tt->consumable)
|| parse_val(tok0,tok1,s[S_CMD_TT_HP],'8',(char *) &tt->lifepoints)
|| parse_val(tok0,tok1,s[S_CMD_TT_STARTN],'8',(char *) &tt->start_n)
|| parse_val(tok0,tok1,s[S_CMD_TT_SYMB],'c',(char *) &tt->char_on_map)
{
t->owns = next;
}
+ t->satiation = t->satiation + tt->consumable > INT16_MAX ?
+ INT16_MAX : t->satiation + tt->consumable;
t->lifepoints = t->lifepoints + tt->consumable;
}
}
char char_on_map; /* thing symbol to appear on map */
char * name; /* string to describe thing in game log */
uint16_t stomach; /* if >0, defines onset & chance of hunger suffering */
+ uint16_t consumable; /* can be eaten if !0, for so much .satiation win */
uint8_t corpse_id; /* type to change thing into upon destruction */
uint8_t lifepoints; /* default start value for thing's .lifepoints */
- uint8_t consumable; /* can be eaten if !0, for so much hitpoint win */
uint8_t start_n; /* how many of these does the map start with? */
uint8_t proliferate; /* if >0: inverse of chance to proliferate */
};