* @details Having an item makes the player "aware" of its purpose.
* @return なし
*/
-void player_outfit(void)
+void player_outfit(player_type *creature_ptr)
{
int i;
OBJECT_TYPE_VALUE tv;
q_ptr = &forge;
/* Give the player some food */
- switch (p_ptr->prace)
+ switch (creature_ptr->prace)
{
case RACE_VAMPIRE:
/* Nothing! */
}
q_ptr = &forge;
- if ((p_ptr->prace == RACE_VAMPIRE) && (p_ptr->pclass != CLASS_NINJA))
+ if ((creature_ptr->prace == RACE_VAMPIRE) && (creature_ptr->pclass != CLASS_NINJA))
{
/* Hack -- Give the player scrolls of DARKNESS! */
object_prep(q_ptr, lookup_kind(TV_SCROLL, SV_SCROLL_DARKNESS));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass != CLASS_NINJA)
+ else if (creature_ptr->pclass != CLASS_NINJA)
{
/* Hack -- Give the player some torches */
object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
}
q_ptr = &forge;
- if (p_ptr->prace == RACE_MERFOLK)
+ if (creature_ptr->prace == RACE_MERFOLK)
{
object_prep(q_ptr, lookup_kind(TV_RING, SV_RING_LEVITATION_FALL));
q_ptr->number = 1;
add_outfit(q_ptr);
}
- if ((p_ptr->pclass == CLASS_RANGER) || (p_ptr->pclass == CLASS_CAVALRY))
+ if ((creature_ptr->pclass == CLASS_RANGER) || (creature_ptr->pclass == CLASS_CAVALRY))
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
add_outfit(q_ptr);
}
- if (p_ptr->pclass == CLASS_RANGER)
+ if (creature_ptr->pclass == CLASS_RANGER)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_BOW, SV_SHORT_BOW));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass == CLASS_ARCHER)
+ else if (creature_ptr->pclass == CLASS_ARCHER)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_ARROW, SV_AMMO_NORMAL));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass == CLASS_HIGH_MAGE)
+ else if (creature_ptr->pclass == CLASS_HIGH_MAGE)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_WAND, SV_WAND_MAGIC_MISSILE));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass == CLASS_SORCERER)
+ else if (creature_ptr->pclass == CLASS_SORCERER)
{
OBJECT_TYPE_VALUE book_tval;
for (book_tval = TV_LIFE_BOOK; book_tval <= TV_LIFE_BOOK+MAX_MAGIC-1; book_tval++)
add_outfit(q_ptr);
}
}
- else if (p_ptr->pclass == CLASS_TOURIST)
+ else if (creature_ptr->pclass == CLASS_TOURIST)
{
- if (p_ptr->pseikaku != SEIKAKU_SEXY)
+ if (creature_ptr->pseikaku != SEIKAKU_SEXY)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SHOT, SV_AMMO_LIGHT));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass == CLASS_NINJA)
+ else if (creature_ptr->pclass == CLASS_NINJA)
{
/* Hack -- Give the player some arrows */
object_prep(q_ptr, lookup_kind(TV_SPIKE, 0));
add_outfit(q_ptr);
}
- else if (p_ptr->pclass == CLASS_SNIPER)
+ else if (creature_ptr->pclass == CLASS_SNIPER)
{
/* Hack -- Give the player some bolts */
object_prep(q_ptr, lookup_kind(TV_BOLT, SV_AMMO_NORMAL));
add_outfit(q_ptr);
}
- if(p_ptr->pseikaku == SEIKAKU_SEXY)
+ if(creature_ptr->pseikaku == SEIKAKU_SEXY)
{
- player_init[p_ptr->pclass][2][0] = TV_HAFTED;
- player_init[p_ptr->pclass][2][1] = SV_WHIP;
+ player_init[creature_ptr->pclass][2][0] = TV_HAFTED;
+ player_init[creature_ptr->pclass][2][1] = SV_WHIP;
}
/* Hack -- Give the player three useful objects */
for (i = 0; i < 3; i++)
{
/* Look up standard equipment */
- tv = player_init[p_ptr->pclass][i][0];
- sv = player_init[p_ptr->pclass][i][1];
+ tv = player_init[creature_ptr->pclass][i][0];
+ sv = player_init[creature_ptr->pclass][i][1];
- if ((p_ptr->prace == RACE_ANDROID) && ((tv == TV_SOFT_ARMOR) || (tv == TV_HARD_ARMOR))) continue;
+ if ((creature_ptr->prace == RACE_ANDROID) && ((tv == TV_SOFT_ARMOR) || (tv == TV_HARD_ARMOR))) continue;
/* Hack to initialize spellbooks */
- if (tv == TV_SORCERY_BOOK) tv = TV_LIFE_BOOK + p_ptr->realm1 - 1;
- else if (tv == TV_DEATH_BOOK) tv = TV_LIFE_BOOK + p_ptr->realm2 - 1;
+ if (tv == TV_SORCERY_BOOK) tv = TV_LIFE_BOOK + creature_ptr->realm1 - 1;
+ else if (tv == TV_DEATH_BOOK) tv = TV_LIFE_BOOK + creature_ptr->realm2 - 1;
else if (tv == TV_RING && sv == SV_RING_RES_FEAR &&
- p_ptr->prace == RACE_BARBARIAN)
+ creature_ptr->prace == RACE_BARBARIAN)
/* Barbarians do not need a ring of resist fear */
sv = SV_RING_SUSTAIN_STR;
- else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && p_ptr->prace == RACE_MIND_FLAYER)
+ else if (tv == TV_RING && sv == SV_RING_SUSTAIN_INT && creature_ptr->prace == RACE_MIND_FLAYER)
{
tv = TV_POTION;
sv = SV_POTION_RESTORE_MANA;
object_prep(q_ptr, lookup_kind(tv, sv));
/* Assassins begin the game with a poisoned dagger */
- if ((tv == TV_SWORD || tv == TV_HAFTED) && (p_ptr->pclass == CLASS_ROGUE &&
- p_ptr->realm1 == REALM_DEATH)) /* Only assassins get a poisoned weapon */
+ if ((tv == TV_SWORD || tv == TV_HAFTED) && (creature_ptr->pclass == CLASS_ROGUE &&
+ creature_ptr->realm1 == REALM_DEATH)) /* Only assassins get a poisoned weapon */
{
q_ptr->name2 = EGO_BRAND_POIS;
}