#include "action/open-util.h"
#include "floor/geometry.h"
#include "grid/trap.h"
+#include "object/tval-types.h"
#include "perception/object-perception.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
for (const auto this_o_idx : g_ptr->o_idx_list) {
ObjectType *o_ptr;
o_ptr = &floor_ptr->o_list[this_o_idx];
- if ((o_ptr->tval == ItemKindType::CHEST)
- && (((!trapped) && (o_ptr->pval)) || /* non empty */
- ((trapped) && (o_ptr->pval > 0)))) /* trapped only */
+ if ((o_ptr->tval == ItemKindType::CHEST) && (((!trapped) && (o_ptr->pval)) || /* non empty */
+ ((trapped) && (o_ptr->pval > 0)))) /* trapped only */
return this_o_idx;
}
#include "artifact/random-art-bias-types.h"
#include "object-enchant/tr-types.h"
#include "object-hook/hook-armor.h"
+#include "object/tval-types.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
#include "util/bit-flags-calculator.h"
return one_in_(2);
}
-static bool invest_misc_res_curse(ObjectType* o_ptr)
+static bool invest_misc_res_curse(ObjectType *o_ptr)
{
if (o_ptr->art_flags.has(TR_RES_CURSE))
return false;
o_ptr->art_flags.set(TR_SHOW_MODS);
HIT_PROB bonus_h = 4 + (HIT_PROB)randint1(11);
HIT_POINT bonus_d = 4 + (HIT_POINT)randint1(11);
- if ((o_ptr->tval != ItemKindType::SWORD) && (o_ptr->tval != ItemKindType::POLEARM) && (o_ptr->tval != ItemKindType::HAFTED) && (o_ptr->tval != ItemKindType::DIGGING) && (o_ptr->tval != ItemKindType::GLOVES)
- && (o_ptr->tval != ItemKindType::RING)) {
+ if ((o_ptr->tval != ItemKindType::SWORD) && (o_ptr->tval != ItemKindType::POLEARM) && (o_ptr->tval != ItemKindType::HAFTED) && (o_ptr->tval != ItemKindType::DIGGING) && (o_ptr->tval != ItemKindType::GLOVES) && (o_ptr->tval != ItemKindType::RING)) {
bonus_h /= 2;
bonus_d /= 2;
}
#include "artifact/random-art-bias-types.h"
#include "object-enchant/tr-types.h"
#include "object-hook/hook-weapon.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-armor-types.h"
#include "system/object-type-definition.h"
#include "util/bit-flags-calculator.h"
static bool random_art_bias_decrease_mana(ObjectType *o_ptr)
{
- if (((o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY)) || (o_ptr->tval != ItemKindType::SOFT_ARMOR) || (o_ptr->sval != SV_ROBE)
- || o_ptr->art_flags.has(TR_DEC_MANA) || !one_in_(3))
+ if (((o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY)) || (o_ptr->tval != ItemKindType::SOFT_ARMOR) || (o_ptr->sval != SV_ROBE) || o_ptr->art_flags.has(TR_DEC_MANA) || !one_in_(3))
return false;
o_ptr->art_flags.set(TR_DEC_MANA);
#include "artifact/random-art-resistance.h"
#include "artifact/random-art-bias-types.h"
#include "object-enchant/tr-types.h"
+#include "object/tval-types.h"
#include "system/object-type-definition.h"
#include "util/bit-flags-calculator.h"
#include "artifact/random-art-slay.h"
#include "artifact/random-art-bias-types.h"
#include "object-enchant/tr-types.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/object-type-definition.h"
#include "util/bit-flags-calculator.h"
case BIAS_RANGER:
return random_art_slay_animal(o_ptr);
case BIAS_ROGUE:
- if ((((o_ptr->tval == ItemKindType::SWORD) && (o_ptr->sval == SV_DAGGER)) || ((o_ptr->tval == ItemKindType::POLEARM) && (o_ptr->sval == SV_SPEAR)))
- && o_ptr->art_flags.has_not(TR_THROW)) {
+ if ((((o_ptr->tval == ItemKindType::SWORD) && (o_ptr->sval == SV_DAGGER)) || ((o_ptr->tval == ItemKindType::POLEARM) && (o_ptr->sval == SV_SPEAR))) && o_ptr->art_flags.has_not(TR_THROW)) {
o_ptr->art_flags.set(TR_THROW);
}
o_ptr->artifact_bias = BIAS_LAW;
break;
}
-
+
if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9))
o_ptr->artifact_bias = BIAS_PRIESTLY;
o_ptr->artifact_bias = BIAS_POIS;
break;
}
-
+
if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(6)) {
o_ptr->artifact_bias = BIAS_NECROMANTIC;
break;
}
-
+
if (o_ptr->artifact_bias == BIAS_NONE)
o_ptr->artifact_bias = BIAS_ROGUE;
#include "object-hook/hook-weapon.h"
#include "object/object-mark-types.h"
#include "object/object-value.h"
+#include "object/tval-types.h"
#include "perception/object-perception.h"
#include "player-base/player-class.h"
#include "player-info/race-types.h"
return false;
} else if (pc.is_tamer()) {
if (o_ptr->tval == ItemKindType::WAND && o_ptr->sval == SV_WAND_HEAL_MONSTER && o_ptr->is_aware())
- return false;
+ return false;
}
return true;
#include "inventory/inventory-object.h"
#include "inventory/inventory-slot-types.h"
#include "io/input-key-requester.h"
+#include "object/tval-types.h"
#include "player-base/player-class.h"
#include "player-info/samurai-data-type.h"
#include "player-status/player-energy.h"
disturb(player_ptr, false, false);
}
-
/*!
* @brief 「くさびを打つ」ために必要なオブジェクトを所持しているかどうかの判定を返す /
* Find the index of some "spikes", if possible.
#include "main/sound-of-music.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags-resistance.h"
+#include "object/tval-types.h"
#include "player-attack/player-attack-util.h"
#include "player-base/player-class.h"
#include "player/attack-defense-types.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags1.h"
#include "monster-race/race-flags7.h"
+#include "object/tval-types.h"
#include "player-attack/player-attack-util.h"
#include "player-base/player-class.h"
#include "player-info/equipment-info.h"
{
monster_race *r_ptr = &r_info[pa_ptr->m_ptr->r_idx];
int maxhp = pa_ptr->m_ptr->maxhp;
- if (one_in_(pa_ptr->backstab ? 13 : (pa_ptr->stab_fleeing || pa_ptr->surprise_attack) ? 15 : 27)) {
+ if (one_in_(pa_ptr->backstab ? 13 : (pa_ptr->stab_fleeing || pa_ptr->surprise_attack) ? 15
+ : 27)) {
pa_ptr->attack_damage *= 5;
pa_ptr->drain_result *= 2;
msg_format(_("刃が%sに深々と突き刺さった!", "You critically injured %s!"), pa_ptr->m_name);
bool is_weaken = pa_ptr->m_ptr->hp < maxhp / 2;
bool is_unique = ((r_ptr->flags1 & RF1_UNIQUE) != 0) || ((r_ptr->flags7 & RF7_UNIQUE2) != 0);
- bool is_critical = (is_weaken && one_in_((player_ptr->num_blow[0] + player_ptr->num_blow[1] + 1) * 10))
- || ((one_in_(666) || ((pa_ptr->backstab || pa_ptr->surprise_attack) && one_in_(11))) && !is_unique);
+ bool is_critical = (is_weaken && one_in_((player_ptr->num_blow[0] + player_ptr->num_blow[1] + 1) * 10)) || ((one_in_(666) || ((pa_ptr->backstab || pa_ptr->surprise_attack) && one_in_(11))) && !is_unique);
if (!is_critical)
return;
return;
}
- bool is_ninja_hit = PlayerClass(player_ptr).equals(PlayerClassType::NINJA) && has_melee_weapon(player_ptr, INVEN_MAIN_HAND + pa_ptr->hand)
- && !player_ptr->is_icky_wield[pa_ptr->hand] && ((player_ptr->cur_lite <= 0) || one_in_(7));
+ bool is_ninja_hit = PlayerClass(player_ptr).equals(PlayerClassType::NINJA) && has_melee_weapon(player_ptr, INVEN_MAIN_HAND + pa_ptr->hand) && !player_ptr->is_icky_wield[pa_ptr->hand] && ((player_ptr->cur_lite <= 0) || one_in_(7));
if (is_ninja_hit)
ninja_critical(player_ptr, pa_ptr);
}
#include "combat/slaying.h"
#include "artifact/fixed-art-types.h"
#include "core/player-redraw-types.h"
+#include "effect/attribute-types.h"
#include "mind/mind-samurai.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags-resistance.h"
#include "monster/monster-info.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "player-base/player-class.h"
#include "player/attack-defense-types.h"
#include "realm/realm-hex-numbers.h"
#include "specific-object/torch.h"
#include "spell-realm/spells-hex.h"
-#include "effect/attribute-types.h"
#include "system/monster-race-definition.h"
#include "system/monster-type-definition.h"
#include "system/object-type-definition.h"
if (SpellHex(player_ptr).is_spelling_specific(HEX_RUNESWORD))
flgs.set(TR_SLAY_GOOD);
-
+
static const struct brand_convert_table_t {
tr_type brand_type;
AttributeType attribute;
attribute_flags.set(p->attribute);
}
-
if ((flgs.has(TR_FORCE_WEAPON)) && (player_ptr->csp > (o_ptr->dd * o_ptr->ds / 5))) {
attribute_flags.set(AttributeType::MANA);
}
#include "monster-race/monster-race.h"
#include "monster-race/race-flags1.h"
#include "system/monster-race-definition.h"
+#include "object/tval-types.h"
#endif
static void check_object_known_aware(flavor_type *flavor_ptr)
#include "object-enchant/tr-types.h"
#include "object-enchant/trc-types.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "pet/pet-util.h"
#include "player-base/player-class.h"
#include "player-base/player-race.h"
#include "monster-race/monster-race.h"
#include "monster-race/race-flags-resistance.h"
#include "monster-race/race-flags3.h"
+#include "object/tval-types.h"
#include "player-base/player-class.h"
#include "player-info/sniper-data-type.h"
#include "player-status/player-energy.h"
#include "core/disturbance.h"
#include "core/player-redraw-types.h"
#include "dungeon/dungeon.h"
+#include "effect/attribute-types.h"
#include "floor/geometry.h"
#include "grid/grid.h"
#include "hpmp/hp-mp-processor.h"
#include "mutation/mutation-flag-types.h"
#include "mutation/mutation-investor-remover.h"
#include "object/lite-processor.h"
+#include "object/tval-types.h"
#include "player-info/equipment-info.h"
#include "player/digestion-processor.h"
#include "player/player-damage.h"
#include "spell-kind/spells-world.h"
#include "spell-realm/spells-hex.h"
#include "spell-realm/spells-song.h"
-#include "effect/attribute-types.h"
#include "spell/summon-types.h"
#include "status/bad-status-setter.h"
#include "status/base-status.h"
DIRECTION dir = 0;
while (!dir) {
concptr p = target_okay(player_ptr)
- ? _("方向 ('5'でターゲットへ, '*'でターゲット再選択, ESCで中断)? ", "Direction ('5' for target, '*' to re-target, Escape to cancel)? ")
- : _("方向 ('*'でターゲット選択, ESCで中断)? ", "Direction ('*' to choose a target, Escape to cancel)? ");
+ ? _("方向 ('5'でターゲットへ, '*'でターゲット再選択, ESCで中断)? ", "Direction ('5' for target, '*' to re-target, Escape to cancel)? ")
+ : _("方向 ('*'でターゲット選択, ESCで中断)? ", "Direction ('*' to choose a target, Escape to cancel)? ");
if (!get_com(p, &command, true))
break;
#include "object-activation/activation-breath.h"
+#include "effect/attribute-types.h"
#include "object-enchant/dragon-breaths-table.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "player/player-status.h"
#include "spell-kind/spells-launcher.h"
#include "spell-realm/spells-hex.h"
#include "spell-realm/spells-song.h"
-#include "effect/attribute-types.h"
#include "status/element-resistance.h"
#include "sv-definition/sv-ring-types.h"
#include "system/object-type-definition.h"
#include "object-enchant/special-object-flags.h"
#include "object-enchant/trc-types.h"
#include "object-hook/hook-weapon.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-protector-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/object-type-definition.h"
*/
static void ego_interpret_extra_abilities(ObjectType *o_ptr, ego_item_type *e_ptr, EnumClassFlagGroup<ItemGenerationTraitType> &gen_flags)
{
- for (auto& xtra : e_ptr->xtra_flags) {
+ for (auto &xtra : e_ptr->xtra_flags) {
if (xtra.mul == 0 || xtra.dev == 0)
continue;
#include "object-enchant/weapon/abstract-weapon-enchanter.h"
#include "object-enchant/object-boost.h"
+#include "object/tval-types.h"
#include "system/object-type-definition.h"
-AbstractWeaponEnchanter::AbstractWeaponEnchanter(ObjectType* o_ptr, DEPTH level, int power)
+AbstractWeaponEnchanter::AbstractWeaponEnchanter(ObjectType *o_ptr, DEPTH level, int power)
: o_ptr(o_ptr)
, level(level)
, power(power)
return;
}
-
+
if (this->power < 0) {
this->o_ptr->to_h -= tohit1;
this->o_ptr->to_d -= todam1;
#include "object-enchant/object-ego.h"
#include "object-enchant/tr-types.h"
#include "object-enchant/trc-types.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/floor-type-definition.h"
#include "system/object-type-definition.h"
#include "object-enchant/tr-types.h"
#include "object-hook/hook-armor.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "player/player-skill.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/object-type-definition.h"
#include "game-option/disturbance-options.h"
#include "inventory/inventory-slot-types.h"
#include "object-enchant/object-ego.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-lite-types.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
* @brief 10ゲームターンが進行する毎に光源の寿命を減らす処理
* / Handle burning fuel every 10 game turns
*/
-void reduce_lite_life(PlayerType* player_ptr)
+void reduce_lite_life(PlayerType *player_ptr)
{
- ObjectType* o_ptr = &player_ptr->inventory_list[INVEN_LITE];
+ ObjectType *o_ptr = &player_ptr->inventory_list[INVEN_LITE];
if (o_ptr->tval != ItemKindType::LITE)
return;
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr 現在光源として使っているオブジェクトの構造体参照ポインタ
*/
-void notice_lite_change(PlayerType* player_ptr, ObjectType* o_ptr)
+void notice_lite_change(PlayerType *player_ptr, ObjectType *o_ptr)
{
if ((o_ptr->xtra4 < 100) || (!(o_ptr->xtra4 % 100))) {
player_ptr->window_flags |= (PW_EQUIP);
player_ptr->update |= (PU_TORCH);
player_ptr->update |= (PU_BONUS);
} else if (o_ptr->name2 == EGO_LITE_LONG) {
- if ((o_ptr->xtra4 < 50) && (!(o_ptr->xtra4 % 5))
- && (w_ptr->game_turn % (TURNS_PER_TICK * 2))) {
+ if ((o_ptr->xtra4 < 50) && (!(o_ptr->xtra4 % 5)) && (w_ptr->game_turn % (TURNS_PER_TICK * 2))) {
if (disturb_minor)
disturb(player_ptr, false, true);
msg_print(_("明かりが微かになってきている。", "Your light is growing faint."));
#include "player-info/equipment-info.h"
#include "inventory/inventory-slot-types.h"
#include "object-hook/hook-weapon.h"
+#include "object/tval-types.h"
#include "pet/pet-util.h"
#include "player-base/player-class.h"
#include "player-status/player-hand-types.h"
#include "smith/smith-info.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "smith/smith-types.h"
#include "sv-definition/sv-weapon-types.h"
#include "system/object-type-definition.h"
#include "specific-object/monster-ball.h"
+#include "effect/attribute-types.h"
#include "effect/spells-effect-util.h"
#include "floor/geometry.h"
#include "game-option/input-options.h"
#include "monster/monster-info.h"
#include "monster/monster-util.h"
#include "object-activation/activation-util.h"
+#include "object/tval-types.h"
#include "pet/pet-util.h"
#include "racial/racial-android.h"
#include "spell-kind/spells-launcher.h"
-#include "effect/attribute-types.h"
#include "system/floor-type-definition.h"
#include "system/monster-race-definition.h"
#include "system/monster-type-definition.h"
#include "object-enchant/object-ego.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "player/special-defense-types.h"
#include "sv-definition/sv-lite-types.h"
#include "system/floor-type-definition.h"
#include "spell-realm/spells-arcane.h"
#include "core/player-update-types.h"
#include "inventory/inventory-slot-types.h"
+#include "object/tval-types.h"
#include "sv-definition/sv-lite-types.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
#include "game-option/game-play-options.h"
#include "object/object-stack.h"
#include "object/object-value.h"
+#include "object/tval-types.h"
#include "store/store-util.h"
#include "system/object-type-definition.h"
#include "system/player-type-definition.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
#include "object/object-value.h"
+#include "object/tval-types.h"
#include "store/store-util.h"
#include "sv-definition/sv-potion-types.h"
#include "sv-definition/sv-rod-types.h"
{
if (cost < 5)
return 0;
-
+
if (one_in_(25))
return 25;
-
+
if (one_in_(150))
return 50;
-
+
if (one_in_(300))
return 75;
-
+
if (one_in_(500))
return 90;
#include "object-enchant/tr-flags.h"
#include "object-enchant/trc-types.h"
-#include "object/tval-types.h"
#include "system/angband.h"
#include "system/system-variables.h"
#include "util/flag-group.h"
#include "util/object-sort.h"
#include "monster-race/monster-race.h"
#include "object/object-value.h"
+#include "object/tval-types.h"
#include "perception/object-perception.h"
#include "player/player-realm.h"
#include "system/monster-race-definition.h"
#include "flavor/flavor-describer.h"
#include "flavor/object-flavor-types.h"
#include "object-enchant/special-object-flags.h"
+#include "object/tval-types.h"
#include "perception/object-perception.h"
#include "player-base/player-class.h"
#include "realm/realm-names-table.h"
#include "object-enchant/special-object-flags.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
+#include "object/tval-types.h"
#include "perception/object-perception.h"
#include "player-base/player-class.h"
#include "player-info/equipment-info.h"