* ***
* @brief アイテムを指定確率で破損させる /
* Destroys a type of item on a given percent chance
+* @param player_ptr プレーヤーへの参照ポインタ
* @param typ 破損判定関数ポインタ
* @param perc 基本確率
* @return なし
reduce_charges(o_ptr, amt);
/* Destroy "amt" items */
- inven_item_increase(i, -amt);
- inven_item_optimize(i);
+ inven_item_increase(player_ptr, i, -amt);
+ inven_item_optimize(player_ptr, i);
}
}
/*!
* @brief 酸攻撃による装備のAC劣化処理 /
* Acid has hit the player, attempt to affect some armor.
+* @param 酸を浴びたキャラクタへの参照ポインタ
* @return 装備による軽減があったならTRUEを返す
* @details
* Note that the "base armor" of an object never changes.
/* No damage left to be done */
if (o_ptr->ac + o_ptr->to_a <= 0)
{
- msg_format(_("%sは既にボロボロだ!", "Your %s is already crumble!"), o_name);
+ msg_format(_("%sは既にボロボロだ!", "is already fully corroded!"), o_name);
return (FALSE);
}
/*!
* @brief 酸属性によるプレイヤー損害処理 /
* Hurt the player with Acid
+* @param creature_ptr 酸を浴びたキャラクタへの参照ポインタ
* @param dam 基本ダメージ量
* @param kb_str ダメージ原因記述
* @param monspell 原因となったモンスター特殊攻撃ID
/* Total Immunity */
if (creature_ptr->immune_acid || (dam <= 0))
{
- learn_spell(monspell);
+ learn_spell(creature_ptr, monspell);
return 0;
}
/*!
* @brief 電撃属性によるプレイヤー損害処理 /
* Hurt the player with electricity
+* @param creature_ptr 電撃を浴びたキャラクタへの参照ポインタ
* @param dam 基本ダメージ量
* @param kb_str ダメージ原因記述
* @param monspell 原因となったモンスター特殊攻撃ID
/* Total immunity */
if (creature_ptr->immune_elec || (dam <= 0))
{
- learn_spell(monspell);
+ learn_spell(creature_ptr, monspell);
return 0;
}
/*!
* @brief 火炎属性によるプレイヤー損害処理 /
* Hurt the player with Fire
+* @param creature_ptr 火炎を浴びたキャラクタへの参照ポインタ
* @param dam 基本ダメージ量
* @param kb_str ダメージ原因記述
* @param monspell 原因となったモンスター特殊攻撃ID
/* Totally immune */
if (creature_ptr->immune_fire || (dam <= 0))
{
- learn_spell(monspell);
+ learn_spell(creature_ptr, monspell);
return 0;
}
/*!
* @brief 冷気属性によるプレイヤー損害処理 /
* Hurt the player with Cold
+* @param creature_ptr 冷気を浴びたキャラクタへの参照ポインタ
* @param dam 基本ダメージ量
* @param kb_str ダメージ原因記述
* @param monspell 原因となったモンスター特殊攻撃ID
/* Total immunity */
if (creature_ptr->immune_cold || (dam <= 0))
{
- learn_spell(monspell);
+ learn_spell(creature_ptr, monspell);
return 0;
}
}
}
- if (monspell >= 0) learn_spell(monspell);
+ if (monspell >= 0) learn_spell(creature_ptr, monspell);
/* Mega-Hack -- Apply "invulnerability" */
if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
#ifdef JP /* 死んだ時に強制終了して死を回避できなくしてみた by Habu */
if (!cheat_save)
- if (!save_player()) msg_print("セーブ失敗!");
+ if (!save_player(creature_ptr)) msg_print("セーブ失敗!");
#endif
sound(SOUND_DEATH);
chg_virtue(creature_ptr, V_SACRIFICE, 10);
- handle_stuff();
+ handle_stuff(creature_ptr);
creature_ptr->leaving = TRUE;
/* Note death */
#ifdef WORLD_SCORE
/* Make screen dump */
- screen_dump = make_screen_dump();
+ screen_dump = make_screen_dump(creature_ptr);
#endif
/* Note cause of death */
if (get_check_strict(_("画面を保存しますか?", "Dump the screen? "), CHECK_NO_HISTORY))
{
- do_cmd_save_screen();
+ do_cmd_save_screen(creature_ptr);
}
flush();
flush();
#ifdef WORLD_SCORE
/* Make screen dump */
- screen_dump = make_screen_dump();
+ screen_dump = make_screen_dump(creature_ptr);
#endif
/* Wait a key press */
return damage;
}
- handle_stuff();
+ handle_stuff(creature_ptr);
/* Hitpoint warning */
if (creature_ptr->chp < warning)