<ClCompile Include="..\..\src\object-activation\activation-breath.c" />\r
<ClCompile Include="..\..\src\object-activation\activation-charm.c" />\r
<ClCompile Include="..\..\src\object-activation\activation-resistance.c" />\r
+ <ClCompile Include="..\..\src\object-activation\activation-teleport.c" />\r
<ClCompile Include="..\..\src\object-activation\activation-util.c" />\r
<ClCompile Include="..\..\src\specific-object\blade-turner.c" />\r
<ClCompile Include="..\..\src\specific-object\monster-ball.c" />\r
<ClInclude Include="..\..\src\object-activation\activation-breath.h" />\r
<ClInclude Include="..\..\src\object-activation\activation-charm.h" />\r
<ClInclude Include="..\..\src\object-activation\activation-resistance.h" />\r
+ <ClInclude Include="..\..\src\object-activation\activation-teleport.h" />\r
<ClInclude Include="..\..\src\object-activation\activation-util.h" />\r
<ClInclude Include="..\..\src\specific-object\blade-turner.h" />\r
<ClInclude Include="..\..\src\specific-object\monster-ball.h" />\r
<ClCompile Include="..\..\src\specific-object\blade-turner.c">
<Filter>specific-object</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\object-activation\activation-teleport.c">
+ <Filter>object-activation</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\combat\shoot.h">
<ClInclude Include="..\..\src\specific-object\blade-turner.h">
<Filter>specific-object</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\object-activation\activation-teleport.h">
+ <Filter>object-activation</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
object-activation/activation-others.c object-activation/activation-others.h \
object-activation/activation-resistance.c object-activation/activation-resistance.h \
object-activation/activation-switcher.c object-activation/activation-switcher.h \
+ object-activation/activation-teleport.c object-activation/activation-teleport.h \
\
object-enchant/activation-info-table.c object-enchant/activation-info-table.h \
object-enchant/apply-magic.c object-enchant/apply-magic.h \
return TRUE;
}
-bool activate_teleport_away(player_type *user_ptr)
-{
- DIRECTION dir;
- if (!get_aim_dir(user_ptr, &dir))
- return FALSE;
-
- (void)fire_beam(user_ptr, GF_AWAY_ALL, dir, user_ptr->lev);
- return TRUE;
-}
-
bool activate_banish_evil(player_type *user_ptr)
{
if (banish_evil(user_ptr, 100))
return TRUE;
}
-bool activate_escape(player_type *user_ptr)
-{
- switch (randint1(13)) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
- return TRUE;
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- teleport_player(user_ptr, 222, TELEPORT_SPONTANEOUS);
- return TRUE;
- case 11:
- case 12:
- (void)stair_creation(user_ptr);
- return TRUE;
- default:
- if (!get_check(_("\82±\82Ì\8aK\82ð\8b\8e\82è\82Ü\82·\82©\81H", "Leave this level? ")))
- return TRUE;
-
- if (autosave_l)
- do_cmd_save_game(user_ptr, TRUE);
-
- user_ptr->leaving = TRUE;
- return TRUE;
- }
-}
-
-bool activate_teleport_level(player_type *user_ptr)
-{
- if (!get_check(_("\96{\93\96\82É\91¼\82Ì\8aK\82É\83e\83\8c\83|\81[\83g\82µ\82Ü\82·\82©\81H", "Are you sure? (Teleport Level)")))
- return FALSE;
-
- teleport_level(user_ptr, 0);
- return TRUE;
-}
-
-bool activate_dimension_door(player_type *user_ptr)
-{
- msg_print(_("\8e\9f\8c³\82Ì\94à\82ª\8aJ\82¢\82½\81B\96Ú\93I\92n\82ð\91I\82ñ\82Å\89º\82³\82¢\81B", "You open a dimensional gate. Choose a destination."));
- return dimension_door(user_ptr);
-}
-
-bool activate_teleport(player_type *user_ptr)
-{
- msg_print(_("\8eü\82è\82Ì\8bó\8aÔ\82ª\98c\82ñ\82Å\82¢\82é...", "It twists space around you..."));
- teleport_player(user_ptr, 100, TELEPORT_SPONTANEOUS);
- return TRUE;
-}
-
bool activate_dispel_curse(player_type *user_ptr, concptr name)
{
msg_format(_("%s\82ª\90^\8eÀ\82ð\8fÆ\82ç\82µ\8fo\82·...", "The %s exhibits the truth..."), name);
bool activate_sunlight(player_type *user_ptr);
bool activate_confusion(player_type *user_ptr);
-bool activate_teleport_away(player_type *user_ptr);
bool activate_banish_evil(player_type *user_ptr);
bool activate_scare(player_type *user_ptr);
bool activate_aggravation(player_type *user_ptr, object_type *o_ptr, concptr name);
bool activate_judgement(player_type *user_ptr, concptr name);
bool activate_telekinesis(player_type *user_ptr, concptr name);
bool activate_unique_detection(player_type *user_ptr);
-bool activate_escape(player_type *user_ptr);
-bool activate_teleport_level(player_type *user_ptr);
-bool activate_dimension_door(player_type *user_ptr);
-bool activate_teleport(player_type *user_ptr);
bool activate_dispel_curse(player_type *user_ptr, concptr name);
bool activate_cure_lw(player_type *user_ptr);
bool activate_grand_cross(player_type *user_ptr);
#include "object-activation/activation-charm.h"
#include "object-activation/activation-others.h"
#include "object-activation/activation-resistance.h"
+#include "object-activation/activation-teleport.h"
#include "object-enchant/activation-info-table.h"
#include "player-attack/player-attack.h"
#include "player/digestion-processor.h"
--- /dev/null
+#include "object-activation/activation-teleport.h"
+#include "cmd-io/cmd-save.h"
+#include "core/asking-player.h"
+#include "game-option/special-options.h"
+#include "spell-kind/spells-grid.h"
+#include "spell-kind/spells-launcher.h"
+#include "spell-kind/spells-teleport.h"
+#include "spell-kind/spells-world.h"
+#include "spell/spell-types.h"
+#include "target/target-getter.h"
+#include "view/display-messages.h"
+
+bool activate_teleport_away(player_type *user_ptr)
+{
+ DIRECTION dir;
+ if (!get_aim_dir(user_ptr, &dir))
+ return FALSE;
+
+ (void)fire_beam(user_ptr, GF_AWAY_ALL, dir, user_ptr->lev);
+ return TRUE;
+}
+
+bool activate_escape(player_type *user_ptr)
+{
+ switch (randint1(13)) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ teleport_player(user_ptr, 10, TELEPORT_SPONTANEOUS);
+ return TRUE;
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ teleport_player(user_ptr, 222, TELEPORT_SPONTANEOUS);
+ return TRUE;
+ case 11:
+ case 12:
+ (void)stair_creation(user_ptr);
+ return TRUE;
+ default:
+ if (!get_check(_("\82±\82Ì\8aK\82ð\8b\8e\82è\82Ü\82·\82©\81H", "Leave this level? ")))
+ return TRUE;
+
+ if (autosave_l)
+ do_cmd_save_game(user_ptr, TRUE);
+
+ user_ptr->leaving = TRUE;
+ return TRUE;
+ }
+}
+
+bool activate_teleport_level(player_type *user_ptr)
+{
+ if (!get_check(_("\96{\93\96\82É\91¼\82Ì\8aK\82É\83e\83\8c\83|\81[\83g\82µ\82Ü\82·\82©\81H", "Are you sure? (Teleport Level)")))
+ return FALSE;
+
+ teleport_level(user_ptr, 0);
+ return TRUE;
+}
+
+bool activate_dimension_door(player_type *user_ptr)
+{
+ msg_print(_("\8e\9f\8c³\82Ì\94à\82ª\8aJ\82¢\82½\81B\96Ú\93I\92n\82ð\91I\82ñ\82Å\89º\82³\82¢\81B", "You open a dimensional gate. Choose a destination."));
+ return dimension_door(user_ptr);
+}
+
+bool activate_teleport(player_type *user_ptr)
+{
+ msg_print(_("\8eü\82è\82Ì\8bó\8aÔ\82ª\98c\82ñ\82Å\82¢\82é...", "It twists space around you..."));
+ teleport_player(user_ptr, 100, TELEPORT_SPONTANEOUS);
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+bool activate_teleport_away(player_type *user_ptr);
+bool activate_escape(player_type *user_ptr);
+bool activate_teleport_level(player_type *user_ptr);
+bool activate_dimension_door(player_type *user_ptr);
+bool activate_teleport(player_type *user_ptr);