OSDN Git Service

プレイヤーのテレポートに受動テレポートモードを与えた. 主に自分の意志
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 6 Dec 2003 08:39:59 +0000 (08:39 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 6 Dec 2003 08:39:59 +0000 (08:39 +0000)
とは関係のない強制テレポートに用いられる. 受動テレポートではテレポー
ト先の地形にTELEPORTABLEさえあればプレイヤーの状態全てを無視する. 関
連して, 以下の変更を含む.
* 全てのトラップにTELEPORTABLE追加. 発見されていて完全に安全と分かっ
  ているトラップには能動テレポートでも飛ぶ場合がある.
* new_player_spot()でプレイヤーを配置するルールを変更. max_attemptsを
  10000回に増やし, 前半5000回でFLOOR && TELEPORTABLEを優先的に探し,
  それに失敗したら後半5000回でMOVE && TELEPORTABLE && !HIT_TRAPの条件
  でプレイヤー配置を試みる. FLOORのないダンジョンへの対策.

21 files changed:
lib/edit/f_info.txt
src/artifact.c
src/cmd1.c
src/cmd5.c
src/cmd6.c
src/dungeon.c
src/externs.h
src/grid.c
src/hissatsu.c
src/mane.c
src/melee1.c
src/mind.c
src/mspells1.c
src/mspells2.c
src/mspells3.c
src/mutation.c
src/racial.c
src/spells1.c
src/spells2.c
src/spells3.c
src/wizard2.c

index 2386a6c..621fd34 100644 (file)
@@ -68,7 +68,8 @@ M:FLOOR
 W:2
 K:DESTROYED:*FLOOR*
 K:SECRET:INVIS
-F:LOS | PROJECT | MOVE | PLACE | SECRET | TRAP | HIT_TRAP | CAN_FLY | HURT_DISI
+F:LOS | PROJECT | MOVE | PLACE | SECRET | TRAP | HIT_TRAP | CAN_FLY |
+F:HURT_DISI | TELEPORTABLE
 
 # 0x03 --> glyph of warding
 
@@ -195,7 +196,7 @@ G:^:w:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:MORE | HIT_TRAP | CAN_FLY | HURT_DISI
+F:MORE | HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x11 --> visible trap -- open pit
 
@@ -206,7 +207,7 @@ G:^:s:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x12 --> visible trap -- spiked pit
 
@@ -218,7 +219,7 @@ M:TRAP_PIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x13 --> visible trap -- poison pit
 
@@ -230,7 +231,7 @@ M:TRAP_PIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x14 --> visible trap -- rune -- summon
 
@@ -242,7 +243,7 @@ W:2
 K:DESTROYED:*FLOOR*
 K:HIT_TRAP:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x15 --> visible trap -- rune -- teleport
 
@@ -253,7 +254,7 @@ G:^:o:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x16 --> visible trap -- spot -- fire
 
@@ -264,7 +265,7 @@ G:^:u:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x17 --> visible trap -- spot -- acid
 
@@ -276,7 +277,7 @@ M:TRAP_FIRE
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x18 --> visible trap -- dart -- slow
 
@@ -287,7 +288,7 @@ G:^:r:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x19 --> visible trap -- dart -- lose str
 
@@ -299,7 +300,7 @@ M:TRAP_SLOW
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1A --> visible trap -- dart -- lose dex
 
@@ -311,7 +312,7 @@ M:TRAP_SLOW
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1B --> visible trap -- dart -- lose con
 
@@ -323,7 +324,7 @@ M:TRAP_SLOW
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1C --> visible trap -- gas -- blind
 
@@ -334,7 +335,7 @@ G:^:g:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1D --> visible trap -- gas -- confuse
 
@@ -346,7 +347,7 @@ M:TRAP_BLIND
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1E --> visible trap -- gas -- poison
 
@@ -358,7 +359,7 @@ M:TRAP_BLIND
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x1F --> visible trap -- gas -- sleep
 
@@ -370,7 +371,7 @@ M:TRAP_BLIND
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 # 0x2x --> locked door (power 0)
 
@@ -992,8 +993,8 @@ J:
 E:shallow water
 G:~:B:LIT
 W:2
-F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | WATER | SHALLOW | CAN_FLY |
-F:CAN_SWIM | TELEPORTABLE
+F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | WATER | SHALLOW |
+F:CAN_FLY | CAN_SWIM | TELEPORTABLE
 
 N:85:DEEP_LAVA
 J:¿¼¤¤ÍÏ´äί¤ê
@@ -1040,7 +1041,7 @@ W:2
 K:DESTROYED:*FLOOR*
 K:HIT_TRAP:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 N:91:TRAP_ALARM
 J:·ÙÊóÁõÃÖ
@@ -1049,7 +1050,7 @@ G:^:R:LIT
 W:2
 K:DESTROYED:*FLOOR*
 F:POWER_5 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM | TRAP |
-F:HIT_TRAP | CAN_FLY | HURT_DISI
+F:HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 N:92:TRAP_OPEN
 J:³«Ì祹¥¤¥Ã¥Á
@@ -1058,7 +1059,7 @@ G:^:w:LIT
 W:10
 K:DESTROYED:*FLOOR*
 F:POWER_100 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM |
-F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI
+F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 N:93:FLOWER
 J:²Ö
@@ -1369,7 +1370,7 @@ W:10
 F:POWER_31 | LOS | PROJECT | MOVE | NOTICE | REMEMBER | DOOR | PERMANENT |
 F:GLOW | BLDG
 
-#### Special fake terrains ####
+#### Special fake terrains (160-166) ####
 
 N:160:*FLOOR*
 M:FLOOR
@@ -1420,8 +1421,8 @@ J:
 E:swamp
 G:.:B:LIT
 W:2
-F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | WATER | SHALLOW | CAN_FLY |
-F:CAN_SWIM | TELEPORTABLE
+F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | WATER | SHALLOW |
+F:CAN_FLY | CAN_SWIM | TELEPORTABLE
 
 N:195:MIRROR
 J:¶À
@@ -1446,7 +1447,7 @@ W:10
 K:DESTROYED:*FLOOR*
 K:HIT_TRAP:*FLOOR*
 F:POWER_100 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM |
-F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI
+F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
 
 N:198:TRAP_PIRANHA
 J:¥Ô¥é¥Ë¥¢¡¦¥È¥é¥Ã¥×
@@ -1456,4 +1457,4 @@ W:10
 K:DESTROYED:*FLOOR*
 K:HIT_TRAP:*FLOOR*
 F:POWER_100 | LOS | PROJECT | MOVE | PLACE | NOTICE | REMEMBER | DISARM |
-F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI
+F:TRAP | HIT_TRAP | CAN_FLY | HURT_DISI | TELEPORTABLE
index f782bcd..b7c0d67 100644 (file)
@@ -2992,7 +2992,7 @@ bool activate_random_artifact(object_type * o_ptr)
                        msg_print("It twists space around you...");
 #endif
 
-                       teleport_player(100);
+                       teleport_player(100, FALSE);
                        o_ptr->timeout = 45;
                        break;
                }
index 3615ef2..4bde246 100644 (file)
@@ -1335,7 +1335,7 @@ static void hit_trap(bool break_trap)
                        msg_print("You hit a teleport trap!");
 #endif
 
-                       teleport_player(100);
+                       teleport_player(100, TRUE);
                        break;
                }
 
@@ -3667,6 +3667,43 @@ bool move_player_effect(int oy, int ox, int ny, int nx, u32b mpe_mode)
 }
 
 
+bool trap_can_be_ignored(int feat)
+{
+       switch (feat)
+       {
+       case FEAT_TRAP_TRAPDOOR:
+       case FEAT_TRAP_PIT:
+       case FEAT_TRAP_SPIKED_PIT:
+       case FEAT_TRAP_POISON_PIT:
+               if (p_ptr->ffall) return TRUE;
+               break;
+       case FEAT_TRAP_TELEPORT:
+               if (p_ptr->anti_tele) return TRUE;
+               break;
+       case FEAT_TRAP_FIRE:
+               if (p_ptr->immune_fire) return TRUE;
+               break;
+       case FEAT_TRAP_ACID:
+               if (p_ptr->immune_acid) return TRUE;
+               break;
+       case FEAT_TRAP_BLIND:
+               if (p_ptr->resist_blind) return TRUE;
+               break;
+       case FEAT_TRAP_CONFUSE:
+               if (p_ptr->resist_conf) return TRUE;
+               break;
+       case FEAT_TRAP_POISON:
+               if (p_ptr->resist_pois) return TRUE;
+               break;
+       case FEAT_TRAP_SLEEP:
+               if (p_ptr->free_act) return TRUE;
+               break;
+       }
+
+       return FALSE;
+}
+
+
 /*
  * Determine if a "boundary" grid is "floor mimic"
  */
@@ -3992,39 +4029,7 @@ void move_player(int dir, bool do_pickup, bool break_trap)
        /* Disarm a visible trap */
        else if ((do_pickup != easy_disarm) && have_flag(f_ptr->flags, FF_DISARM) && !c_ptr->mimic)
        {
-               bool ignore = FALSE;
-               switch (c_ptr->feat)
-               {
-                       case FEAT_TRAP_TRAPDOOR:
-                       case FEAT_TRAP_PIT:
-                       case FEAT_TRAP_SPIKED_PIT:
-                       case FEAT_TRAP_POISON_PIT:
-                               if (p_ptr->ffall) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_TELEPORT:
-                               if (p_ptr->anti_tele) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_FIRE:
-                               if (p_ptr->immune_fire) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_ACID:
-                               if (p_ptr->immune_acid) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_BLIND:
-                               if (p_ptr->resist_blind) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_CONFUSE:
-                               if (p_ptr->resist_conf) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_POISON:
-                               if (p_ptr->resist_pois) ignore = TRUE;
-                               break;
-                       case FEAT_TRAP_SLEEP:
-                               if (p_ptr->free_act) ignore = TRUE;
-                               break;
-               }
-
-               if (!ignore)
+               if (!trap_can_be_ignored(c_ptr->feat))
                {
                        (void)do_cmd_disarm_aux(y, x, dir);
                        return;
index 2f917f6..8ecba58 100644 (file)
@@ -915,16 +915,16 @@ static void wild_magic(int spell)
        case 1:
        case 2:
        case 3:
-               teleport_player(10);
+               teleport_player(10, TRUE);
                break;
        case 4:
        case 5:
        case 6:
-               teleport_player(100);
+               teleport_player(100, TRUE);
                break;
        case 7:
        case 8:
-               teleport_player(200);
+               teleport_player(200, TRUE);
                break;
        case 9:
        case 10:
@@ -1173,7 +1173,7 @@ static bool cast_sorcery_spell(int spell)
                (void)detect_monsters_normal(DETECT_RAD_DEFAULT);
                break;
        case 1: /* Phase Door */
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
        case 2: /* Detect Doors and Traps */
                (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
@@ -1189,7 +1189,7 @@ static bool cast_sorcery_spell(int spell)
                (void)confuse_monster(dir, (plev * 3) / 2);
                break;
        case 5: /* Teleport */
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case 6: /* Sleep Monster */
                if (!get_aim_dir(&dir)) return FALSE;
@@ -1603,7 +1603,7 @@ msg_print("
                        damroll(8 + ((plev - 5) / 4), 8), 0);
                break;
        case 7: /* Teleport Self */
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case 8: /* Wonder */
                {
@@ -2295,7 +2295,7 @@ static bool cast_trump_spell(int spell, bool success)
                case 0: /* Phase Door */
                        if (success)
                        {
-                               teleport_player(10);
+                               teleport_player(10, FALSE);
                        }
                        break;
                case 1: /* Trump Spiders */
@@ -2454,7 +2454,7 @@ msg_print("
                                        msg_print("It's a teleport trump card.");
 #endif
 
-                                       teleport_player(10);
+                                       teleport_player(10, TRUE);
                                }
                                else if (die < 42)
                                {
@@ -2474,7 +2474,7 @@ msg_print("
                                        msg_print("It's a teleport trump card.");
 #endif
 
-                                       teleport_player(100);
+                                       teleport_player(100, TRUE);
                                }
                                else if (die < 52)
                                {
@@ -2484,7 +2484,7 @@ msg_print("
                                        msg_print("It's a teleport trump card.");
 #endif
 
-                                       teleport_player(200);
+                                       teleport_player(200, TRUE);
                                }
                                else if (die < 60)
                                {
@@ -2647,7 +2647,7 @@ msg_print("
                case 4: /* Teleport Self */
                        if (success)
                        {
-                               teleport_player(plev * 4);
+                               teleport_player(plev * 4, FALSE);
                        }
                        break;
                case 5: /* Trump Spying */
@@ -3290,7 +3290,7 @@ static bool cast_arcane_spell(int spell)
                (void)detect_monsters_normal(DETECT_RAD_DEFAULT);
                break;
        case 4: /* Blink */
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
        case 5: /* Light Area */
                (void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
@@ -3342,7 +3342,7 @@ static bool cast_arcane_spell(int spell)
                (void)set_cut((p_ptr->cut / 2) - 50);
                break;
        case 19: /* Teleport */
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case 20: /* Identify */
                return ident_spell(FALSE);
@@ -3925,7 +3925,7 @@ static bool cast_crusade_spell(int spell)
                (void)sleep_monsters_touch();
                break;
        case 5:
-               teleport_player(25+plev/2);
+               teleport_player(25 + plev / 2, FALSE);
                break;
        case 6:
                if (!get_aim_dir(&dir)) return FALSE;
index e085d19..3aaf72f 100644 (file)
@@ -884,7 +884,7 @@ static void do_cmd_quaff_potion_aux(int item)
                                        ident = TRUE;
                                        if (one_in_(3)) lose_all_info();
                                        else wiz_dark();
-                                       teleport_player(100);
+                                       teleport_player(100, TRUE);
                                        wiz_dark();
 #ifdef JP
 msg_print("ÃΤé¤Ê¤¤¾ì½ê¤ÇÌܤ¬Àä᤿¡£Æ¬Äˤ¬¤¹¤ë¡£");
@@ -1719,14 +1719,14 @@ static void do_cmd_read_scroll_aux(int item, bool known)
 
                case SV_SCROLL_PHASE_DOOR:
                {
-                       teleport_player(10);
+                       teleport_player(10, FALSE);
                        ident = TRUE;
                        break;
                }
 
                case SV_SCROLL_TELEPORT:
                {
-                       teleport_player(100);
+                       teleport_player(100, FALSE);
                        ident = TRUE;
                        break;
                }
@@ -2370,7 +2370,7 @@ static int staff_effect(int sval, bool *use_charge, bool magic, bool known)
 
                case SV_STAFF_TELEPORTATION:
                {
-                       teleport_player(100);
+                       teleport_player(100, FALSE);
                        ident = TRUE;
                        break;
                }
@@ -4597,7 +4597,7 @@ msg_print("ŷ
                                msg_print("Your cloak twists space around you...");
 #endif
 
-                               teleport_player(100);
+                               teleport_player(100, FALSE);
                                o_ptr->timeout = 45;
                                break;
                        }
@@ -4816,10 +4816,10 @@ msg_print("ŷ
                                switch (randint1(13))
                                {
                                case 1: case 2: case 3: case 4: case 5:
-                                       teleport_player(10);
+                                       teleport_player(10, FALSE);
                                        break;
                                case 6: case 7: case 8: case 9: case 10:
-                                       teleport_player(222);
+                                       teleport_player(222, FALSE);
                                        break;
                                case 11: case 12:
                                        (void)stair_creation();
@@ -4844,7 +4844,7 @@ if (get_check("
 
                        case ART_KAMUI:
                        {
-                               teleport_player(222);
+                               teleport_player(222, FALSE);
                                o_ptr->timeout = 25;
                                break;
                        }
@@ -5857,7 +5857,7 @@ msg_print("
 
        if (o_ptr->name2 == EGO_TRUMP)
        {
-               teleport_player(100);
+               teleport_player(100, FALSE);
                o_ptr->timeout = 50 + randint1(50);
 
                /* Window stuff */
@@ -5905,7 +5905,7 @@ msg_print("
 
        if (o_ptr->name2 == EGO_JUMP)
        {
-               teleport_player(10);
+               teleport_player(10, FALSE);
                o_ptr->timeout = 10 + randint1(10);
 
                /* Window stuff */
@@ -6327,11 +6327,11 @@ msg_print("
                                o_ptr->timeout = 200;
                                break;
                        case EGO_AMU_JUMP:
-                               teleport_player(10);
+                               teleport_player(10, FALSE);
                                o_ptr->timeout = randint0(10) + 10;
                                break;
                        case EGO_AMU_TELEPORT:
-                               teleport_player(100);
+                               teleport_player(100, FALSE);
                                o_ptr->timeout = randint0(50) + 50;
                                break;
                        case EGO_AMU_D_DOOR:
index 2f52e41..2a970f5 100644 (file)
@@ -641,7 +641,7 @@ static void pattern_teleport(void)
 #endif
 
        {
-               teleport_player(200);
+               teleport_player(200, FALSE);
                return;
        }
        else
@@ -2707,7 +2707,7 @@ static void process_world_aux_mutation(void)
 #endif
 
                        msg_print(NULL);
-                       teleport_player(40);
+                       teleport_player(40, TRUE);
                }
        }
 
@@ -2737,7 +2737,7 @@ static void process_world_aux_mutation(void)
                                msg_print(NULL);
                                if (one_in_(3)) lose_all_info();
                                else wiz_dark();
-                               teleport_player(100);
+                               teleport_player(100, TRUE);
                                wiz_dark();
 #ifdef JP
                                msg_print("¤¢¤Ê¤¿¤Ï¸«ÃΤé¤Ì¾ì½ê¤ÇÌܤ¬Àä᤿...Ƭ¤¬Äˤ¤¡£");
@@ -3328,7 +3328,7 @@ static void process_world_aux_curse(void)
 #endif
                        {
                                disturb(0, 0);
-                               teleport_player(50);
+                               teleport_player(50, FALSE);
                        }
                        else
                        {
@@ -3495,7 +3495,7 @@ static void process_world_aux_curse(void)
                        disturb(0, 0);
 
                        /* Teleport player */
-                       teleport_player(40);
+                       teleport_player(40, TRUE);
                }
                /* Handle HP draining */
                if ((p_ptr->cursed & TRC_DRAIN_HP) && one_in_(666))
index 6af2485..6158022 100644 (file)
@@ -660,6 +660,7 @@ extern bool py_attack(int y, int x, int mode);
 extern bool pattern_seq(int c_y, int c_x, int n_y, int n_x);
 extern bool player_can_enter(s16b feature, u16b mode);
 extern bool move_player_effect(int oy, int ox, int ny, int nx, u32b mpe_mode);
+extern bool trap_can_be_ignored(int feat);
 extern void move_player(int dir, bool do_pickup, bool break_trap);
 extern void run_step(int dir);
 
@@ -1126,9 +1127,9 @@ extern void remove_all_mirrors(bool explode);
 /* spells3.c */
 extern bool teleport_away(int m_idx, int dis, bool dec_valour);
 extern void teleport_monster_to(int m_idx, int ty, int tx, int power);
-extern bool cave_teleportable_bold(int y, int x);
-extern void teleport_player(int dis);
-extern void teleport_player_to(int ny, int nx, bool no_tele);
+extern bool cave_teleportable_bold(int y, int x, bool passive);
+extern void teleport_player(int dis, bool passive);
+extern void teleport_player_to(int ny, int nx, bool no_tele, bool passive);
 extern void teleport_level(int m_idx);
 extern int choose_dungeon(cptr note, int y, int x);
 extern bool recall_player(int turns);
index 07b1ef5..97a3e82 100644 (file)
 bool new_player_spot(void)
 {
        int     y, x;
-       int max_attempts = 5000;
+       int max_attempts = 10000;
 
        cave_type *c_ptr;
+       feature_type *f_ptr;
 
        /* Place the player */
        while (max_attempts--)
@@ -39,8 +40,20 @@ bool new_player_spot(void)
                if (c_ptr->m_idx) continue;
                if (dun_level)
                {
-                       if (!have_flag(f_flags_grid(c_ptr), FF_MOVE)) continue;
-                       if (!have_flag(f_flags_grid(c_ptr), FF_TELEPORTABLE)) continue;
+                       f_ptr = &f_info[c_ptr->feat];
+
+                       if (max_attempts > 5000) /* Rule 1 */
+                       {
+                               if (!have_flag(f_ptr->flags, FF_FLOOR)) continue;
+                       }
+                       else /* Rule 2 */
+                       {
+                               if (!have_flag(f_ptr->flags, FF_MOVE)) continue;
+                               if (have_flag(f_ptr->flags, FF_HIT_TRAP)) continue;
+                       }
+
+                       /* Refuse to start on anti-teleport grids in dungeon */
+                       if (!have_flag(f_ptr->flags, FF_TELEPORTABLE)) continue;
                }
                if (!player_can_enter(c_ptr->feat, 0)) continue;
                if (!in_bounds(y, x)) continue;
index 87ec9c9..a3e85d7 100644 (file)
@@ -984,7 +984,7 @@ static bool cast_hissatsu_spell(int spell)
        case 27:
        {
                if (!tgt_pt(&x, &y)) return FALSE;
-               if (!cave_teleportable_bold(y, x) ||
+               if (!cave_teleportable_bold(y, x, FALSE) ||
                    (distance(y, x, py, px) > MAX_SIGHT / 2) ||
                    !projectable(py, px, y, x))
                {
@@ -1006,7 +1006,7 @@ static bool cast_hissatsu_spell(int spell)
                        break;
                }
                project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
-               teleport_player_to(y, x, TRUE);
+               teleport_player_to(y, x, TRUE, FALSE);
                break;
        }
        case 28:
index 25d6fca..27a3b52 100644 (file)
@@ -915,10 +915,10 @@ msg_print("̵
                (void)set_invuln(randint1(7) + 7, FALSE);
                break;
        case MS_BLINK:
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
        case MS_TELEPORT:
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case MS_WORLD:
                world_player = TRUE;
index d0a11b5..1949da5 100644 (file)
@@ -1974,8 +1974,9 @@ msg_format("%s
                                                        r_ptr->r_flagsr |= (r_ptr->flagsr & RFR_EFF_RES_SHAR_MASK);
                                        }
 
-                                       if (is_mirror_grid(&cave[py][px])) {
-                                               teleport_player(10);
+                                       if (is_mirror_grid(&cave[py][px]))
+                                       {
+                                               teleport_player(10, FALSE);
                                        }
                                }
 
index b827380..98f6561 100644 (file)
@@ -889,11 +889,11 @@ if (!b) msg_print("
                break;
        case 2:
                /* Minor displace */
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
        case 3:
                /* Major displace */
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case 4:
                /* Domination */
@@ -1325,7 +1325,7 @@ msg_format("There are too many mirrors to control!");
          break;
        /* warped mirror */
        case 3:
-         teleport_player(10);
+         teleport_player(10, FALSE);
          break;
        /* mirror of light */
        case 4:
@@ -1333,7 +1333,7 @@ msg_format("There are too many mirrors to control!");
          break;
        /* mirror of wandering */
        case 5:
-         teleport_player(plev * 5);
+         teleport_player(plev * 5, FALSE);
          break;
        /* robe of dust */
        case 6:
@@ -1584,7 +1584,7 @@ static bool cast_ninja_spell(int spell)
                break;
        case 2:
        {
-               teleport_player(10);
+               teleport_player(10, FALSE);
                if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
                else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
                break;
@@ -1606,7 +1606,7 @@ static bool cast_ninja_spell(int spell)
        }
        case 4:
        {
-               teleport_player(p_ptr->lev*5);
+               teleport_player(p_ptr->lev * 5, FALSE);
                if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
                else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
                break;
@@ -1627,7 +1627,7 @@ msg_print("
 #endif
                        else
                        {
-                               teleport_player(30);
+                               teleport_player(30, FALSE);
                                if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
                                else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
                        }
@@ -1657,7 +1657,7 @@ msg_print("
                break;
        case 9:
                fire_ball(GF_FIRE, 0, 50+plev, plev/10+2);
-               teleport_player(30);
+               teleport_player(30, FALSE);
                if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
                else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
                set_oppose_fire(plev, FALSE);
@@ -1786,7 +1786,7 @@ msg_print("
                fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
                fire_ball(GF_OLD_DRAIN, 0, 75+plev*2/3, plev/5+2);
                fire_ball(GF_CONFUSION, 0, 75+plev*2/3, plev/5+2);
-               teleport_player(30);
+               teleport_player(30, FALSE);
                if (cave[py][px].info & (CAVE_GLOW | CAVE_MNLT)) set_superstealth(FALSE);
                else if (p_ptr->cur_lite <= 0) set_superstealth(TRUE);
                break;
@@ -2064,8 +2064,7 @@ msg_print("
 #else
                                        msg_print("Weird visions seem to dance before your eyes...");
 #endif
-                                       teleport_player(10);
-                                       
+                                       teleport_player(10, TRUE);
                                }
                                else if (b < 96)
                                {
index 538ea89..43f0904 100644 (file)
@@ -3439,28 +3439,28 @@ msg_format("%^s
                                for (i=INVEN_RARM;i<INVEN_TOTAL;i++)
                                {
                                        o_ptr = &inventory[i];
-                                       if(!cursed_p(o_ptr))
+                                       if (!cursed_p(o_ptr))
                                        {
                                                object_flags(o_ptr, flgs);
 
-                                               if((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
+                                               if ((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
                                                {
 #ifdef JP
-                                                       if(get_check_strict("¤Ä¤¤¤Æ¤¤¤­¤Þ¤¹¤«¡©", CHECK_OKAY_CANCEL))
+                                                       if (get_check_strict("¤Ä¤¤¤Æ¤¤¤­¤Þ¤¹¤«¡©", CHECK_OKAY_CANCEL))
 #else
-                                                       if(get_check_strict("Do you follow it? ", CHECK_OKAY_CANCEL))
+                                                       if (get_check_strict("Do you follow it? ", CHECK_OKAY_CANCEL))
 #endif
                                                        {
                                                                if (one_in_(3))
                                                                {
-                                                                       teleport_player(200);
+                                                                       teleport_player(200, TRUE);
 #ifdef JP
                                                                        msg_print("¼ºÇÔ¡ª");
 #else
                                                                        msg_print("Failed!");
 #endif
                                                                }
-                                                               else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
+                                                               else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, FALSE);
                                                                p_ptr->energy_need += ENERGY_NEED();
                                                        }
                                                        break;
@@ -3605,7 +3605,7 @@ msg_format("%^s
                                                msg_format("%^s holds you, and drops from the sky.", m_name);
 #endif
                                                dam = damroll(4, 8);
-                                               teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE);
+                                               teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE, TRUE);
 
                                                sound(SOUND_FALL);
 
@@ -3669,7 +3669,7 @@ msg_format("%^s
                        msg_format("%^s commands you to return.", m_name);
 #endif
 
-                       teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
+                       teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, TRUE);
                        learn_spell(MS_TELE_TO);
                        break;
                }
@@ -3688,7 +3688,7 @@ msg_format("%^s
 #endif
 
                        learn_spell(MS_TELE_AWAY);
-                       teleport_player(100);
+                       teleport_player(100, TRUE);
                        break;
                }
 
index c94f971..9839f78 100644 (file)
@@ -3084,7 +3084,7 @@ bool monst_spell_monst(int m_idx)
 
                                object_flags(o_ptr, flgs);
 
-                               if((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
+                               if ((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
                                {
 #ifdef JP
                                        cptr msg = "¤Ä¤¤¤Æ¤¤¤­¤Þ¤¹¤«¡©";
@@ -3092,18 +3092,18 @@ bool monst_spell_monst(int m_idx)
                                        cptr msg = "Do you follow it? ";
 #endif
 
-                                       if(get_check_strict(msg, CHECK_OKAY_CANCEL))
+                                       if (get_check_strict(msg, CHECK_OKAY_CANCEL))
                                        {
                                                if (one_in_(3))
                                                {
-                                                       teleport_player(200);
+                                                       teleport_player(200, TRUE);
 #ifdef JP
                                                        msg_print("¼ºÇÔ¡ª");
 #else
                                                        msg_print("Failed!");
 #endif
                                                }
-                                               else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
+                                               else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, FALSE);
                                                p_ptr->energy_need = ENERGY_NEED();
                                        }
                                        break;
@@ -3201,7 +3201,7 @@ bool monst_spell_monst(int m_idx)
 
                                        dam = damroll(4, 8);
 
-                                       if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE);
+                                       if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE, TRUE);
                                        else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100);
 
                                        sound(SOUND_FALL);
@@ -3316,7 +3316,7 @@ bool monst_spell_monst(int m_idx)
 
                if (!resists_tele)
                {
-                       if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
+                       if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, TRUE);
                        else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100);
                }
 
@@ -3378,7 +3378,7 @@ bool monst_spell_monst(int m_idx)
 
                if (!resists_tele)
                {
-                       if (t_idx == p_ptr->riding) teleport_player(MAX_SIGHT * 2 + 5);
+                       if (t_idx == p_ptr->riding) teleport_player(MAX_SIGHT * 2 + 5, TRUE);
                        else teleport_away(t_idx, MAX_SIGHT * 2 + 5, FALSE);
                }
 
index 54698f9..aef4bb3 100644 (file)
@@ -1351,10 +1351,10 @@ msg_print("̵
                (void)set_invuln(randint1(4) + 4, FALSE);
                break;
        case MS_BLINK:
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
        case MS_TELEPORT:
-               teleport_player(plev * 5);
+               teleport_player(plev * 5, FALSE);
                break;
        case MS_WORLD:
                world_player = TRUE;
index ded0499..a4bdc09 100644 (file)
@@ -3358,7 +3358,7 @@ bool mutation_power_aux(u32b power)
                        msg_print("You concentrate...");
 #endif
 
-                       teleport_player(10 + 4 * lvl);
+                       teleport_player(10 + 4 * lvl, FALSE);
                        break;
 
                case MUT1_MIND_BLST:
@@ -3452,7 +3452,7 @@ bool mutation_power_aux(u32b power)
                        break;
 
                case MUT1_BLINK:
-                       teleport_player(10);
+                       teleport_player(10, FALSE);
                        break;
 
                case MUT1_EAT_ROCK:
@@ -3672,7 +3672,7 @@ bool mutation_power_aux(u32b power)
 #else
                                                msg_print("You failed to teleport.");
 #endif
-                                       else teleport_player(30);
+                                       else teleport_player(30, FALSE);
                                }
                                else
                                {
index fa72314..2ee5a18 100644 (file)
@@ -908,7 +908,7 @@ static bool cmd_racial_power_aux(s32b command)
 #else
                                        msg_print("You are failed to run away.");
 #endif
-                               else teleport_player(30);
+                               else teleport_player(30, FALSE);
                        }
                        else
                        {
@@ -1481,7 +1481,7 @@ static bool cmd_racial_power_aux(s32b command)
                        msg_print("Blink!");
 #endif
 
-                       teleport_player(10);
+                       teleport_player(10, FALSE);
                        break;
 
                case RACE_HALF_ORC:
index 7d33025..e6df64b 100644 (file)
@@ -7192,7 +7192,7 @@ msg_print("
                        msg_print("Gravity warps around you.");
 #endif
 
-                       teleport_player(5);
+                       teleport_player(5, TRUE);
                        if (!p_ptr->ffall)
                                (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
                        if (!(p_ptr->resist_sound || p_ptr->ffall))
index 380d2dc..746e54a 100644 (file)
@@ -7043,14 +7043,14 @@ msg_print("
                        }
                case 32: case 33:
                        if (!(*count))
-               {
+                       {
 #ifdef JP
 msg_print("¼þ°Ï¤Î¶õ´Ö¤¬ÏĤó¤À¡ª");
 #else
                                msg_print("Space warps about you!");
 #endif
 
-                               teleport_player(damroll(10, 10));
+                               teleport_player(damroll(10, 10), TRUE);
                                if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
                                if (!one_in_(6)) break;
                        }
@@ -7453,7 +7453,7 @@ void kawarimi(bool success)
        y = py;
        x = px;
 
-       teleport_player(10+randint1(90));
+       teleport_player(10 + randint1(90), FALSE);
 
        object_wipe(q_ptr);
 
@@ -7559,7 +7559,7 @@ bool rush_attack(bool *mdeath)
                }
 
                /* Move player before updating the monster */
-               if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE);
+               if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
 
                /* Update the monster */
                update_mon(cave[ny][nx].m_idx, TRUE);
@@ -7595,7 +7595,7 @@ bool rush_attack(bool *mdeath)
                break;
        }
 
-       if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE);
+       if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
 
        if (mdeath) *mdeath = tmp_mdeath;
        return TRUE;
index 8761b9b..44bad71 100644 (file)
@@ -251,7 +251,7 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power)
 }
 
 
-bool cave_teleportable_bold(int y, int x)
+bool cave_teleportable_bold(int y, int x, bool passive)
 {
        cave_type    *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[c_ptr->feat];
@@ -264,20 +264,28 @@ bool cave_teleportable_bold(int y, int x)
 
        if (c_ptr->m_idx) return FALSE;
 
-       if (!player_can_enter(c_ptr->feat, 0)) return FALSE;
-
-       if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP))
+       if (!passive)
        {
-               if (!p_ptr->ffall && !p_ptr->can_swim) return FALSE;
-       }
+               if (!player_can_enter(c_ptr->feat, 0)) return FALSE;
 
-       if (have_flag(f_ptr->flags, FF_LAVA) && !p_ptr->immune_fire && !IS_INVULN())
-       {
-               /* Always forbid deep lave */
-               if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
+               if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP))
+               {
+                       if (!p_ptr->ffall && !p_ptr->can_swim) return FALSE;
+               }
 
-               /* Forbid shallow lave when the player don't have levitation */
-               if (!p_ptr->ffall) return FALSE;
+               if (have_flag(f_ptr->flags, FF_LAVA) && !p_ptr->immune_fire && !IS_INVULN())
+               {
+                       /* Always forbid deep lava */
+                       if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
+
+                       /* Forbid shallow lava when the player don't have levitation */
+                       if (!p_ptr->ffall) return FALSE;
+               }
+
+               if (have_flag(f_ptr->flags, FF_HIT_TRAP))
+               {
+                       if (!is_known_trap(c_ptr) || !trap_can_be_ignored(c_ptr->feat)) return FALSE;
+               }
        }
 
        return TRUE;
@@ -297,7 +305,7 @@ bool cave_teleportable_bold(int y, int x)
  * we decrease the minimum acceptable distance to try to increase randomness.
  * -GJW
  */
-void teleport_player(int dis)
+void teleport_player(int dis, bool passive)
 {
        int d, i, min, ox, oy;
        int tries = 0;
@@ -351,7 +359,7 @@ msg_print("
                        /* Ignore illegal locations */
                        if (!in_bounds(y, x)) continue;
 
-                       if (!cave_teleportable_bold(y, x)) continue;
+                       if (!cave_teleportable_bold(y, x, passive)) continue;
 
                        /* This grid looks good */
                        look = FALSE;
@@ -420,7 +428,7 @@ msg_print("
  * This function is slightly obsessive about correctness.
  * This function allows teleporting into vaults (!)
  */
-void teleport_player_to(int ny, int nx, bool no_tele)
+void teleport_player_to(int ny, int nx, bool no_tele, bool passive)
 {
        int y, x, dis = 0, ctr = 0;
 
@@ -450,7 +458,7 @@ void teleport_player_to(int ny, int nx, bool no_tele)
                if (p_ptr->wizard) break;
 
                /* Accept teleportable floor grids */
-               if (cave_teleportable_bold(y, x)) break;
+               if (cave_teleportable_bold(y, x, passive)) break;
 
                /* Occasionally advance the distance */
                if (++ctr > (4 * dis * dis + 4 * dis + 1))
@@ -1053,13 +1061,13 @@ void apply_nexus(monster_type *m_ptr)
        {
                case 1: case 2: case 3:
                {
-                       teleport_player(200);
+                       teleport_player(200, TRUE);
                        break;
                }
 
                case 4: case 5:
                {
-                       teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE);
+                       teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, TRUE);
                        break;
                }
 
@@ -5825,19 +5833,19 @@ static bool dimension_door_aux(int x, int y)
 
        p_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
 
-       if (!cave_teleportable_bold(y, x) ||
+       if (!cave_teleportable_bold(y, x, FALSE) ||
            (distance(y, x, py, px) > plev / 2 + 10) ||
            (!randint0(plev / 10 + 10)))
        {
                p_ptr->energy_need += (s16b)((s32b)(60 - plev) * ENERGY_NEED() / 100L);
-               teleport_player((plev+2)*2);
+               teleport_player((plev + 2) * 2, TRUE);
 
                /* Failed */
                return FALSE;
        }
        else
        {
-               teleport_player_to(y, x, TRUE);
+               teleport_player_to(y, x, TRUE, FALSE);
 
                /* Success */
                return TRUE;
index de0de5e..9392e1d 100644 (file)
@@ -108,7 +108,7 @@ static bool wiz_dimension_door(void)
 
        if (!tgt_pt(&x, &y)) return FALSE;
 
-       teleport_player_to(y, x, FALSE);
+       teleport_player_to(y, x, FALSE, FALSE);
 
        return (TRUE);
 }
@@ -339,7 +339,7 @@ static void do_cmd_wiz_bamf(void)
        if (!target_who) return;
 
        /* Teleport to the target */
-       teleport_player_to(target_row, target_col, FALSE);
+       teleport_player_to(target_row, target_col, FALSE, FALSE);
 }
 
 
@@ -1934,7 +1934,7 @@ void do_cmd_debug(void)
 
        /* Phase Door */
        case 'p':
-               teleport_player(10);
+               teleport_player(10, FALSE);
                break;
 
 #if 0
@@ -1978,7 +1978,7 @@ void do_cmd_debug(void)
 
        /* Teleport */
        case 't':
-               teleport_player(100);
+               teleport_player(100, FALSE);
                break;
 
        /* Very Good Objects */