1 | |
1 | |
2 | /* |
2 | /* |
3 | * static char *rcsid_attack_c = |
3 | * static char *rcsid_attack_c = |
4 | * "$Id: attack.C,v 1.15 2006/09/14 20:46:10 root Exp $"; |
4 | * "$Id: attack.C,v 1.16 2006/09/14 21:16:12 root Exp $"; |
5 | */ |
5 | */ |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
9 | |
9 | |
… | |
… | |
247 | |
247 | |
248 | /* The value of 50 is arbitrary. */ |
248 | /* The value of 50 is arbitrary. */ |
249 | if (type & AT_COLD && (op->resist[ATNR_COLD] < 50) && !QUERY_FLAG (op, FLAG_NO_PICK) && (RANDOM () & 2)) |
249 | if (type & AT_COLD && (op->resist[ATNR_COLD] < 50) && !QUERY_FLAG (op, FLAG_NO_PICK) && (RANDOM () & 2)) |
250 | { |
250 | { |
251 | object *tmp; |
251 | object *tmp; |
252 | archetype *at = find_archetype ("icecube"); |
252 | archetype *at = archetype::find ("icecube"); |
253 | |
253 | |
254 | if (at == NULL) |
254 | if (at == NULL) |
255 | return; |
255 | return; |
256 | |
256 | |
257 | op = stop_item (op); |
257 | op = stop_item (op); |
… | |
… | |
2066 | |
2066 | |
2067 | |
2067 | |
2068 | void |
2068 | void |
2069 | poison_player (object *op, object *hitter, int dam) |
2069 | poison_player (object *op, object *hitter, int dam) |
2070 | { |
2070 | { |
2071 | archetype *at = find_archetype ("poisoning"); |
2071 | archetype *at = archetype::find ("poisoning"); |
2072 | object *tmp = present_arch_in_ob (at, op); |
2072 | object *tmp = present_arch_in_ob (at, op); |
2073 | |
2073 | |
2074 | if (tmp == NULL) |
2074 | if (tmp == NULL) |
2075 | { |
2075 | { |
2076 | if ((tmp = arch_to_object (at)) == NULL) |
2076 | if ((tmp = arch_to_object (at)) == NULL) |
… | |
… | |
2122 | } |
2122 | } |
2123 | |
2123 | |
2124 | void |
2124 | void |
2125 | slow_player (object *op, object *hitter, int dam) |
2125 | slow_player (object *op, object *hitter, int dam) |
2126 | { |
2126 | { |
2127 | archetype *at = find_archetype ("slowness"); |
2127 | archetype *at = archetype::find ("slowness"); |
2128 | object *tmp; |
2128 | object *tmp; |
2129 | |
2129 | |
2130 | if (at == NULL) |
2130 | if (at == NULL) |
2131 | { |
2131 | { |
2132 | LOG (llevError, "Can't find slowness archetype.\n"); |
2132 | LOG (llevError, "Can't find slowness archetype.\n"); |