static void _identify_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Identify"); break; case SPELL_DESC: if (p_ptr->lev < 25) var_set_string(res, "New Treasure! You examine your new discovery."); else var_set_string(res, "New Treasure! You examine your new discovery and learn its deepest truths."); break; case SPELL_SPOIL_DESC: var_set_string(res, "Identifies an object. At L25, fully identifies an object."); break; case SPELL_CAST: { bool b = TRUE; if (p_ptr->lev < 25) b = ident_spell(NULL); else b = identify_fully(NULL); var_set_bool(res, b); } break; default: default_spell(cmd, res); break; } }
void identify_fully_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Identify True"); break; case SPELL_DESC: var_set_string(res, ""); break; case SPELL_CAST: var_set_bool(res, identify_fully(NULL)); break; default: default_spell(cmd, res); break; } }
void _judgment_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Judgment"); break; case SPELL_DESC: var_set_string(res, ""); break; case SPELL_CAST: if (p_ptr->lev > 29) var_set_bool(res, identify_fully(object_is_weapon_armour_ammo)); else var_set_bool(res, ident_spell(object_is_weapon_armour_ammo)); break; default: default_spell(cmd, res); break; } }
static void _judge_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Identify Weapon"); break; case SPELL_DESC: var_set_string(res, "Identifies a weapon."); break; case SPELL_CAST: if (p_ptr->lev >= 35) var_set_bool(res, identify_fully(object_is_melee_weapon)); else var_set_bool(res, ident_spell(object_is_melee_weapon)); break; default: default_spell(cmd, res); break; } }
/* * Ask for and parse a "debug command" * The "command_arg" may have been set. */ void do_cmd_debug(void) { int py = p_ptr->py; int px = p_ptr->px; int x, y; char cmd; /* Get a "debug command" */ (void)get_com("Debug Command: ", &cmd); /* Analyze the command */ switch (cmd) { /* Nothing */ case ESCAPE: case ' ': case '\n': case '\r': break; #ifdef ALLOW_SPOILERS /* Hack -- Generate Spoilers */ case '"': do_cmd_spoilers(); break; #endif /* ALLOW_SPOILERS */ #ifdef MATLAB case '=': output_monster_matlab(); break; #endif /* MATLAB */ /* Hack -- Help */ case '?': screen_save(); (void)show_file("wizard.txt", NULL, 0 , 0); screen_load(); break; /* Cure all maladies */ case 'a': do_cmd_wiz_cure_all(); break; /* Know alignment */ case 'A': msg_format("Your alignment is %d.", p_ptr->align); break; /* Teleport to target */ case 'b': do_cmd_wiz_bamf(); break; /* Create any object */ case 'c': wiz_create_item(); break; /* Create a named artifact */ case 'C': /* wiz_create_named_art(p_ptr->command_arg);*/ break; /* Detect everything */ case 'd': (void)detect_all(); break; /* Edit character */ case 'e': do_cmd_wiz_change(); break; /* View item info */ case 'f': (void)identify_fully(); break; /* Create feature */ case 'F': if (p_ptr->command_arg > 0) do_cmd_wiz_feature(p_ptr->command_arg); break; /* Good Objects */ case 'g': if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; acquirement(py, px, p_ptr->command_arg, FALSE, TRUE); break; /* Hitpoint rerating */ case 'h': do_cmd_rerate(); break; #ifdef MONSTER_HORDES case 'H': do_cmd_summon_horde(); break; #endif /* MONSTER_HORDES */ /* Identify */ case 'i': (void)ident_spell(); break; /* Fields Integrity */ case 'I': (void)test_field_data_integrity(); break; /* Go up or down in the dungeon */ case 'j': do_cmd_wiz_jump(); break; /* Test compression code */ case 'J': /* test_compress_module(); */ break; /* Self-Knowledge */ case 'k': self_knowledge(); break; /* Learn about objects */ case 'l': do_cmd_wiz_learn(); break; /* Lose Mutation */ case 'L': (void)lose_mutation(p_ptr->command_arg); break; /* Magic Mapping */ case 'm': map_area(); break; /* Gain Mutation */ case 'M': (void)gain_mutation(p_ptr->command_arg); break; /* Specific reward */ case 'r': (void)gain_level_reward(p_ptr->command_arg); break; /* Summon _friendly_ named monster */ case 'N': do_cmd_wiz_named_friendly(p_ptr->command_arg, TRUE); break; /* Summon Named Monster */ case 'n': do_cmd_wiz_named(p_ptr->command_arg, TRUE); break; /* Object playing routines */ case 'o': do_cmd_wiz_play(); break; /* Phase Door */ case 'p': teleport_player(10); break; #if 0 /* Complete a Quest -KMW- */ case 'q': { for (i = 0; i < max_quests; i++) { if (p_ptr->quest[i].status == QUEST_STATUS_TAKEN) { p_ptr->quest[i].status++; msg_print("Completed Quest"); msg_print(NULL); break; } } if (i == max_quests) { msg_print("No current quest"); msg_print(NULL); } break; } #endif /* Make every dungeon square "known" to test streamers -KMW- */ case 'u': { for (y = min_hgt; y < max_hgt; y++) { for (x = min_wid; x < max_wid; x++) { area(y, x)->info |= (CAVE_GLOW | CAVE_MARK); } } wiz_lite(); break; } /* Summon Random Monster(s) */ case 's': if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; do_cmd_wiz_summon(p_ptr->command_arg); break; /* Teleport */ case 't': teleport_player(100); break; /* Very Good Objects */ case 'v': if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; acquirement(py, px, p_ptr->command_arg, TRUE, TRUE); break; /* Wizard Light the Level */ case 'w': if (p_ptr->depth) { wiz_lite(); } else { learn_map(); } break; case 'W': test_decision_tree(); break; /* Increase Experience */ case 'x': if (p_ptr->command_arg) { gain_exp(p_ptr->command_arg); } else { gain_exp(p_ptr->exp + 1); } break; /* Zap Monsters (Genocide) */ case 'z': do_cmd_wiz_zap(); break; case 'Z': do_cmd_wiz_zap_all(); break; /* Hack -- whatever I desire */ case '_': do_cmd_wiz_hack_ben(); break; #ifdef USE_SCRIPT /* Hack -- activate a script */ case '@': do_cmd_wiz_script(); break; #endif /* USE_SCRIPT */ /* Not a Wizard Command */ default: msg_print("That is not a valid debug command."); break; } }
static bool read_scroll(object_type *o_ptr, bool *ident) { int py = p_ptr->py; int px = p_ptr->px; int k; bool used_up = TRUE; /* Analyze the scroll */ switch (o_ptr->sval) { case SV_SCROLL_DARKNESS: { if (!p_ptr->resist_blind) { (void)set_blind(p_ptr->blind + 3 + randint(5)); } if (unlite_area(10, 3)) *ident = TRUE; break; } case SV_SCROLL_AGGRAVATE_MONSTER: { msg_print("There is a high pitched humming noise."); aggravate_monsters(0); *ident = TRUE; break; } case SV_SCROLL_CURSE_ARMOR: { if (curse_armor()) *ident = TRUE; break; } case SV_SCROLL_CURSE_WEAPON: { if (curse_weapon()) *ident = TRUE; break; } case SV_SCROLL_SUMMON_MONSTER: { for (k = 0; k < randint(3); k++) { if (summon_specific(py, px, p_ptr->depth, 0)) { *ident = TRUE; } } break; } case SV_SCROLL_SUMMON_UNDEAD: { for (k = 0; k < randint(3); k++) { if (summon_specific(py, px, p_ptr->depth, SUMMON_UNDEAD)) { *ident = TRUE; } } break; } case SV_SCROLL_TRAP_CREATION: { if (trap_creation()) *ident = TRUE; break; } case SV_SCROLL_PHASE_DOOR: { teleport_player(10); *ident = TRUE; break; } case SV_SCROLL_TELEPORT: { teleport_player(100); *ident = TRUE; break; } case SV_SCROLL_TELEPORT_LEVEL: { (void)teleport_player_level(); *ident = TRUE; break; } case SV_SCROLL_WORD_OF_RECALL: { set_recall(); *ident = TRUE; break; } case SV_SCROLL_IDENTIFY: { *ident = TRUE; if (!ident_spell()) used_up = FALSE; break; } case SV_SCROLL_STAR_IDENTIFY: { *ident = TRUE; if (!identify_fully()) used_up = FALSE; break; } case SV_SCROLL_REMOVE_CURSE: { if (remove_curse()) { msg_print("You feel as if someone is watching over you."); *ident = TRUE; } break; } case SV_SCROLL_STAR_REMOVE_CURSE: { remove_all_curse(); *ident = TRUE; break; } case SV_SCROLL_ENCHANT_ARMOR: { *ident = TRUE; if (!enchant_spell(0, 0, 1)) used_up = FALSE; break; } case SV_SCROLL_ENCHANT_WEAPON_TO_HIT: { if (!enchant_spell(1, 0, 0)) used_up = FALSE; *ident = TRUE; break; } case SV_SCROLL_ENCHANT_WEAPON_TO_DAM: { if (!enchant_spell(0, 1, 0)) used_up = FALSE; *ident = TRUE; break; } case SV_SCROLL_STAR_ENCHANT_ARMOR: { if (!enchant_spell(0, 0, randint(3) + 2)) used_up = FALSE; *ident = TRUE; break; } case SV_SCROLL_STAR_ENCHANT_WEAPON: { if (!enchant_spell(randint(3), randint(3), 0)) used_up = FALSE; *ident = TRUE; break; } case SV_SCROLL_RECHARGING: { if (!recharge(60)) used_up = FALSE; *ident = TRUE; break; } case SV_SCROLL_LIGHT: { if (lite_area(damroll(2, 8), 2)) *ident = TRUE; break; } case SV_SCROLL_MAPPING: { map_area(); *ident = TRUE; break; } case SV_SCROLL_DETECT_GOLD: { if (detect_treasure()) *ident = TRUE; if (detect_objects_gold()) *ident = TRUE; break; } case SV_SCROLL_DETECT_ITEM: { if (detect_objects_normal()) *ident = TRUE; break; } case SV_SCROLL_DETECT_TRAP: { if (detect_traps()) *ident = TRUE; break; } case SV_SCROLL_DETECT_DOOR: { if (detect_doors()) *ident = TRUE; if (detect_stairs()) *ident = TRUE; break; } case SV_SCROLL_DETECT_INVIS: { if (detect_monsters_invis()) *ident = TRUE; break; } case SV_SCROLL_SATISFY_HUNGER: { if (set_food(PY_FOOD_MAX - 1)) *ident = TRUE; break; } case SV_SCROLL_BLESSING: { if (set_blessed(p_ptr->blessed + randint(12) + 6)) *ident = TRUE; break; } case SV_SCROLL_HOLY_CHANT: { if (set_blessed(p_ptr->blessed + randint(24) + 12)) *ident = TRUE; break; } case SV_SCROLL_HOLY_PRAYER: { if (set_blessed(p_ptr->blessed + randint(48) + 24)) *ident = TRUE; break; } case SV_SCROLL_MONSTER_CONFUSION: { if (p_ptr->confusing == 0) { msg_print("Your hands begin to glow."); p_ptr->confusing = TRUE; *ident = TRUE; } break; } case SV_SCROLL_PROTECTION_FROM_EVIL: { k = 3 * p_ptr->lev; if (set_protevil(p_ptr->protevil + randint(25) + k)) *ident = TRUE; break; } case SV_SCROLL_RUNE_OF_PROTECTION: { warding_glyph(); *ident = TRUE; break; } case SV_SCROLL_TRAP_DOOR_DESTRUCTION: { if (destroy_doors_touch()) *ident = TRUE; break; } case SV_SCROLL_STAR_DESTRUCTION: { destroy_area(py, px, 15, TRUE); *ident = TRUE; break; } case SV_SCROLL_DISPEL_UNDEAD: { if (dispel_undead(60)) *ident = TRUE; break; } case SV_SCROLL_BANISHMENT: { (void)banishment(); *ident = TRUE; break; } case SV_SCROLL_MASS_BANISHMENT: { (void)mass_banishment(); *ident = TRUE; break; } case SV_SCROLL_ACQUIREMENT: { acquirement(py, px, 1, TRUE); *ident = TRUE; break; } case SV_SCROLL_STAR_ACQUIREMENT: { acquirement(py, px, randint(2) + 1, TRUE); *ident = TRUE; break; } } return (used_up); }
/* * Ask for and parse a "debug command" * * The "p_ptr->command_arg" may have been set. */ void do_cmd_debug(void) { int py = p_ptr->py; int px = p_ptr->px; char cmd; /* Get a "debug command" */ if (!get_com("Debug Command: ", &cmd)) return; /* Analyze the command */ switch (cmd) { /* Ignore */ case ESCAPE: case ' ': case '\n': case '\r': { break; } #ifdef ALLOW_SPOILERS /* Hack -- Generate Spoilers */ case '"': { do_cmd_spoilers(); break; } #endif /* Hack -- Help */ case '?': { do_cmd_help(); break; } /* Cure all maladies */ case 'a': { do_cmd_wiz_cure_all(); break; } /* Teleport to target */ case 'b': { do_cmd_wiz_bamf(); break; } /* Create any object */ case 'c': { wiz_create_item(); break; } /* Create an artifact */ case 'C': { wiz_create_artifact(p_ptr->command_arg); break; } /* Detect everything */ case 'd': { detect_all(); break; } /* Edit character */ case 'e': { do_cmd_wiz_change(); break; } /* View item info */ case 'f': { (void)identify_fully(); break; } /* Good Objects */ case 'g': { if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; acquirement(py, px, p_ptr->command_arg, FALSE); break; } /* Hitpoint rerating */ case 'h': { do_cmd_rerate(); break; } /* Identify */ case 'i': { (void)ident_spell(); break; } /* Go up or down in the dungeon */ case 'j': { do_cmd_wiz_jump(); break; } /* Self-Knowledge */ case 'k': { self_knowledge(); break; } /* Learn about objects */ case 'l': { do_cmd_wiz_learn(); break; } /* Magic Mapping */ case 'm': { map_area(); break; } /* Summon Named Monster */ case 'n': { do_cmd_wiz_named(p_ptr->command_arg, TRUE); break; } /* Object playing routines */ case 'o': { do_cmd_wiz_play(); break; } /* Phase Door */ case 'p': { teleport_player(10); break; } /* Query the dungeon */ case 'q': { do_cmd_wiz_query(); break; } /* Summon Random Monster(s) */ case 's': { if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; do_cmd_wiz_summon(p_ptr->command_arg); break; } /* Teleport */ case 't': { teleport_player(100); break; } /* Un-hide all monsters */ case 'u': { if (p_ptr->command_arg <= 0) p_ptr->command_arg = 255; do_cmd_wiz_unhide(p_ptr->command_arg); break; } /* Very Good Objects */ case 'v': { if (p_ptr->command_arg <= 0) p_ptr->command_arg = 1; acquirement(py, px, p_ptr->command_arg, TRUE); break; } /* Wizard Light the Level */ case 'w': { wiz_lite(); break; } /* Increase Experience */ case 'x': { if (p_ptr->command_arg) { gain_exp(p_ptr->command_arg); } else { gain_exp(p_ptr->exp + 1); } break; } /* Zap Monsters (Genocide) */ case 'z': { if (p_ptr->command_arg <= 0) p_ptr->command_arg = MAX_SIGHT; do_cmd_wiz_zap(p_ptr->command_arg); break; } /* Oops */ default: { msg_print("That is not a valid debug command."); break; } } }
/*! * @brief デバッグコマンドを選択する処理のメインルーチン / * Ask for and parse a "debug command" * The "command_arg" may have been set. * @return なし */ void do_cmd_debug(void) { int x, y, i; char cmd; /* Get a "debug command" */ get_com("Debug Command: ", &cmd, FALSE); /* Analyze the command */ switch (cmd) { /* Nothing */ case ESCAPE: case ' ': case '\n': case '\r': break; #ifdef ALLOW_SPOILERS /* Hack -- Generate Spoilers */ case '"': do_cmd_spoilers(); break; #endif /* ALLOW_SPOILERS */ /* Hack -- Help */ case '?': do_cmd_help(); break; /* Cure all maladies */ case 'a': do_cmd_wiz_cure_all(); break; /* Know alignment */ case 'A': msg_format("Your alignment is %d.", p_ptr->align); break; /* Teleport to target */ case 'b': do_cmd_wiz_bamf(); break; case 'B': battle_monsters(); break; /* Create any object */ case 'c': wiz_create_item(); break; /* Create a named artifact */ case 'C': wiz_create_named_art(); break; /* Detect everything */ case 'd': detect_all(DETECT_RAD_ALL * 3); break; /* Dimension_door */ case 'D': wiz_dimension_door(); break; /* Edit character */ case 'e': do_cmd_wiz_change(); break; /* Blue Mage Only */ case 'E': if (p_ptr->pclass == CLASS_BLUE_MAGE) { do_cmd_wiz_blue_mage(); } break; /* View item info */ case 'f': identify_fully(FALSE); break; /* Create desired feature */ case 'F': do_cmd_wiz_create_feature(); break; /* Good Objects */ case 'g': if (command_arg <= 0) command_arg = 1; acquirement(p_ptr->y, p_ptr->x, command_arg, FALSE, FALSE, TRUE); break; /* Hitpoint rerating */ case 'h': do_cmd_rerate(TRUE); break; #ifdef MONSTER_HORDES case 'H': do_cmd_summon_horde(); break; #endif /* MONSTER_HORDES */ /* Identify */ case 'i': (void)ident_spell(FALSE); break; /* Go up or down in the dungeon */ case 'j': do_cmd_wiz_jump(); break; /* Self-Knowledge */ case 'k': self_knowledge(); break; /* Learn about objects */ case 'l': do_cmd_wiz_learn(); break; /* Magic Mapping */ case 'm': map_area(DETECT_RAD_ALL * 3); break; /* Mutation */ case 'M': (void)gain_random_mutation(command_arg); break; /* Reset Class */ case 'R': (void)do_cmd_wiz_reset_class(); break; /* Specific reward */ case 'r': (void)gain_level_reward(command_arg); break; /* Summon _friendly_ named monster */ case 'N': do_cmd_wiz_named_friendly(command_arg); break; /* Summon Named Monster */ case 'n': do_cmd_wiz_named(command_arg); break; /* Dump option bits usage */ case 'O': do_cmd_dump_options(); break; /* Object playing routines */ case 'o': do_cmd_wiz_play(); break; /* Phase Door */ case 'p': teleport_player(10, 0L); break; /* Complete a Quest -KMW- */ case 'q': if(p_ptr->inside_quest) { if (quest[p_ptr->inside_quest].status == QUEST_STATUS_TAKEN) { complete_quest(p_ptr->inside_quest); break; } } else { msg_print("No current quest"); msg_print(NULL); } break; /* Make every dungeon square "known" to test streamers -KMW- */ case 'u': for (y = 0; y < cur_hgt; y++) { for (x = 0; x < cur_wid; x++) { cave[y][x].info |= (CAVE_GLOW | CAVE_MARK); } } wiz_lite(FALSE); break; /* Summon Random Monster(s) */ case 's': if (command_arg <= 0) command_arg = 1; do_cmd_wiz_summon(command_arg); break; /* Special(Random Artifact) Objects */ case 'S': if (command_arg <= 0) command_arg = 1; acquirement(p_ptr->y, p_ptr->x, command_arg, TRUE, TRUE, TRUE); break; /* Teleport */ case 't': teleport_player(100, 0L); break; /* Very Good Objects */ case 'v': if (command_arg <= 0) command_arg = 1; acquirement(p_ptr->y, p_ptr->x, command_arg, TRUE, FALSE, TRUE); break; /* Wizard Light the Level */ case 'w': wiz_lite((bool)(p_ptr->pclass == CLASS_NINJA)); break; /* Increase Experience */ case 'x': gain_exp(command_arg ? command_arg : (p_ptr->exp + 1)); break; /* Zap Monsters (Genocide) */ case 'z': do_cmd_wiz_zap(); break; /* Zap Monsters (Omnicide) */ case 'Z': do_cmd_wiz_zap_all(); break; /* Hack -- whatever I desire */ case '_': do_cmd_wiz_hack_ben(); break; /* Not a Wizard Command */ default: msg_print("That is not a valid debug command."); break; } }
/* * do_cmd_mind calls this function if the player's class * is 'Aesthete'. */ static bool cast_aesthete_spell(int spell) { /* this will vary based on the spells, and what they depend on */ int plev = p_ptr->lev; int py = p_ptr->py; int px = p_ptr->px; int radius; /* spell code */ switch (spell) { case 0: /* Arrogant Laugh (almost bad) */ if ((plev * 2) > (randint(130) + 4)) { /* for staying in bounds of max 16 range */ radius = (plev * 3); /* paranoia */ if (radius > 16) { radius = 16; } msg_print("Creatures Cower in fear before you!"); project(-1, (plev * 3), py, px, radius, GF_TURN_ALL, PROJECT_KILL); } else { msg_print("Your Arrogant Laugh angers the monsters around you!"); aggravate_monsters(-1); } break; /* Treasure Sense */ case 1: if (plev > 45) { detect_traps(); } if (plev > 35) { detect_objects_magic(); } if (plev > 30) { detect_objects_normal(); } if (plev > 20) { detect_objects_gold(); } detect_treasure(); break; /* Enhance weapon */ case 2: if (plev > 45) { brand_weapon(); } else if (plev > 35) { (void)enchant_spell(rand_int(15) + 1, rand_int(15) + 1, 0); } else if (plev > 25) { (void)enchant_spell(rand_int(10) + 1, rand_int(10) + 1, 0); } else if (plev > 15) { (void)enchant_spell(rand_int(5) + 1, rand_int(5) + 1, 0); } else { (void)enchant_spell(rand_int(3) + 1, rand_int(3) + 1, 0); } break; /* Enhance Armor */ case 3: if (plev > 45) { (void)enchant_spell(0, 0, rand_int(20) + 1); } else if (plev > 35) { (void)enchant_spell(0, 0, rand_int(15) + 1); } else if (plev > 25) { (void)enchant_spell(0, 0, rand_int(10) + 1); } else if (plev > 15) { (void)enchant_spell(0, 0, rand_int(5) + 1); } else { (void)enchant_spell(0, 0, rand_int(3) + 1); } break; /* Legendary lore */ case 4: if (plev > 40) { identify_fully(); } else { ident_spell(); } break; case 5: teleport_player(plev * 2); break; case 6: recharge(plev * 3); break; case 7: alchemy(); break; case 8: set_recall(); break; case 9: break; case 10: break; case 11: break; case 12: break; case 13: break; case 14: break; case 15: break; case 16: break; case 17: break; case 18: break; case 19: break; case 20: break; } return TRUE; }
/* * do_cmd_mind calls this function if the player's class * is 'Naturalist'. */ static bool cast_nature_spell(int spell) { /* this will vary based on the spells, and what they depend on */ int plev = p_ptr->lev; int dir; int px = p_ptr->px; int py = p_ptr->py; /* spell code */ switch (spell) { case 0: /* Detect Creatures */ (void)detect_monsters_normal(); break; case 1: /* First Aid */ (void)hp_player(damroll(2, 8)); (void)set_cut(p_ptr->cut - 15); break; case 2: /* Detect Doors + Traps */ (void)detect_traps(); (void)detect_doors(); (void)detect_stairs(); break; case 3: /* Produce Food */ (void)set_food(PY_FOOD_MAX - 1); break; case 4: /* Daylight */ (void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1); break; case 5: /* Animal Taming */ if (!get_aim_dir(&dir)) return FALSE; (void)charm_animal(dir, plev); break; case 6: /* Resist Environment */ (void)set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); (void)set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); (void)set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); break; case 7: /* Cure Wounds + Poison */ (void)hp_player(damroll(plev, 8)); (void)set_cut(0); (void)set_poisoned(0); break; case 8: /* Stone to Mud */ if (!get_aim_dir(&dir)) return FALSE; (void)wall_to_mud(dir); break; case 9: /* Lightning Bolt */ if (!get_aim_dir(&dir)) return FALSE; fire_bolt_or_beam(100, GF_ELEC, dir, damroll(3 + ((plev - 5) / 4), 8)); break; case 10: /* Ray of Sunlight */ if (!get_aim_dir(&dir)) return FALSE; msg_print("A line of sunlight appears."); (void)lite_line(dir); break; case 11: /* Entangle */ slow_monsters(); break; case 12: /* Stone Skin */ (void)set_shield(p_ptr->shield + randint(20) + 30); break; case 13: /* Resistance True */ (void)set_oppose_acid(p_ptr->oppose_acid + randint(20) + 20); (void)set_oppose_elec(p_ptr->oppose_elec + randint(20) + 20); (void)set_oppose_fire(p_ptr->oppose_fire + randint(20) + 20); (void)set_oppose_cold(p_ptr->oppose_cold + randint(20) + 20); (void)set_oppose_pois(p_ptr->oppose_pois + randint(20) + 20); break; case 14: /* Stone Tell */ return identify_fully(); case 15: /* Earthquake */ earthquake(py, px, 10); break; case 16: /* Blizzard */ if (!get_aim_dir(&dir)) return FALSE; fire_ball(GF_COLD, dir, 70 + plev, (plev / 12) + 1); break; case 17: /* Lightning Storm */ if (!get_aim_dir(&dir)) return FALSE; fire_ball(GF_ELEC, dir, 90 + plev, (plev / 12) + 1); break; case 18: /* Whirlpool */ if (!get_aim_dir(&dir)) return FALSE; fire_ball(GF_WATER, dir, 100 + plev, (plev / 12) + 1); break; case 19: /* Call Sunlight */ fire_ball(GF_LITE, 0, 150, 8); wiz_lite(); break; case 20: /* Nature's Wrath */ (void)dispel_monsters(plev * 4); earthquake(py, px, 20 + (plev / 2)); project(0, 1 + plev / 12, py, px, 100 + plev, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM); break; default: msg_format("You cast an unknown Nature spell: %d.", spell); msg_print(NULL); } return TRUE; }