1 #include "player-ability/player-strength.h"
2 #include "mutation/mutation-flag-types.h"
3 #include "object/object-flags.h"
4 #include "player-base/player-class.h"
5 #include "player-base/player-race.h"
6 #include "player-info/monk-data-type.h"
7 #include "player-info/samurai-data-type.h"
8 #include "player/player-personality.h"
9 #include "player/race-info-table.h"
10 #include "player/special-defense-types.h"
11 #include "realm/realm-hex-numbers.h"
12 #include "realm/realm-types.h"
13 #include "spell-realm/spells-hex.h"
14 #include "system/player-type-definition.h"
15 #include "util/bit-flags-calculator.h"
17 PlayerStrength::PlayerStrength(player_type *player_ptr)
18 : PlayerBasicStatistics(player_ptr)
22 void PlayerStrength::set_locals()
24 this->max_value = +99;
25 this->min_value = -99;
26 this->ability_type = A_STR;
27 this->tr_flag = TR_STR;
28 this->tr_bad_flag = TR_STR;
35 int16_t PlayerStrength::race_value()
37 int16_t result = PlayerBasicStatistics::race_value();
39 result += PlayerRace(this->player_ptr).additional_strength();
45 * @brief 腕力補正計算 - 一時効果
51 * * ネオ・つよしスペシャル中で加算(+4)
53 int16_t PlayerStrength::time_effect_value()
57 if (this->player_ptr->realm1 == REALM_HEX) {
58 SpellHex spell_hex(this->player_ptr);
59 if (spell_hex.is_spelling_specific(HEX_XTRA_MIGHT)) {
62 if (spell_hex.is_spelling_specific(HEX_BUILDING)) {
67 if (this->player_ptr->tsuyoshi) {
83 int16_t PlayerStrength::stance_value()
87 PlayerClass pc(player_ptr);
88 if (pc.samurai_stance_is(SamuraiStance::KOUKIJIN)) {
92 if (pc.monk_stance_is(MonkStance::BYAKKO)) {
94 } else if (pc.monk_stance_is(MonkStance::SUZAKU)) {
106 * * 変異MUT3_HYPER_STRで加算(+4)
107 * * 変異MUT3_PUNYで減算(-4)
109 int16_t PlayerStrength::mutation_value()
113 if (this->player_ptr->muta.any()) {
114 if (this->player_ptr->muta.has(PlayerMutationType::HYPER_STR)) {
118 if (this->player_ptr->muta.has(PlayerMutationType::PUNY)) {