extern bool rush_attack(player_type *attacker_ptr, bool *mdeath);
extern void remove_all_mirrors(bool explode);
extern void ring_of_power(player_type *caster_ptr, DIRECTION dir);
-extern void wild_magic(int spell);
+extern void wild_magic(player_type *caster_ptr, int spell);
extern void cast_meteor(HIT_POINT dam, POSITION rad);
extern bool cast_wrath_of_the_god(HIT_POINT dam, POSITION rad);
extern void cast_wonder(DIRECTION dir);
* @param spell ランダムな効果を選択するための基準ID
* @return なし
*/
-void wild_magic(int spell)
+void wild_magic(player_type *caster_ptr, int spell)
{
int counter = 0;
int type = SUMMON_MOLD + randint0(6);
case 1:
case 2:
case 3:
- teleport_player(p_ptr, 10, TELEPORT_PASSIVE);
+ teleport_player(caster_ptr, 10, TELEPORT_PASSIVE);
break;
case 4:
case 5:
case 6:
- teleport_player(p_ptr, 100, TELEPORT_PASSIVE);
+ teleport_player(caster_ptr, 100, TELEPORT_PASSIVE);
break;
case 7:
case 8:
- teleport_player(p_ptr, 200, TELEPORT_PASSIVE);
+ teleport_player(caster_ptr, 200, TELEPORT_PASSIVE);
break;
case 9:
case 10:
break;
case 19:
case 20:
- trap_creation(p_ptr->y, p_ptr->x);
+ trap_creation(caster_ptr->y, caster_ptr->x);
break;
case 21:
case 22:
aggravate_monsters(0);
break;
case 26:
- earthquake(p_ptr, p_ptr->y, p_ptr->x, 5, 0);
+ earthquake(caster_ptr, caster_ptr->y, caster_ptr->x, 5, 0);
break;
case 27:
case 28:
- (void)gain_mutation(p_ptr, 0);
+ (void)gain_mutation(caster_ptr, 0);
break;
case 29:
case 30:
- apply_disenchant(p_ptr, 1);
+ apply_disenchant(caster_ptr, 1);
break;
case 31:
- lose_all_info(p_ptr);
+ lose_all_info(caster_ptr);
break;
case 32:
fire_ball(GF_CHAOS, 0, spell + 5, 1 + (spell / 10));
case 35:
while (counter++ < 8)
{
- (void)summon_specific(0, p_ptr->y, p_ptr->x, (p_ptr->current_floor_ptr->dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
+ (void)summon_specific(0, caster_ptr->y, caster_ptr->x, (caster_ptr->current_floor_ptr->dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
}
break;
case 36:
case 37:
- activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
+ activate_hi_summon(caster_ptr->y, caster_ptr->x, FALSE);
break;
case 38:
- (void)summon_cyber(-1, p_ptr->y, p_ptr->x);
+ (void)summon_cyber(-1, caster_ptr->y, caster_ptr->x);
break;
default:
{
else if (die < 38)
{
msg_print(_("《運命の輪》だ。", "It's the Wheel of Fortune."));
- wild_magic(randint0(32));
+ wild_magic(caster_ptr, randint0(32));
}
else if (die < 40)
{