1 | /* |
1 | /* |
2 | * static char *rcsid_monster_c = |
2 | * static char *rcsid_monster_c = |
3 | * "$Id: monster.c,v 1.2 2006/02/07 23:29:55 root Exp $"; |
3 | * "$Id: monster.c,v 1.3 2006/03/10 14:08:38 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
1247 | |
1247 | |
1248 | if (item->type == TREASURE && mon->will_apply & WILL_APPLY_TREASURE) flag=1; |
1248 | if (item->type == TREASURE && mon->will_apply & WILL_APPLY_TREASURE) flag=1; |
1249 | /* Eating food gets hp back */ |
1249 | /* Eating food gets hp back */ |
1250 | else if (item->type == FOOD && mon->will_apply & WILL_APPLY_FOOD) flag=1; |
1250 | else if (item->type == FOOD && mon->will_apply & WILL_APPLY_FOOD) flag=1; |
1251 | else if (item->type == SCROLL && QUERY_FLAG(mon, FLAG_USE_SCROLL)) { |
1251 | else if (item->type == SCROLL && QUERY_FLAG(mon, FLAG_USE_SCROLL)) { |
1252 | if (monster_should_cast_spell(mon, item->inv)) |
1252 | if (item->inv && monster_should_cast_spell(mon, item->inv)) |
1253 | SET_FLAG(mon, FLAG_READY_SCROLL); |
1253 | SET_FLAG(mon, FLAG_READY_SCROLL); |
1254 | /* Don't use it right now */ |
1254 | /* Don't use it right now */ |
1255 | return; |
1255 | return; |
1256 | } |
1256 | } |
1257 | else if (item->type == WEAPON) flag = check_good_weapon(mon,item); |
1257 | else if (item->type == WEAPON) flag = check_good_weapon(mon,item); |