#include "object/object-flags.h"
#include "spell-kind/spells-launcher.h"
#include "spell-realm/spells-hex.h"
+#include "spell/spell-types.h"
+#include "status/element-resistance.h"
+#include "sv-definition/sv-ring-types.h"
#include "system/object-type-definition.h"
#include "target/target-getter.h"
#include "util/bit-flags-calculator.h"
fire_breath(user_ptr, type[t], dir, 250, 4);
return TRUE;
}
+
+bool activate_breath_fire(player_type *user_ptr, object_type *o_ptr)
+{
+ DIRECTION dir;
+ if (!get_aim_dir(user_ptr, &dir))
+ return FALSE;
+
+ fire_breath(user_ptr, GF_FIRE, dir, 200, 2);
+ if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
+ (void)set_oppose_fire(user_ptr, randint1(20) + 20, FALSE);
+
+ return TRUE;
+}
+
+bool activate_breath_cold(player_type *user_ptr, object_type *o_ptr)
+{
+ DIRECTION dir;
+ if (!get_aim_dir(user_ptr, &dir))
+ return FALSE;
+
+ fire_breath(user_ptr, GF_COLD, dir, 200, 2);
+ if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
+ (void)set_oppose_cold(user_ptr, randint1(20) + 20, FALSE);
+
+ return TRUE;
+}
#include "system/angband.h"
bool activate_dragon_breath(player_type *user_ptr, object_type *o_ptr);
+bool activate_breath_fire(player_type *user_ptr, object_type *o_ptr);
+bool activate_breath_cold(player_type *user_ptr, object_type *o_ptr);
case ACT_BLADETURNER:
return activate_bladeturner(user_ptr);
case ACT_BR_FIRE:
- if (!get_aim_dir(user_ptr, &dir))
- return FALSE;
-
- fire_breath(user_ptr, GF_FIRE, dir, 200, 2);
- if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
- (void)set_oppose_fire(user_ptr, randint1(20) + 20, FALSE);
-
- return TRUE;
+ return activate_breath_fire(user_ptr, o_ptr);
case ACT_BR_COLD:
- if (!get_aim_dir(user_ptr, &dir))
- return FALSE;
-
- fire_breath(user_ptr, GF_COLD, dir, 200, 2);
- if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
- (void)set_oppose_cold(user_ptr, randint1(20) + 20, FALSE);
-
- return TRUE;
+ return activate_breath_cold(user_ptr, o_ptr);
case ACT_BR_DRAGON:
- if (!activate_dragon_breath(user_ptr, o_ptr))
- return FALSE;
-
- return TRUE;
+ return activate_dragon_breath(user_ptr, o_ptr);
case ACT_CONFUSE:
msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
if (!get_aim_dir(user_ptr, &dir))