/* Note: earlier deductions may have left power < 0 already. */
while (power > 0)
{
- mutate_player();
+ status_shuffle();
power--;
}
}
extern bool free_level_recall(player_type *creature_ptr);
extern bool reset_recall(void);
extern bool apply_disenchant(BIT_FLAGS mode);
-extern void mutate_player(void);
extern void phlogiston(void);
extern void brand_weapon(int brand_type);
extern void call_the_(void);
}
msg_print(_("体がねじれ始めた...", "Your body starts to scramble..."));
- mutate_player();
+ status_shuffle();
break;
}
}
}
+/*!
+ * @brief プレイヤーのステータスシャッフル処理
+ * @return なし
+ */
+void status_shuffle(void)
+{
+ BASE_STATUS max1, cur1, max2, cur2;
+ int ii, jj, i;
+
+ /* Pick a pair of stats */
+ ii = randint0(A_MAX);
+ for (jj = ii; jj == ii; jj = randint0(A_MAX)) /* loop */;
+
+ max1 = p_ptr->stat_max[ii];
+ cur1 = p_ptr->stat_cur[ii];
+ max2 = p_ptr->stat_max[jj];
+ cur2 = p_ptr->stat_cur[jj];
+
+ p_ptr->stat_max[ii] = max2;
+ p_ptr->stat_cur[ii] = cur2;
+ p_ptr->stat_max[jj] = max1;
+ p_ptr->stat_cur[jj] = cur1;
+
+ for (i = 0; i < A_MAX; i++)
+ {
+ if (p_ptr->stat_max[i] > p_ptr->stat_max_max[i]) p_ptr->stat_max[i] = p_ptr->stat_max_max[i];
+ if (p_ptr->stat_cur[i] > p_ptr->stat_max_max[i]) p_ptr->stat_cur[i] = p_ptr->stat_max_max[i];
+ }
+
+ p_ptr->update |= (PU_BONUS);
+}
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);
+extern void status_shuffle(void);
if (one_in_(4)) /* 4 */
do_poly_self();
else
- mutate_player();
+ status_shuffle();
}
if (one_in_(6))
return (TRUE);
}
-/*!
- * @brief プレイヤーの突然変異処理
- * @return なし
- */
-void mutate_player(void)
-{
- BASE_STATUS max1, cur1, max2, cur2;
- int ii, jj, i;
-
- /* Pick a pair of stats */
- ii = randint0(A_MAX);
- for (jj = ii; jj == ii; jj = randint0(A_MAX)) /* loop */;
-
- max1 = p_ptr->stat_max[ii];
- cur1 = p_ptr->stat_cur[ii];
- max2 = p_ptr->stat_max[jj];
- cur2 = p_ptr->stat_cur[jj];
-
- p_ptr->stat_max[ii] = max2;
- p_ptr->stat_cur[ii] = cur2;
- p_ptr->stat_max[jj] = max1;
- p_ptr->stat_cur[jj] = cur1;
-
- for (i = 0; i < A_MAX; i++)
- {
- if(p_ptr->stat_max[i] > p_ptr->stat_max_max[i]) p_ptr->stat_max[i] = p_ptr->stat_max_max[i];
- if(p_ptr->stat_cur[i] > p_ptr->stat_max_max[i]) p_ptr->stat_cur[i] = p_ptr->stat_max_max[i];
- }
-
- p_ptr->update |= (PU_BONUS);
-}
/*!
* @brief 寿命つき光源の燃素追加処理 /