… | |
… | |
1307 | with a specific code as the slaying field. |
1307 | with a specific code as the slaying field. |
1308 | At that time, it writes the contents of its own message |
1308 | At that time, it writes the contents of its own message |
1309 | field to the player. The marker will decrement hp to |
1309 | field to the player. The marker will decrement hp to |
1310 | 0 and then delete itself every time it grants a mark. |
1310 | 0 and then delete itself every time it grants a mark. |
1311 | unless hp was zero to start with, in which case it is infinite.*/ |
1311 | unless hp was zero to start with, in which case it is infinite.*/ |
1312 | |
|
|
1313 | void |
1312 | void |
1314 | move_marker (object *op) |
1313 | move_marker (object *op) |
1315 | { |
1314 | { |
1316 | if (object *tmp = op->ms ().player ()) |
1315 | if (object *tmp = op->ms ().player ()) |
1317 | { |
1316 | { |
1318 | object *tmp2; |
1317 | object *tmp2; |
1319 | |
1318 | |
1320 | /* remove an old force with a slaying field == op->name */ |
1319 | /* remove an old force with a slaying field == op->name */ |
1321 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp2->below) |
1320 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp2->below) |
1322 | if (tmp2->type == FORCE && tmp2->slaying && !strcmp (tmp2->slaying, op->name)) |
1321 | if (tmp2->type == FORCE && tmp2->slaying && tmp2->slaying == op->name) |
1323 | { |
1322 | { |
1324 | tmp2->destroy (); |
1323 | tmp2->destroy (); |
1325 | break; |
1324 | break; |
1326 | } |
1325 | } |
1327 | |
1326 | |
1328 | /* cycle through his inventory to look for the MARK we want to |
1327 | /* cycle through his inventory to look for the MARK we want to |
1329 | * place |
1328 | * place |
1330 | */ |
1329 | */ |
1331 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp2->below) |
1330 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp2->below) |
1332 | if (tmp2->type == FORCE && tmp2->slaying && !strcmp (tmp2->slaying, op->slaying)) |
1331 | if (tmp2->type == FORCE && tmp2->slaying && tmp2->slaying == op->slaying) |
1333 | break; |
1332 | break; |
1334 | |
1333 | |
1335 | /* if we didn't find our own MARK */ |
1334 | /* if we didn't find our own MARK */ |
1336 | if (tmp2 == NULL) |
1335 | if (!tmp2) |
1337 | { |
1336 | { |
1338 | object *force = get_archetype (FORCE_NAME); |
1337 | object *force = get_archetype (FORCE_NAME); |
1339 | |
1338 | |
1340 | if (op->stats.food) |
1339 | if (op->stats.food) |
1341 | { |
1340 | { |