X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fspells-status.c;h=8b3e01faf68810909c92248f851e237b2f569681;hb=b370729a5229fadc0a965cb6af7518d62a776c9b;hp=bcb1b6b976c5969a898102d45cb62bcb08a220ec;hpb=559a3837cb0a09bbe4ec16862f0a1a157a75dd72;p=hengband%2Fhengband.git diff --git a/src/spells-status.c b/src/spells-status.c index bcb1b6b97..8b3e01faf 100644 --- a/src/spells-status.c +++ b/src/spells-status.c @@ -123,7 +123,7 @@ bool poly_monster(DIRECTION dir, int power) BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE; bool tester = (project_hook(GF_OLD_POLY, dir, power, flg)); if (tester) - chg_virtue(V_CHANCE, 1); + chg_virtue(p_ptr, V_CHANCE, 1); return(tester); } @@ -169,8 +169,8 @@ void stop_singing(player_type *creature_ptr) /* The player is singing? */ if (!SINGING_SONG_EFFECT(creature_ptr)) return; - /* Hack -- if called from set_action(), avoid recursive loop */ - if (creature_ptr->action == ACTION_SING) set_action(ACTION_NONE); + /* Hack -- if called from set_action(p_ptr), avoid recursive loop */ + if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE); /* Message text of each song or etc. */ do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP); @@ -269,22 +269,22 @@ bool_hack life_stream(bool_hack message, bool_hack virtue_change) { if (virtue_change) { - chg_virtue(V_VITALITY, 1); - chg_virtue(V_UNLIFE, -5); + chg_virtue(p_ptr, V_VITALITY, 1); + chg_virtue(p_ptr, V_UNLIFE, -5); } if (message) { msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!")); } - restore_level(); + restore_level(p_ptr); (void)set_poisoned(p_ptr, 0); (void)set_blind(p_ptr, 0); (void)set_confused(p_ptr, 0); (void)set_image(p_ptr, 0); - (void)set_stun(0); - (void)set_cut(0); + (void)set_stun(p_ptr, 0); + (void)set_cut(p_ptr,0); (void)restore_all_status(); - (void)set_shero(0, TRUE); + (void)set_shero(p_ptr, 0, TRUE); handle_stuff(); hp_player(p_ptr, 5000); @@ -295,7 +295,7 @@ bool_hack heroism(int base) { bool_hack ident = FALSE; if (set_afraid(p_ptr, 0)) ident = TRUE; - if (set_hero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE; + if (set_hero(p_ptr, p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE; if (hp_player(p_ptr, 10)) ident = TRUE; return ident; } @@ -304,7 +304,7 @@ bool_hack berserk(int base) { bool_hack ident = FALSE; if (set_afraid(p_ptr, 0)) ident = TRUE; - if (set_shero(p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE; + if (set_shero(p_ptr, p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE; if (hp_player(p_ptr, 30)) ident = TRUE; return ident; } @@ -314,8 +314,8 @@ bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides) bool_hack ident = FALSE; if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE; if (set_blind(p_ptr, 0)) ident = TRUE; - if (set_cut(p_ptr->cut - 10)) ident = TRUE; - if (set_shero(0, TRUE)) ident = TRUE; + if (set_cut(p_ptr,p_ptr->cut - 10)) ident = TRUE; + if (set_shero(p_ptr, 0, TRUE)) ident = TRUE; return ident; } @@ -325,8 +325,8 @@ bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides) if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE; if (set_blind(p_ptr, 0)) ident = TRUE; if (set_confused(p_ptr, 0)) ident = TRUE; - if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE; - if (set_shero(0, TRUE)) ident = TRUE; + if (set_cut(p_ptr,(p_ptr->cut / 2) - 50)) ident = TRUE; + if (set_shero(p_ptr, 0, TRUE)) ident = TRUE; return ident; } @@ -337,9 +337,9 @@ bool_hack cure_critical_wounds(HIT_POINT pow) if (set_blind(p_ptr, 0)) ident = TRUE; if (set_confused(p_ptr, 0)) ident = TRUE; if (set_poisoned(p_ptr, 0)) ident = TRUE; - if (set_stun(0)) ident = TRUE; - if (set_cut(0)) ident = TRUE; - if (set_shero(0, TRUE)) ident = TRUE; + if (set_stun(p_ptr, 0)) ident = TRUE; + if (set_cut(p_ptr,0)) ident = TRUE; + if (set_shero(p_ptr, 0, TRUE)) ident = TRUE; return ident; } @@ -350,8 +350,8 @@ bool_hack true_healing(HIT_POINT pow) if (set_blind(p_ptr, 0)) ident = TRUE; if (set_confused(p_ptr, 0)) ident = TRUE; if (set_poisoned(p_ptr, 0)) ident = TRUE; - if (set_stun(0)) ident = TRUE; - if (set_cut(0)) ident = TRUE; + if (set_stun(p_ptr, 0)) ident = TRUE; + if (set_cut(p_ptr,0)) ident = TRUE; if (set_image(p_ptr, 0)) ident = TRUE; return ident; } @@ -426,7 +426,7 @@ bool fishing(player_type *creature_ptr) free_turn(creature_ptr); return FALSE; } - set_action(ACTION_FISH); + set_action(p_ptr, ACTION_FISH); creature_ptr->redraw |= (PR_STATE); return TRUE; } @@ -461,12 +461,12 @@ bool cosmic_cast_off(player_type *creature_ptr, object_type *o_ptr) t = 20 + randint1(20); (void)set_blind(p_ptr, creature_ptr->blind + t); (void)set_afraid(p_ptr, 0); - (void)set_tim_esp(creature_ptr->tim_esp + t, FALSE); - (void)set_tim_regen(creature_ptr->tim_regen + t, FALSE); - (void)set_hero(creature_ptr->hero + t, FALSE); + (void)set_tim_esp(p_ptr, creature_ptr->tim_esp + t, FALSE); + (void)set_tim_regen(p_ptr, creature_ptr->tim_regen + t, FALSE); + (void)set_hero(p_ptr, creature_ptr->hero + t, FALSE); (void)set_blessed(p_ptr, creature_ptr->blessed + t, FALSE); (void)set_fast(p_ptr, creature_ptr->fast + t, FALSE); - (void)set_shero(creature_ptr->shero + t, FALSE); + (void)set_shero(p_ptr, creature_ptr->shero + t, FALSE); if (creature_ptr->pclass == CLASS_FORCETRAINER) { P_PTR_KI = creature_ptr->lev * 5 + 190;