… | |
… | |
72 | if (!(random_roll (0, 3, op, PREFER_HIGH))) |
72 | if (!(random_roll (0, 3, op, PREFER_HIGH))) |
73 | { |
73 | { |
74 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s vibrates violently, then explodes!", query_name (wand)); |
74 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s vibrates violently, then explodes!", query_name (wand)); |
75 | op->play_sound (sound_find ("ob_explode")); |
75 | op->play_sound (sound_find ("ob_explode")); |
76 | wand->destroy (); |
76 | wand->destroy (); |
77 | tmp = get_archetype ("fireball"); |
77 | tmp = get_archetype (shstr_fireball); |
78 | tmp->stats.dam = (spell_ob->stats.dam + SP_level_dam_adjust (caster, spell_ob)) / 10; |
78 | tmp->stats.dam = (spell_ob->stats.dam + SP_level_dam_adjust (caster, spell_ob)) / 10; |
79 | |
79 | |
80 | if (!tmp->stats.dam) |
80 | if (!tmp->stats.dam) |
81 | tmp->stats.dam = 1; |
81 | tmp->stats.dam = 1; |
82 | |
82 | |
… | |
… | |
565 | |
565 | |
566 | int |
566 | int |
567 | perceive_self (object *op) |
567 | perceive_self (object *op) |
568 | { |
568 | { |
569 | const char *cp = describe_item (op, op); |
569 | const char *cp = describe_item (op, op); |
570 | archetype *at = archetype::find (ARCH_DEPLETION); |
570 | archetype *at = archetype::find (shstr_depletion); |
571 | |
571 | |
572 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
572 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
573 | |
573 | |
574 | if (!op->is_player ()) |
574 | if (!op->is_player ()) |
575 | return 0; |
575 | return 0; |
… | |
… | |
951 | if (cure_disease (tmp, op, spell)) |
951 | if (cure_disease (tmp, op, spell)) |
952 | success = 1; |
952 | success = 1; |
953 | |
953 | |
954 | if (spell->attacktype & AT_POISON) |
954 | if (spell->attacktype & AT_POISON) |
955 | { |
955 | { |
956 | at = archetype::find ("poisoning"); |
956 | at = archetype::find (shstr_poisoning); |
957 | poison = present_arch_in_ob (at, tmp); |
957 | poison = present_arch_in_ob (at, tmp); |
958 | if (poison) |
958 | if (poison) |
959 | { |
959 | { |
960 | success = 1; |
960 | success = 1; |
961 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your body feels cleansed"); |
961 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your body feels cleansed"); |
… | |
… | |
963 | } |
963 | } |
964 | } |
964 | } |
965 | |
965 | |
966 | if (spell->attacktype & AT_CONFUSION) |
966 | if (spell->attacktype & AT_CONFUSION) |
967 | { |
967 | { |
968 | poison = present_in_ob_by_name (FORCE, "confusion", tmp); |
968 | poison = present_in_ob_by_name (FORCE, shstr_confusion, tmp); |
969 | if (poison) |
969 | if (poison) |
970 | { |
970 | { |
971 | success = 1; |
971 | success = 1; |
972 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); |
972 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); |
973 | poison->duration = 1; |
973 | poison->duration = 1; |
974 | } |
974 | } |
975 | } |
975 | } |
976 | |
976 | |
977 | if (spell->attacktype & AT_BLIND) |
977 | if (spell->attacktype & AT_BLIND) |
978 | { |
978 | { |
979 | at = archetype::find ("blindness"); |
979 | at = archetype::find (shstr_blindness); |
980 | poison = present_arch_in_ob (at, tmp); |
980 | poison = present_arch_in_ob (at, tmp); |
981 | if (poison) |
981 | if (poison) |
982 | { |
982 | { |
983 | success = 1; |
983 | success = 1; |
984 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your vision begins to return."); |
984 | new_draw_info (NDI_UNIQUE, 0, tmp, "Your vision begins to return."); |
… | |
… | |
1250 | } |
1250 | } |
1251 | else |
1251 | else |
1252 | { |
1252 | { |
1253 | /* Only give out good benefits, and put a max on it */ |
1253 | /* Only give out good benefits, and put a max on it */ |
1254 | for (i = 0; i < NROFATTACKS; i++) |
1254 | for (i = 0; i < NROFATTACKS; i++) |
1255 | { |
|
|
1256 | if (god->resist[i] > 0) |
1255 | if (god->resist[i] > 0) |
1257 | { |
|
|
1258 | force->resist[i] = MIN (god->resist[i], spell_ob->resist[ATNR_GODPOWER]); |
1256 | force->resist[i] = min (god->resist[i], spell_ob->resist[ATNR_GODPOWER]); |
1259 | } |
1257 | |
1260 | } |
|
|
1261 | force->path_attuned |= god->path_attuned; |
1258 | force->path_attuned |= god->path_attuned; |
1262 | |
1259 | |
1263 | if (spell_ob->attacktype) |
1260 | if (spell_ob->attacktype) |
1264 | force->slaying = god->slaying; |
1261 | force->slaying = god->slaying; |
1265 | |
1262 | |
… | |
… | |
1330 | if (op->type != PLAYER) |
1327 | if (op->type != PLAYER) |
1331 | return 0; |
1328 | return 0; |
1332 | |
1329 | |
1333 | archetype *nugget[3]; |
1330 | archetype *nugget[3]; |
1334 | |
1331 | |
1335 | nugget[0] = archetype::find ("pyrite3"); |
1332 | nugget[0] = archetype::find (shstr_pyrite3); |
1336 | nugget[1] = archetype::find ("pyrite2"); |
1333 | nugget[1] = archetype::find (shstr_pyrite2); |
1337 | nugget[2] = archetype::find ("pyrite"); |
1334 | nugget[2] = archetype::find (shstr_pyrite); |
1338 | |
1335 | |
1339 | /* Put a maximum weight of items that can be alchemised. Limits the power |
1336 | /* Put a maximum weight of items that can be alchemised. Limits the power |
1340 | * some, and also prevents people from alchemising every table/chair/clock |
1337 | * some, and also prevents people from alchemising every table/chair/clock |
1341 | * in sight |
1338 | * in sight |
1342 | */ |
1339 | */ |
… | |
… | |
2136 | tmp->state = weapon->state; |
2133 | tmp->state = weapon->state; |
2137 | tmp->flag [FLAG_ANIMATE] = weapon->flag [FLAG_ANIMATE]; |
2134 | tmp->flag [FLAG_ANIMATE] = weapon->flag [FLAG_ANIMATE]; |
2138 | } |
2135 | } |
2139 | |
2136 | |
2140 | /* make experience increase in proportion to the strength of the summoned creature. */ |
2137 | /* make experience increase in proportion to the strength of the summoned creature. */ |
2141 | tmp->stats.exp *= 1 + (MAX (spell->stats.maxgrace, spell->stats.sp) / casting_level (caster, spell)); |
2138 | tmp->stats.exp *= 1 + (max (spell->stats.maxgrace, spell->stats.sp) / casting_level (caster, spell)); |
2142 | |
2139 | |
2143 | tmp->speed_left = -1; |
2140 | tmp->speed_left = -1; |
2144 | tmp->direction = dir; |
2141 | tmp->direction = dir; |
2145 | |
2142 | |
2146 | m->insert (tmp, x, y, op); |
2143 | m->insert (tmp, x, y, op); |
… | |
… | |
2289 | continue; |
2286 | continue; |
2290 | |
2287 | |
2291 | if (victim->stats.exp == 0) |
2288 | if (victim->stats.exp == 0) |
2292 | continue; |
2289 | continue; |
2293 | |
2290 | |
2294 | def_lev = MAX (1, victim->level); |
2291 | def_lev = max (1, victim->level); |
2295 | atk_lev = MAX (1, op->level); |
2292 | atk_lev = max (1, op->level); |
2296 | |
2293 | |
2297 | if (rndm (0, atk_lev - 1) > def_lev) |
2294 | if (rndm (0, atk_lev - 1) > def_lev) |
2298 | { |
2295 | { |
2299 | /* make this sucker peaceful. */ |
2296 | /* make this sucker peaceful. */ |
2300 | |
2297 | |