1 #include "player-ability/player-constitution.h"
2 #include "mutation/mutation-flag-types.h"
3 #include "object/object-flags.h"
4 #include "player-base/player-race.h"
5 #include "player-info/class-info.h"
6 #include "player/player-personality.h"
7 #include "player/race-info-table.h"
8 #include "player/special-defense-types.h"
9 #include "realm/realm-hex-numbers.h"
10 #include "spell-realm/spells-hex.h"
11 #include "system/player-type-definition.h"
12 #include "util/bit-flags-calculator.h"
14 void PlayerConstitution::set_locals()
16 this->max_value = +99;
17 this->min_value = -99;
18 this->ability_type = A_CON;
19 this->tr_flag = TR_CON;
20 this->tr_bad_flag = TR_CON;
28 * * エントは別途レベル26,41,46到達ごとに加算(+1)
30 int16_t PlayerConstitution::race_value()
32 int16_t result = PlayerBasicStatistics::race_value();
34 if (PlayerRace(this->owner_ptr).equals(player_race_type::ENT)) {
35 if (this->owner_ptr->lev > 25)
37 if (this->owner_ptr->lev > 40)
39 if (this->owner_ptr->lev > 45)
47 * @brief 耐久力補正計算 - 一時効果
53 int16_t PlayerConstitution::time_effect_value()
57 if (this->owner_ptr->realm1 == REALM_HEX) {
58 if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_BUILDING)) {
75 * * ネオ・つよしスペシャル中で加算(+4)
77 int16_t PlayerConstitution::battleform_value()
81 if (any_bits(this->owner_ptr->special_defense, KATA_KOUKIJIN)) {
85 if (any_bits(this->owner_ptr->special_defense, KAMAE_BYAKKO)) {
87 } else if (any_bits(this->owner_ptr->special_defense, KAMAE_GENBU)) {
89 } else if (any_bits(this->owner_ptr->special_defense, KAMAE_SUZAKU)) {
92 if (this->owner_ptr->tsuyoshi) {
100 * @brief 耐久力補正計算 - 変異
104 * * 変異MUT3_RESILIENTで加算(+4)
105 * * 変異MUT3_ALBINOで減算(-4)
106 * * 変異MUT3_XTRA_FATで加算(+2)
107 * * 変異MUT3_FLESH_ROTで減算(-2)
109 int16_t PlayerConstitution::mutation_value()
113 if (this->owner_ptr->muta.any()) {
114 if (this->owner_ptr->muta.has(MUTA::RESILIENT)) {
118 if (this->owner_ptr->muta.has(MUTA::ALBINO)) {
122 if (this->owner_ptr->muta.has(MUTA::XTRA_FAT)) {
126 if (this->owner_ptr->muta.has(MUTA::FLESH_ROT)) {