… | |
… | |
203 | else |
203 | else |
204 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumbles to dust!", query_short_name (tmp)); |
204 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s crumbles to dust!", query_short_name (tmp)); |
205 | |
205 | |
206 | tmp->remove (); /* remove obj from players inv. */ |
206 | tmp->remove (); /* remove obj from players inv. */ |
207 | esrv_del_item (op->contr, tmp->count); /* notify client */ |
207 | esrv_del_item (op->contr, tmp->count); /* notify client */ |
208 | tmp->destroy (0); /* free object */ |
208 | tmp->destroy (); /* free object */ |
209 | } |
209 | } |
|
|
210 | |
210 | if (tmp->inv) |
211 | if (tmp->inv) |
211 | follower_remove_similar_item (tmp, item); |
212 | follower_remove_similar_item (tmp, item); |
212 | } |
213 | } |
213 | } |
214 | } |
214 | } |
215 | } |
… | |
… | |
414 | /* just do the work of removing the spell ourselves - we already |
415 | /* just do the work of removing the spell ourselves - we already |
415 | * know that the player knows the spell |
416 | * know that the player knows the spell |
416 | */ |
417 | */ |
417 | new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &tmp->name); |
418 | new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &tmp->name); |
418 | player_unready_range_ob (op->contr, tmp); |
419 | player_unready_range_ob (op->contr, tmp); |
419 | tmp->remove (); |
|
|
420 | tmp->destroy (0); |
420 | tmp->destroy (); |
421 | } |
421 | } |
422 | |
422 | |
423 | } |
423 | } |
424 | } |
424 | } |
425 | |
425 | |
… | |
… | |
451 | (item->type != SKILL) && (item->type != EXPERIENCE) && (item->type != FORCE)) |
451 | (item->type != SKILL) && (item->type != EXPERIENCE) && (item->type != FORCE)) |
452 | { |
452 | { |
453 | |
453 | |
454 | if (item->type == SPELL) |
454 | if (item->type == SPELL) |
455 | new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &item->name); |
455 | new_draw_info_format (NDI_UNIQUE | NDI_NAVY, 0, op, "You lose knowledge of %s.", &item->name); |
|
|
456 | |
456 | player_unready_range_ob (op->contr, item); |
457 | player_unready_range_ob (op->contr, item); |
457 | item->remove (); |
|
|
458 | item->destroy (0); |
458 | item->destroy (); |
459 | } |
459 | } |
460 | } |
460 | } |
461 | |
461 | |
462 | /* remove any godgiven items from the old god */ |
462 | /* remove any godgiven items from the old god */ |
463 | if (old_god) |
463 | if (old_god) |
… | |
… | |
869 | /* Follower lacks the required grace for the following |
869 | /* Follower lacks the required grace for the following |
870 | * treasure list items. */ |
870 | * treasure list items. */ |
871 | |
871 | |
872 | tmp = get_archetype (HOLY_POSSESSION); |
872 | tmp = get_archetype (HOLY_POSSESSION); |
873 | cast_change_ability (op, op, tmp, 0, 1); |
873 | cast_change_ability (op, op, tmp, 0, 1); |
874 | tmp->destroy (0); |
874 | tmp->destroy (); |
875 | return; |
875 | return; |
876 | } |
876 | } |
877 | continue; |
877 | continue; |
878 | } |
878 | } |
879 | |
879 | |
… | |
… | |
918 | int success; |
918 | int success; |
919 | |
919 | |
920 | tmp = get_archetype_by_object_name (item->slaying); |
920 | tmp = get_archetype_by_object_name (item->slaying); |
921 | |
921 | |
922 | success = cast_heal (op, op, tmp, 0); |
922 | success = cast_heal (op, op, tmp, 0); |
923 | tmp->destroy (0); |
923 | tmp->destroy (); |
924 | if (success) |
924 | if (success) |
925 | return; |
925 | return; |
926 | else |
926 | else |
927 | continue; |
927 | continue; |
928 | } |
928 | } |
… | |
… | |
956 | { |
956 | { |
957 | LOG (llevError, "Could not find archetype depletion.\n"); |
957 | LOG (llevError, "Could not find archetype depletion.\n"); |
958 | continue; |
958 | continue; |
959 | } |
959 | } |
960 | depl = present_arch_in_ob (at, op); |
960 | depl = present_arch_in_ob (at, op); |
|
|
961 | |
961 | if (depl == NULL) |
962 | if (depl == NULL) |
962 | continue; |
963 | continue; |
|
|
964 | |
963 | new_draw_info (NDI_UNIQUE, 0, op, "Shimmering light surrounds and restores you!"); |
965 | new_draw_info (NDI_UNIQUE, 0, op, "Shimmering light surrounds and restores you!"); |
|
|
966 | |
964 | for (i = 0; i < NUM_STATS; i++) |
967 | for (i = 0; i < NUM_STATS; i++) |
965 | if (get_attr_value (&depl->stats, i)) |
968 | if (get_attr_value (&depl->stats, i)) |
966 | new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]); |
969 | new_draw_info (NDI_UNIQUE, 0, op, restore_msg[i]); |
967 | depl->remove (); |
970 | |
968 | depl->destroy (0); |
971 | depl->destroy (); |
969 | fix_player (op); |
972 | fix_player (op); |
970 | return; |
973 | return; |
971 | } |
974 | } |
972 | |
975 | |
973 | /* Voices */ |
976 | /* Voices */ |
… | |
… | |
1170 | { |
1173 | { |
1171 | if (!caster_is_spell) |
1174 | if (!caster_is_spell) |
1172 | new_draw_info (NDI_UNIQUE, 0, caster, "This prayer is useless unless you worship an appropriate god"); |
1175 | new_draw_info (NDI_UNIQUE, 0, caster, "This prayer is useless unless you worship an appropriate god"); |
1173 | else |
1176 | else |
1174 | LOG (llevError, "BUG: tailor_god_spell(): no god\n"); |
1177 | LOG (llevError, "BUG: tailor_god_spell(): no god\n"); |
|
|
1178 | |
1175 | spellop->destroy (0); |
1179 | spellop->destroy (); |
1176 | return 0; |
1180 | return 0; |
1177 | } |
1181 | } |
1178 | |
1182 | |
1179 | /* either holy word or godpower attacks will set the slaying field */ |
1183 | /* either holy word or godpower attacks will set the slaying field */ |
1180 | if (spellop->attacktype & AT_HOLYWORD || spellop->attacktype & AT_GODPOWER) |
1184 | if (spellop->attacktype & AT_HOLYWORD || spellop->attacktype & AT_GODPOWER) |