#include "player-personality.h"
#include "player-sex.h"
#include "player/race-info-table.h"
-#include "spells.h"
+#include "spell/spells-util.h"
#include "spells-status.h"
#include "wild.h"
#include "floor.h"
typedef s16b FEAT_PRIORITY; /*!< 地形の縮小表示優先順位 */
-typedef BIT_FLAGS SPOP_FLAGS; /*!< スペル用オプション */
-
/*** Pointers to all the basic types defined above ***/
typedef real *real_ptr;
typedef errr *errr_ptr;
SPELL_STOP = 5,
SPELL_CONT = 6
} spell_type;
+
+typedef enum
+{
+ SPOP_DISPLAY_MES = 0x0001, // !< スペル処理オプション … メッセージを表示する
+ SPOP_NO_UPDATE = 0x0002, // !< スペル処理オプション … ステータス更新を解決後行う
+ SPOP_DEBUG = 0x8000, // !< スペル処理オプション … デバッグ処理あり
+} spell_operation;
* @param options スペル共通オプション
* @return なし
*/
-void roll_hitdice(player_type *creature_ptr, SPOP_FLAGS options)
+void roll_hitdice(player_type *creature_ptr, spell_operation options)
{
HIT_POINT min_value = creature_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (creature_ptr->hitdie + 1)) * 3 / 8;
HIT_POINT max_value = creature_ptr->hitdie + ((PY_MAX_LEVEL + 2) * (creature_ptr->hitdie + 1)) * 5 / 8;
}
-bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack virtue_change)
+bool life_stream(player_type *creature_ptr, bool message, bool virtue_change)
{
if (virtue_change)
{
}
-bool_hack heroism(player_type *creature_ptr, int base)
+bool heroism(player_type *creature_ptr, int base)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (set_afraid(creature_ptr, 0)) ident = TRUE;
if (set_hero(creature_ptr, creature_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
if (hp_player(creature_ptr, 10)) ident = TRUE;
}
-bool_hack berserk(player_type *creature_ptr, int base)
+bool berserk(player_type *creature_ptr, int base)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (set_afraid(creature_ptr, 0)) ident = TRUE;
if (set_shero(creature_ptr, creature_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
if (hp_player(creature_ptr, 30)) ident = TRUE;
}
-bool_hack cure_light_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
+bool cure_light_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (hp_player(creature_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(creature_ptr, 0)) ident = TRUE;
if (set_cut(creature_ptr,creature_ptr->cut - 10)) ident = TRUE;
}
-bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
+bool cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (hp_player(creature_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(creature_ptr, 0)) ident = TRUE;
if (set_confused(creature_ptr, 0)) ident = TRUE;
}
-bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow)
+bool cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (hp_player(creature_ptr, pow)) ident = TRUE;
if (set_blind(creature_ptr, 0)) ident = TRUE;
if (set_confused(creature_ptr, 0)) ident = TRUE;
}
-bool_hack true_healing(player_type *creature_ptr, HIT_POINT pow)
+bool true_healing(player_type *creature_ptr, HIT_POINT pow)
{
- bool_hack ident = FALSE;
+ bool ident = FALSE;
if (hp_player(creature_ptr, pow)) ident = TRUE;
if (set_blind(creature_ptr, 0)) ident = TRUE;
if (set_confused(creature_ptr, 0)) ident = TRUE;
}
-bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater)
+bool restore_mana(player_type *creature_ptr, bool magic_eater)
{
if (creature_ptr->pclass == CLASS_MAGIC_EATER && magic_eater)
{
-
-extern bool heal_monster(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
-extern bool speed_monster(player_type *caster_ptr, DIRECTION dir, int power);
-extern bool slow_monster(player_type *caster_ptr, DIRECTION dir, int power);
-extern bool sleep_monster(player_type *caster_ptr, DIRECTION dir, int power);
-extern bool stasis_monster(player_type *caster_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
-extern bool stasis_evil(player_type *caster_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
-extern bool confuse_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-extern bool stun_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-extern bool fear_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
-extern bool poly_monster(player_type *caster_ptr, DIRECTION dir, int power);
-extern bool clone_monster(player_type *caster_ptr, DIRECTION dir);
-extern bool time_walk(player_type *creature_ptr);
-extern void roll_hitdice(player_type *creature_ptr, SPOP_FLAGS options);
-extern bool_hack life_stream(player_type *creature_ptr, bool_hack message, bool_hack virtue_change);
-extern bool_hack heroism(player_type *creature_ptr, int base);
-extern bool_hack berserk(player_type *creature_ptr, int base);
-extern bool_hack cure_light_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides);
-extern bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides);
-extern bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow);
-extern bool_hack true_healing(player_type *creature_ptr, HIT_POINT pow);
-extern bool_hack restore_mana(player_type *creature_ptr, bool_hack magic_eater);
-extern bool restore_all_status(player_type *creature_ptr);
+#pragma once
-extern bool fishing(player_type *creature_ptr);
-extern bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr);
-extern void apply_nexus(monster_type *m_ptr, player_type *target_ptr);
-extern void status_shuffle(player_type *creature_ptr);
+#include "spell/spells-util.h"
+
+bool heal_monster(player_type *caster_ptr, DIRECTION dir, HIT_POINT dam);
+bool speed_monster(player_type *caster_ptr, DIRECTION dir, int power);
+bool slow_monster(player_type *caster_ptr, DIRECTION dir, int power);
+bool sleep_monster(player_type *caster_ptr, DIRECTION dir, int power);
+bool stasis_monster(player_type *caster_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
+bool stasis_evil(player_type *caster_ptr, DIRECTION dir); /* Like sleep, affects undead as well */
+bool confuse_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool stun_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool fear_monster(player_type *caster_ptr, DIRECTION dir, PLAYER_LEVEL plev);
+bool poly_monster(player_type *caster_ptr, DIRECTION dir, int power);
+bool clone_monster(player_type *caster_ptr, DIRECTION dir);
+bool time_walk(player_type *creature_ptr);
+void roll_hitdice(player_type *creature_ptr, spell_operation options);
+bool life_stream(player_type *creature_ptr, bool message, bool virtue_change);
+bool heroism(player_type *creature_ptr, int base);
+bool berserk(player_type *creature_ptr, int base);
+bool cure_light_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides);
+bool cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides);
+bool cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow);
+bool true_healing(player_type *creature_ptr, HIT_POINT pow);
+bool restore_mana(player_type *creature_ptr, bool magic_eater);
+bool restore_all_status(player_type *creature_ptr);
+
+bool fishing(player_type *creature_ptr);
+bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr);
+void apply_nexus(monster_type *m_ptr, player_type *target_ptr);
+void status_shuffle(player_type *creature_ptr);
#define DETECT_RAD_MAP 30
#define DETECT_RAD_ALL 255
-#define SPOP_DISPLAY_MES 0x0001 // !< スペル処理オプション … メッセージを表示する
-#define SPOP_NO_UPDATE 0x0002 // !< スペル処理オプション … ステータス更新を解決後行う
-#define SPOP_DEBUG 0x8000 // !< スペル処理オプション … デバッグ処理あり
-
/* spells1.c */
extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
#include "player-class.h"
#include "player-inventory.h"
-#include "spells.h"
+#include "spell/spells-util.h"
#include "spells-object.h"
#include "spells-summon.h"
#include "spells-status.h"