diff options
author | Bardur Arantsson <bardur@scientician.net> | 2019-02-15 19:20:26 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2019-02-15 19:20:26 +0100 |
commit | d30be7fdc42cd3d0280ebac497704ecc0f422d9b (patch) | |
tree | 8a6b3019e1d5709d837c0824c02cc9882ac8def2 | |
parent | c7d89d98768a97f5ae77ec7138875bd3de33515b (diff) |
Remove effects of standing on "the pattern"
It's doesn't seem to actually be used anywhere of consequence -- it
seems to only exist inside a permanent wall in Gondolin.
-rw-r--r-- | src/defines.hpp | 11 | ||||
-rw-r--r-- | src/dungeon.cc | 140 | ||||
-rw-r--r-- | src/generate.cc | 37 | ||||
-rw-r--r-- | src/melee2.cc | 12 | ||||
-rw-r--r-- | src/monster2.cc | 17 | ||||
-rw-r--r-- | src/q_rand.cc | 5 | ||||
-rw-r--r-- | src/spells1.cc | 14 | ||||
-rw-r--r-- | src/spells2.cc | 5 | ||||
-rw-r--r-- | src/xtra2.cc | 2 |
9 files changed, 13 insertions, 230 deletions
diff --git a/src/defines.hpp b/src/defines.hpp index 6b7e5a2b..16fe0951 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -507,17 +507,6 @@ /* Explosive rune */ #define FEAT_MINOR_GLYPH 0x40 -/* Pattern */ -#define FEAT_PATTERN_START 0x41 -#define FEAT_PATTERN_1 0x42 -#define FEAT_PATTERN_2 0x43 -#define FEAT_PATTERN_3 0x44 -#define FEAT_PATTERN_4 0x45 -#define FEAT_PATTERN_END 0x46 -#define FEAT_PATTERN_OLD 0x47 -#define FEAT_PATTERN_XTRA1 0x48 -#define FEAT_PATTERN_XTRA2 0x49 - /* Shops */ #define FEAT_SHOP 0x4A diff --git a/src/dungeon.cc b/src/dungeon.cc index b2527e30..e0ead4bc 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -101,121 +101,6 @@ static bool granted_resurrection() } /* - * Go to any level (ripped off from wiz_jump) - */ -static void pattern_teleport() -{ - /* Ask for level */ - if (get_check("Teleport level? ")) - { - char ppp[80]; - - char tmp_val[160]; - - /* Prompt */ - sprintf(ppp, "Teleport to level (0-%d): ", 99); - - /* Default */ - sprintf(tmp_val, "%d", dun_level); - - /* Ask for a level */ - if (!get_string(ppp, tmp_val, 10)) return; - - /* Extract request */ - command_arg = atoi(tmp_val); - } - else if (get_check("Normal teleport? ")) - { - teleport_player(200); - return; - } - else - { - return; - } - - /* Paranoia */ - if (command_arg < 0) command_arg = 0; - - /* Paranoia */ - if (command_arg > 99) command_arg = 99; - - /* Accept request */ - msg_format("You teleport to dungeon level %d.", command_arg); - - autosave_checkpoint(); - - /* Change level */ - dun_level = command_arg; - - /* Leaving */ - p_ptr->leaving = true; -} - - -/* - * Returns true if we are on the Straight Road... - */ -static bool pattern_effect() -{ - if ((cave[p_ptr->py][p_ptr->px].feat < FEAT_PATTERN_START) || - (cave[p_ptr->py][p_ptr->px].feat > FEAT_PATTERN_XTRA2)) - { - return false; - } - - if (cave[p_ptr->py][p_ptr->px].feat == FEAT_PATTERN_END) - { - set_poisoned(0); - set_image(0); - set_stun(0); - set_cut(0); - set_blind(0); - set_afraid(0); - do_res_stat(A_STR, true); - do_res_stat(A_INT, true); - do_res_stat(A_WIS, true); - do_res_stat(A_DEX, true); - do_res_stat(A_CON, true); - do_res_stat(A_CHR, true); - restore_level(); - hp_player(1000); - cave_set_feat(p_ptr->py, p_ptr->px, FEAT_PATTERN_OLD); - msg_print("This section of the Straight Road looks less powerful."); - } - - - /* - * We could make the healing effect of the - * Pattern center one-time only to avoid various kinds - * of abuse, like luring the win monster into fighting you - * in the middle of the pattern... - */ - else if (cave[p_ptr->py][p_ptr->px].feat == FEAT_PATTERN_OLD) - { - /* No effect */ - } - else if (cave[p_ptr->py][p_ptr->px].feat == FEAT_PATTERN_XTRA1) - { - pattern_teleport(); - } - else if (cave[p_ptr->py][p_ptr->px].feat == FEAT_PATTERN_XTRA2) - { - if (!(p_ptr->invuln)) - take_hit(200, "walking the corrupted Straight Road"); - } - - else - { - if (!(p_ptr->invuln)) - take_hit(damroll(1, 3), "walking the Straight Road"); - } - - return true; -} - - -/* * If player has inscribed the object with "!!", let him know when it's * recharged. -LM- */ @@ -1535,18 +1420,10 @@ static void process_world() } } - /* Are we walking the pattern? */ - if (!p_ptr->wild_mode && pattern_effect()) - { - cave_no_regen = true; - } - else + /* Regeneration ability */ + if (p_ptr->regenerate) { - /* Regeneration ability */ - if (p_ptr->regenerate) - { - regen_amount = regen_amount * 2; - } + regen_amount = regen_amount * 2; } @@ -1687,16 +1564,7 @@ static void process_world() /* Regenerate Hit Points if needed */ if ((p_ptr->chp < p_ptr->mhp) && !cave_no_regen) { - if ((cave[p_ptr->py][p_ptr->px].feat < FEAT_PATTERN_END) && - (cave[p_ptr->py][p_ptr->px].feat >= FEAT_PATTERN_START)) - { - /* Hmmm. this should never happen? */ - regenhp(regen_amount / 5); - } - else - { - regenhp(regen_amount); - } + regenhp(regen_amount); } diff --git a/src/generate.cc b/src/generate.cc index 7ab2ecf5..7fc94217 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -3482,45 +3482,18 @@ static void build_vault(int yval, int xval, int ymax, int xmax, std::string cons break; } - case 'p': - { - cave_set_feat(y, x, FEAT_PATTERN_START); - break; - } - case 'a': - { - cave_set_feat(y, x, FEAT_PATTERN_1); - break; - } - case 'b': - { - cave_set_feat(y, x, FEAT_PATTERN_2); - break; - } - case 'c': - { - cave_set_feat(y, x, FEAT_PATTERN_3); - break; - } - case 'd': - { - cave_set_feat(y, x, FEAT_PATTERN_4); - break; - } - case 'P': - { - cave_set_feat(y, x, FEAT_PATTERN_END); - break; - } - case 'B': + case 'p': { - cave_set_feat(y, x, FEAT_PATTERN_XTRA1); + // Guard against vaults containing "the pattern". + // There should be no vaults that do, but let's just + // make sure. + abort(); break; } diff --git a/src/melee2.cc b/src/melee2.cc index 9ad37306..3e697f7e 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -579,10 +579,6 @@ static bool summon_possible(int y1, int x1) /* Nor on the between */ if (cave[y][x].feat == FEAT_BETWEEN) return false; - /* ...nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) - && (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) continue; - /* Require empty floor grid in line of sight */ if (cave_empty_bold(y, x) && los(y1, x1, y, x)) return true; } @@ -5995,14 +5991,6 @@ static void process_monster(int m_idx) do_turn = true; } - if ((cave[ny][nx].feat >= FEAT_PATTERN_START) && - (cave[ny][nx].feat <= FEAT_PATTERN_XTRA2) && - do_turn == false) - { - do_move = false; - } - - /* A monster is in the way */ if (do_move && c_ptr->m_idx) { diff --git a/src/monster2.cc b/src/monster2.cc index 8233d2bd..753b1627 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -2050,13 +2050,6 @@ s16b place_monster_one(int y, int x, int r_idx, int ego, bool slp, int status) return 0; } - /* Nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) - && (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) - { - return 0; - } - /* Paranoia */ if (!r_idx) { @@ -3212,11 +3205,6 @@ bool summon_specific(int y1, int x1, int lev, int type) /* Nor on the between */ if (cave[y][x].feat == FEAT_BETWEEN) return false; - /* ... nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) && - (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) - continue; - /* Okay */ break; } @@ -3296,11 +3284,6 @@ bool summon_specific_friendly(int y1, int x1, int lev, int type, bool Group_ok) /* Nor on the between */ if (cave[y][x].feat == FEAT_BETWEEN) return false; - /* ... nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) && - (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) - continue; - /* Okay */ break; } diff --git a/src/q_rand.cc b/src/q_rand.cc index 68367d3f..8c244d0b 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -369,11 +369,6 @@ static void hero_death(s32b m_idx, s32b r_idx) /* Nor on the between */ if (cave[y][x].feat == FEAT_BETWEEN) continue; - /* ... nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) && - (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) - continue; - /* Okay */ break; } diff --git a/src/spells1.cc b/src/spells1.cc index b88ef636..d805ea08 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -307,10 +307,6 @@ void teleport_away(int m_idx, int dis) if (cave[ny][nx].feat == FEAT_GLYPH) continue; if (cave[ny][nx].feat == FEAT_MINOR_GLYPH) continue; - /* ...nor onto the Pattern */ - if ((cave[ny][nx].feat >= FEAT_PATTERN_START) && - (cave[ny][nx].feat <= FEAT_PATTERN_XTRA2)) continue; - /* No teleporting into vaults and such */ if (!(p_ptr->inside_quest)) if (cave[ny][nx].info & (CAVE_ICKY)) continue; @@ -425,10 +421,6 @@ static void teleport_to_player(int m_idx) if (cave[ny][nx].feat == FEAT_GLYPH) continue; if (cave[ny][nx].feat == FEAT_MINOR_GLYPH) continue; - /* ...nor onto the Pattern */ - if ((cave[ny][nx].feat >= FEAT_PATTERN_START) && - (cave[ny][nx].feat <= FEAT_PATTERN_XTRA2)) continue; - /* No teleporting into vaults and such */ /* if (cave[ny][nx].info & (CAVE_ICKY)) continue; */ @@ -8121,10 +8113,10 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg) /* Ball explosions are stopped by walls */ if (typ == GF_DISINTEGRATE) { - if (cave_valid_bold(y, x) && - (cave[y][x].feat < FEAT_PATTERN_START - || cave[y][x].feat > FEAT_PATTERN_XTRA2)) + if (cave_valid_bold(y, x)) + { cave_set_feat(y, x, FEAT_FLOOR); + } /* Update some things -- similar to GF_KILL_WALL */ p_ptr->update |= (PU_VIEW | PU_FLOW | PU_MONSTERS | PU_MON_LITE); diff --git a/src/spells2.cc b/src/spells2.cc index 316f0f39..cadaed2d 100644 --- a/src/spells2.cc +++ b/src/spells2.cc @@ -3259,11 +3259,6 @@ void earthquake(int cy, int cx, int r) if (cave[y][x].feat == FEAT_GLYPH) continue; if (cave[y][x].feat == FEAT_MINOR_GLYPH) continue; - /* ... nor on the Pattern */ - if ((cave[y][x].feat <= FEAT_PATTERN_XTRA2) && - (cave[y][x].feat >= FEAT_PATTERN_START)) - continue; - /* Important -- Skip "quake" grids */ if (map[16 + y - cy][16 + x - cx]) continue; diff --git a/src/xtra2.cc b/src/xtra2.cc index 21c76dc3..2a5d38a1 100644 --- a/src/xtra2.cc +++ b/src/xtra2.cc @@ -4216,7 +4216,7 @@ static int target_set_aux(int y, int x, int mode, const char *info_) /* Pick a prefix */ if (*s2 && (((feat >= FEAT_MINOR_GLYPH) && - (feat <= FEAT_PATTERN_XTRA2)) || + (feat < FEAT_SHOP)) || (feat == FEAT_DIRT) || (feat == FEAT_GRASS) || (feat == FEAT_FLOWER))) s2 = "on "; |