1 #include "player-status/player-charisma.h"
2 #include "mutation/mutation-flag-types.h"
3 #include "object/object-flags.h"
4 #include "player/mimic-info-table.h"
5 #include "player/player-class.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 "util/bit-flags-calculator.h"
13 void PlayerCharisma::set_locals()
15 this->max_value = +99;
16 this->min_value = -99;
17 this->status_type = A_CHR;
18 this->tr_flag = TR_CHR;
19 this->tr_bad_flag = TR_CHR;
29 s16b PlayerCharisma::battleform_value()
33 if (any_bits(this->owner_ptr->special_defense, KATA_KOUKIJIN)) {
45 * * 変異MUT3_FLESH_ROTで減算(-1)
46 * * 変異MUT3_SILLY_VOIで減算(-4)
47 * * 変異MUT3_BLANK_FACで減算(-1)
48 * * 変異MUT3_WART_SKINで減算(-2)
49 * * 変異MUT3_SCALESで減算(-1)
51 s16b PlayerCharisma::mutation_value()
55 if (this->owner_ptr->muta3) {
56 if (any_bits(this->owner_ptr->muta3, MUT3_FLESH_ROT)) {
59 if (any_bits(this->owner_ptr->muta3, MUT3_SILLY_VOI)) {
62 if (any_bits(this->owner_ptr->muta3, MUT3_BLANK_FAC)) {
65 if (any_bits(this->owner_ptr->muta3, MUT3_WART_SKIN)) {
68 if (any_bits(this->owner_ptr->muta3, MUT3_SCALES)) {
76 s16b PlayerCharisma::set_exception_value(s16b value)
80 if (any_bits(this->owner_ptr->muta3, MUT3_ILL_NORM)) {
87 BIT_FLAGS PlayerCharisma::getAllFlags()
89 BIT_FLAGS flags = PlayerStatusBase::getAllFlags();
91 if (any_bits(this->owner_ptr->muta3, MUT3_ILL_NORM)) {
92 set_bits(flags, FLAG_CAUSE_MUTATION);
98 BIT_FLAGS PlayerCharisma::getBadFlags()
100 BIT_FLAGS flags = PlayerStatusBase::getBadFlags();
102 if (any_bits(this->owner_ptr->muta3, MUT3_ILL_NORM)) {
103 set_bits(flags, FLAG_CAUSE_MUTATION);
110 * @brief ステータス現在値更新の例外処理
111 * @params 通常処理されたステータスの値
112 * @returns 例外処理されたステータスの値
114 * * MUT3_ILL_NORMを保持しているときの例外処理。
115 * * 魅力現在値をレベル依存の値に修正する。
117 s16b PlayerCharisma::set_exception_use_status(s16b value)
119 if (any_bits(this->owner_ptr->muta3, MUT3_ILL_NORM)) {
120 /* 10 to 18/90 charisma, guaranteed, based on level */
121 if (value < 8 + 2 * this->owner_ptr->lev) {
122 value = 8 + 2 * this->owner_ptr->lev;