RandomArtActType type = RandomArtActType::NONE;
int chance = 0;
switch (o_ptr->artifact_bias) {
- case BIAS_ELEC:
+ case RandomArtifactBias::ELEC:
type = invest_activation_elec();
chance = 101;
break;
- case BIAS_POIS:
+ case RandomArtifactBias::POIS:
type = RandomArtActType::BA_POIS_1;
chance = 101;
break;
- case BIAS_FIRE:
+ case RandomArtifactBias::FIRE:
type = invest_activation_fire();
chance = 101;
break;
- case BIAS_COLD:
+ case RandomArtifactBias::COLD:
type = invest_activation_cold();
chance = 101;
break;
- case BIAS_CHAOS:
+ case RandomArtifactBias::ACID:
+ case RandomArtifactBias::STR:
+ case RandomArtifactBias::INT:
+ case RandomArtifactBias::WIS:
+ case RandomArtifactBias::DEX:
+ case RandomArtifactBias::CON:
+ case RandomArtifactBias::CHR:
+ break;
+ case RandomArtifactBias::CHAOS:
type = invest_activation_chaos();
chance = 50;
break;
- case BIAS_PRIESTLY:
+ case RandomArtifactBias::PRIESTLY:
type = invest_activation_priest();
chance = 101;
break;
- case BIAS_NECROMANTIC:
+ case RandomArtifactBias::NECROMANTIC:
type = invest_activation_necromancy();
chance = 101;
break;
- case BIAS_LAW:
+ case RandomArtifactBias::LAW:
type = invest_activation_law();
chance = 101;
break;
- case BIAS_ROGUE:
+ case RandomArtifactBias::ROGUE:
type = invest_activation_rogue();
chance = 101;
break;
- case BIAS_MAGE:
+ case RandomArtifactBias::MAGE:
type = invest_activation_mage();
chance = 66;
break;
- case BIAS_WARRIOR:
+ case RandomArtifactBias::WARRIOR:
type = invest_activation_warrior();
chance = 80;
break;
- case BIAS_RANGER:
+ case RandomArtifactBias::RANGER:
type = invest_activation_ranger();
chance = 101;
break;
+ default:
+ THROW_EXCEPTION(std::runtime_error, "Invalid artifact bias was set!");
}
if ((type == RandomArtActType::NONE) || (randint1(100) >= chance)) {
* @brief ランダムアーティファクトのバイアス定義
*/
-enum random_art_bias_type : int {
- BIAS_NONE = 0,
- BIAS_ELEC = 1, /*!< ランダムアーティファクトバイアス:電撃 */
- BIAS_POIS = 2, /*!< ランダムアーティファクトバイアス:毒 */
- BIAS_FIRE = 3, /*!< ランダムアーティファクトバイアス:火炎 */
- BIAS_COLD = 4, /*!< ランダムアーティファクトバイアス:冷気 */
- BIAS_ACID = 5, /*!< ランダムアーティファクトバイアス:酸 */
- BIAS_STR = 6, /*!< ランダムアーティファクトバイアス:腕力 */
- BIAS_INT = 7, /*!< ランダムアーティファクトバイアス:知力 */
- BIAS_WIS = 8, /*!< ランダムアーティファクトバイアス:賢さ */
- BIAS_DEX = 9, /*!< ランダムアーティファクトバイアス:器用さ */
- BIAS_CON = 10, /*!< ランダムアーティファクトバイアス:耐久 */
- BIAS_CHR = 11, /*!< ランダムアーティファクトバイアス:魅力 */
- BIAS_CHAOS = 12, /*!< ランダムアーティファクトバイアス:混沌 */
- BIAS_PRIESTLY = 13, /*!< ランダムアーティファクトバイアス:プリースト系 */
- BIAS_NECROMANTIC = 14, /*!< ランダムアーティファクトバイアス:死霊 */
- BIAS_LAW = 15, /*!< ランダムアーティファクトバイアス:法 */
- BIAS_ROGUE = 16, /*!< ランダムアーティファクトバイアス:盗賊系 */
- BIAS_MAGE = 17, /*!< ランダムアーティファクトバイアス:メイジ系 */
- BIAS_WARRIOR = 18, /*!< ランダムアーティファクトバイアス:戦士系 */
- BIAS_RANGER = 19, /*!< ランダムアーティファクトバイアス:レンジャー系 */
- MAX_BIAS = 20, /*!< ランダムアーティファクトバイアス:最大数 */
+enum class RandomArtifactBias : int {
+ NONE = 0,
+ ELEC = 1, /*!< ランダムアーティファクトバイアス:電撃 */
+ POIS = 2, /*!< ランダムアーティファクトバイアス:毒 */
+ FIRE = 3, /*!< ランダムアーティファクトバイアス:火炎 */
+ COLD = 4, /*!< ランダムアーティファクトバイアス:冷気 */
+ ACID = 5, /*!< ランダムアーティファクトバイアス:酸 */
+ STR = 6, /*!< ランダムアーティファクトバイアス:腕力 */
+ INT = 7, /*!< ランダムアーティファクトバイアス:知力 */
+ WIS = 8, /*!< ランダムアーティファクトバイアス:賢さ */
+ DEX = 9, /*!< ランダムアーティファクトバイアス:器用さ */
+ CON = 10, /*!< ランダムアーティファクトバイアス:耐久 */
+ CHR = 11, /*!< ランダムアーティファクトバイアス:魅力 */
+ CHAOS = 12, /*!< ランダムアーティファクトバイアス:混沌 */
+ PRIESTLY = 13, /*!< ランダムアーティファクトバイアス:プリースト系 */
+ NECROMANTIC = 14, /*!< ランダムアーティファクトバイアス:死霊 */
+ LAW = 15, /*!< ランダムアーティファクトバイアス:法 */
+ ROGUE = 16, /*!< ランダムアーティファクトバイアス:盗賊系 */
+ MAGE = 17, /*!< ランダムアーティファクトバイアス:メイジ系 */
+ WARRIOR = 18, /*!< ランダムアーティファクトバイアス:戦士系 */
+ RANGER = 19, /*!< ランダムアーティファクトバイアス:レンジャー系 */
+ MAX,
};
return get_table_name();
}
- auto filename = get_random_art_filename(armour, power);
- auto random_artifact_name = get_random_line(filename.data(), item.artifact_bias);
+ const auto filename = get_random_art_filename(armour, power);
+ const auto random_artifact_name = get_random_line(filename.data(), enum2i(item.artifact_bias));
#ifdef JP
if (random_artifact_name) {
return *random_artifact_name;
case PlayerClassType::SAMURAI:
case PlayerClassType::CAVALRY:
case PlayerClassType::SMITH:
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
break;
case PlayerClassType::MAGE:
case PlayerClassType::HIGH_MAGE:
case PlayerClassType::SORCERER:
case PlayerClassType::MAGIC_EATER:
case PlayerClassType::BLUE_MAGE:
- o_ptr->artifact_bias = BIAS_MAGE;
+ o_ptr->artifact_bias = RandomArtifactBias::MAGE;
break;
case PlayerClassType::PRIEST:
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
break;
case PlayerClassType::ROGUE:
case PlayerClassType::NINJA:
- o_ptr->artifact_bias = BIAS_ROGUE;
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
*warrior_artifact_bias = 25;
break;
case PlayerClassType::RANGER:
case PlayerClassType::SNIPER:
- o_ptr->artifact_bias = BIAS_RANGER;
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
*warrior_artifact_bias = 30;
break;
case PlayerClassType::PALADIN:
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
*warrior_artifact_bias = 40;
break;
case PlayerClassType::WARRIOR_MAGE:
case PlayerClassType::RED_MAGE:
- o_ptr->artifact_bias = BIAS_MAGE;
+ o_ptr->artifact_bias = RandomArtifactBias::MAGE;
*warrior_artifact_bias = 40;
break;
case PlayerClassType::CHAOS_WARRIOR:
- o_ptr->artifact_bias = BIAS_CHAOS;
+ o_ptr->artifact_bias = RandomArtifactBias::CHAOS;
*warrior_artifact_bias = 40;
break;
case PlayerClassType::MONK:
case PlayerClassType::FORCETRAINER:
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
break;
case PlayerClassType::MINDCRAFTER:
case PlayerClassType::BARD:
if (randint1(5) > 2) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
case PlayerClassType::TOURIST:
if (randint1(5) > 2) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
break;
case PlayerClassType::IMITATOR:
if (randint1(2) > 1) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
break;
case PlayerClassType::BEASTMASTER:
- o_ptr->artifact_bias = BIAS_CHR;
+ o_ptr->artifact_bias = RandomArtifactBias::CHR;
*warrior_artifact_bias = 50;
break;
case PlayerClassType::MIRROR_MASTER:
if (randint1(4) > 1) {
- o_ptr->artifact_bias = BIAS_MAGE;
+ o_ptr->artifact_bias = RandomArtifactBias::MAGE;
} else {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
case PlayerClassType::ELEMENTALIST:
- o_ptr->artifact_bias = one_in_(2) ? BIAS_MAGE : BIAS_INT;
+ o_ptr->artifact_bias = one_in_(2) ? RandomArtifactBias::MAGE : RandomArtifactBias::INT;
break;
case PlayerClassType::MAX:
}
if (a_scroll && (randint1(100) <= warrior_artifact_bias)) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
}
o_ptr->randart_name = name_unnatural_random_artifact(player_ptr, o_ptr, a_scroll, power_level);
msg_format_wizard(player_ptr, CHEAT_OBJECT,
_("パワー %d で 価値 %d のランダムアーティファクト生成 バイアスは「%s」", "Random artifact generated - Power:%d Value:%d Bias:%s."), max_powers,
- total_flags, ARTIFACT_BIAS_NAMES.at(i2enum<random_art_bias_type>(o_ptr->artifact_bias)).data());
+ total_flags, ARTIFACT_BIAS_NAMES.at(o_ptr->artifact_bias).data());
static constexpr auto flags = {
SubWindowRedrawingFlag::INVENTORY,
SubWindowRedrawingFlag::EQUIPMENT,
*/
bool become_random_artifact(PlayerType *player_ptr, ItemEntity *o_ptr, bool a_scroll)
{
- o_ptr->artifact_bias = 0;
+ o_ptr->artifact_bias = RandomArtifactBias::NONE;
o_ptr->fa_id = FixedArtifactId::NONE;
o_ptr->ego_idx = EgoType::NONE;
o_ptr->art_flags |= o_ptr->get_baseitem().flags;
}
invest_negative_modified_value(o_ptr);
- if (((o_ptr->artifact_bias == BIAS_MAGE) || (o_ptr->artifact_bias == BIAS_INT)) && (o_ptr->bi_key.tval() == ItemKindType::GLOVES)) {
+ if (((o_ptr->artifact_bias == RandomArtifactBias::MAGE) || (o_ptr->artifact_bias == RandomArtifactBias::INT)) && (o_ptr->bi_key.tval() == ItemKindType::GLOVES)) {
o_ptr->art_flags.set(TR_FREE_ACT);
}
static bool switch_misc_bias(ItemEntity *o_ptr)
{
switch (o_ptr->artifact_bias) {
- case BIAS_RANGER:
+ case RandomArtifactBias::RANGER:
return invest_misc_ranger(o_ptr);
- case BIAS_STR:
+ case RandomArtifactBias::STR:
return invest_misc_strength(o_ptr);
- case BIAS_INT:
+ case RandomArtifactBias::INT:
return invest_misc_intelligence(o_ptr);
- case BIAS_WIS:
+ case RandomArtifactBias::WIS:
return invest_misc_wisdom(o_ptr);
- case BIAS_DEX:
+ case RandomArtifactBias::DEX:
return invest_misc_dexterity(o_ptr);
- case BIAS_CON:
+ case RandomArtifactBias::CON:
return invest_misc_constitution(o_ptr);
- case BIAS_CHR:
+ case RandomArtifactBias::CHR:
return invest_misc_charisma(o_ptr);
- case BIAS_CHAOS:
+ case RandomArtifactBias::CHAOS:
return invest_misc_chaos(o_ptr);
- case BIAS_FIRE:
+ case RandomArtifactBias::FIRE:
if (o_ptr->art_flags.has_not(TR_LITE_1)) {
o_ptr->art_flags.set(TR_LITE_1);
}
static void invest_misc_string_esp(ItemEntity *o_ptr)
{
- constexpr std::array<std::tuple<tr_type, random_art_bias_type, int>, 3> candidates = { {
- { TR_ESP_EVIL, BIAS_LAW, 3 },
- { TR_ESP_NONLIVING, BIAS_MAGE, 3 },
- { TR_TELEPATHY, BIAS_MAGE, 9 },
+ constexpr std::array<std::tuple<tr_type, RandomArtifactBias, int>, 3> candidates = { {
+ { TR_ESP_EVIL, RandomArtifactBias::LAW, 3 },
+ { TR_ESP_NONLIVING, RandomArtifactBias::MAGE, 3 },
+ { TR_TELEPATHY, RandomArtifactBias::MAGE, 9 },
} };
const auto &[flag, bias, denom] = rand_choice(candidates);
o_ptr->art_flags.set(flag);
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(denom)) {
+ if ((o_ptr->artifact_bias == RandomArtifactBias::NONE) && one_in_(denom)) {
o_ptr->artifact_bias = bias;
}
}
switch (num_esp) {
case 1:
o_ptr->art_flags.set(TR_ESP_ANIMAL);
- if (!o_ptr->artifact_bias && one_in_(4)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && one_in_(4)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
break;
case 2:
o_ptr->art_flags.set(TR_ESP_UNDEAD);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
- } else if (!o_ptr->artifact_bias && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
+ } else if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
}
break;
break;
case 8:
o_ptr->art_flags.set(TR_ESP_HUMAN);
- if (!o_ptr->artifact_bias && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
case 9:
o_ptr->art_flags.set(TR_ESP_GOOD);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_LAW;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::LAW;
}
break;
case 10:
o_ptr->art_flags.set(TR_ESP_UNIQUE);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_LAW;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::LAW;
}
break;
switch (randint1(34)) {
case 1:
o_ptr->art_flags.set(TR_SUST_STR);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_STR;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::STR;
}
break;
case 2:
o_ptr->art_flags.set(TR_SUST_INT);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_INT;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::INT;
}
break;
case 3:
o_ptr->art_flags.set(TR_SUST_WIS);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_WIS;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::WIS;
}
break;
case 4:
o_ptr->art_flags.set(TR_SUST_DEX);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_DEX;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::DEX;
}
break;
case 5:
o_ptr->art_flags.set(TR_SUST_CON);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_CON;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::CON;
}
break;
case 6:
o_ptr->art_flags.set(TR_SUST_CHR);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_CHR;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::CHR;
}
break;
break;
case 9:
o_ptr->art_flags.set(TR_HOLD_EXP);
- if (!o_ptr->artifact_bias && one_in_(5)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
- } else if (!o_ptr->artifact_bias && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias() && one_in_(5)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
+ } else if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
}
break;
static bool switch_random_art_bias(ItemEntity *o_ptr)
{
switch (o_ptr->artifact_bias) {
- case BIAS_WARRIOR:
+ case RandomArtifactBias::WARRIOR:
return random_art_bias_strength(o_ptr) || random_art_bias_constitution(o_ptr) || random_art_bias_dexterity(o_ptr);
- case BIAS_MAGE:
+ case RandomArtifactBias::MAGE:
return random_art_bias_intelligence(o_ptr) || random_art_bias_magic_mastery(o_ptr);
- case BIAS_RANGER:
+ case RandomArtifactBias::RANGER:
return random_art_bias_dexterity(o_ptr) || random_art_bias_constitution(o_ptr) || random_art_bias_strength(o_ptr);
- case BIAS_ROGUE:
+ case RandomArtifactBias::ROGUE:
return random_art_bias_stealth(o_ptr) || random_art_bias_search(o_ptr);
- case BIAS_STR:
+ case RandomArtifactBias::STR:
return random_art_bias_strength(o_ptr);
- case BIAS_INT:
+ case RandomArtifactBias::INT:
return random_art_bias_intelligence(o_ptr);
- case BIAS_PRIESTLY:
- case BIAS_WIS:
+ case RandomArtifactBias::PRIESTLY:
+ case RandomArtifactBias::WIS:
return random_art_bias_wisdom(o_ptr);
- case BIAS_DEX:
+ case RandomArtifactBias::DEX:
return random_art_bias_dexterity(o_ptr);
- case BIAS_CON:
+ case RandomArtifactBias::CON:
return random_art_bias_constitution(o_ptr);
- case BIAS_CHR:
+ case RandomArtifactBias::CHR:
return random_art_bias_charisma(o_ptr);
default:
return false;
static bool random_art_bias_decrease_mana(ItemEntity *o_ptr)
{
- auto should_skip = (o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY);
+ auto should_skip = (o_ptr->artifact_bias != RandomArtifactBias::MAGE) && (o_ptr->artifact_bias != RandomArtifactBias::PRIESTLY);
should_skip |= o_ptr->bi_key != BaseitemKey(ItemKindType::SOFT_ARMOR, SV_ROBE);
should_skip |= o_ptr->art_flags.has(TR_DEC_MANA);
if (should_skip || !one_in_(3)) {
case 1:
case 2:
o_ptr->art_flags.set(TR_STR);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_STR;
- } else if (!o_ptr->artifact_bias && one_in_(7)) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::STR;
+ } else if (!o_ptr->has_bias() && one_in_(7)) {
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
break;
case 3:
case 4:
o_ptr->art_flags.set(TR_INT);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_INT;
- } else if (!o_ptr->artifact_bias && one_in_(7)) {
- o_ptr->artifact_bias = BIAS_MAGE;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::INT;
+ } else if (!o_ptr->has_bias() && one_in_(7)) {
+ o_ptr->artifact_bias = RandomArtifactBias::MAGE;
}
break;
case 5:
case 6:
o_ptr->art_flags.set(TR_WIS);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_WIS;
- } else if (!o_ptr->artifact_bias && one_in_(7)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::WIS;
+ } else if (!o_ptr->has_bias() && one_in_(7)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
case 7:
case 8:
o_ptr->art_flags.set(TR_DEX);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_DEX;
- } else if (!o_ptr->artifact_bias && one_in_(7)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::DEX;
+ } else if (!o_ptr->has_bias() && one_in_(7)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
case 9:
case 10:
o_ptr->art_flags.set(TR_CON);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_CON;
- } else if (!o_ptr->artifact_bias && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::CON;
+ } else if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
break;
case 11:
case 12:
o_ptr->art_flags.set(TR_CHR);
- if (!o_ptr->artifact_bias && !one_in_(13)) {
- o_ptr->artifact_bias = BIAS_CHR;
+ if (!o_ptr->has_bias() && !one_in_(13)) {
+ o_ptr->artifact_bias = RandomArtifactBias::CHR;
}
break;
case 13:
case 14:
o_ptr->art_flags.set(TR_STEALTH);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
case 15:
case 16:
o_ptr->art_flags.set(TR_SEARCH);
- if (!o_ptr->artifact_bias && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
break;
break;
case 19:
o_ptr->art_flags.set(TR_SPEED);
- if (!o_ptr->artifact_bias && one_in_(11)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && one_in_(11)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
}
o_ptr->art_flags.set(TR_BLOWS);
- if (!o_ptr->artifact_bias && one_in_(11)) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ if (!o_ptr->has_bias() && one_in_(11)) {
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
break;
static bool switch_random_art_resistance(ItemEntity *o_ptr)
{
switch (o_ptr->artifact_bias) {
- case BIAS_ACID:
+ case RandomArtifactBias::ACID:
return random_art_resistance(o_ptr, TR_RES_ACID) || random_art_immunity(o_ptr, TR_IM_ACID);
- case BIAS_ELEC:
+ case RandomArtifactBias::ELEC:
return random_art_resistance(o_ptr, TR_RES_ELEC) || random_art_aura(o_ptr, TR_SH_ELEC) || random_art_immunity(o_ptr, TR_IM_ELEC);
- case BIAS_FIRE:
+ case RandomArtifactBias::FIRE:
return random_art_resistance(o_ptr, TR_RES_FIRE) || random_art_aura(o_ptr, TR_SH_FIRE) || random_art_immunity(o_ptr, TR_IM_FIRE);
- case BIAS_COLD:
+ case RandomArtifactBias::COLD:
return random_art_resistance(o_ptr, TR_RES_COLD) || random_art_aura(o_ptr, TR_SH_COLD) || random_art_immunity(o_ptr, TR_IM_COLD);
- case BIAS_POIS:
+ case RandomArtifactBias::POIS:
return random_art_resistance(o_ptr, TR_RES_POIS);
- case BIAS_PRIESTLY:
+ case RandomArtifactBias::PRIESTLY:
return random_art_resistance(o_ptr, TR_RES_CURSE);
- case BIAS_WARRIOR:
+ case RandomArtifactBias::WARRIOR:
return random_art_resistance(o_ptr, TR_RES_FEAR, one_in_(3)) || random_art_resistance(o_ptr, TR_NO_MAGIC, !one_in_(3));
- case BIAS_RANGER:
+ case RandomArtifactBias::RANGER:
return random_art_resistance(o_ptr, TR_RES_WATER) || random_art_resistance(o_ptr, TR_RES_POIS);
- case BIAS_NECROMANTIC:
+ case RandomArtifactBias::NECROMANTIC:
return random_art_resistance(o_ptr, TR_RES_NETHER) || random_art_resistance(o_ptr, TR_RES_POIS) || random_art_resistance(o_ptr, TR_RES_DARK);
- case BIAS_CHAOS:
+ case RandomArtifactBias::CHAOS:
return random_art_resistance(o_ptr, TR_RES_CHAOS) || random_art_resistance(o_ptr, TR_RES_CONF) || random_art_resistance(o_ptr, TR_RES_DISEN);
default:
return false;
}
o_ptr->art_flags.set(TR_IM_ACID);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ACID;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ACID;
}
}
}
o_ptr->art_flags.set(TR_IM_ELEC);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ELEC;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ELEC;
}
}
}
o_ptr->art_flags.set(TR_IM_COLD);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_COLD;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::COLD;
}
}
}
o_ptr->art_flags.set(TR_IM_FIRE);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_FIRE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::FIRE;
}
}
static void set_bias_pois(ItemEntity *o_ptr)
{
o_ptr->art_flags.set(TR_RES_POIS);
- if (!o_ptr->artifact_bias && !one_in_(4)) {
- o_ptr->artifact_bias = BIAS_POIS;
+ if (!o_ptr->has_bias() && !one_in_(4)) {
+ o_ptr->artifact_bias = RandomArtifactBias::POIS;
return;
}
- if (!o_ptr->artifact_bias && one_in_(2)) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias() && one_in_(2)) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
return;
}
- if (!o_ptr->artifact_bias && one_in_(2)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && one_in_(2)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
}
random_resistance(o_ptr);
}
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ELEC;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ELEC;
}
}
random_resistance(o_ptr);
}
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_FIRE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::FIRE;
}
}
random_resistance(o_ptr);
}
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_COLD;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::COLD;
}
}
case 6:
case 13:
o_ptr->art_flags.set(TR_RES_ACID);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ACID;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ACID;
}
break;
case 8:
case 14:
o_ptr->art_flags.set(TR_RES_ELEC);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ELEC;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ELEC;
}
break;
case 10:
case 15:
o_ptr->art_flags.set(TR_RES_FIRE);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_FIRE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::FIRE;
}
break;
case 12:
case 16:
o_ptr->art_flags.set(TR_RES_COLD);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_COLD;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::COLD;
}
break;
case 19:
case 20:
o_ptr->art_flags.set(TR_RES_FEAR);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
break;
case 25:
case 26:
o_ptr->art_flags.set(TR_RES_CONF);
- if (!o_ptr->artifact_bias && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_CHAOS;
+ if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::CHAOS;
}
break;
case 31:
case 32:
o_ptr->art_flags.set(TR_RES_NETHER);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
}
break;
case 35:
case 36:
o_ptr->art_flags.set(TR_RES_CHAOS);
- if (!o_ptr->artifact_bias && one_in_(2)) {
- o_ptr->artifact_bias = BIAS_CHAOS;
+ if (!o_ptr->has_bias() && one_in_(2)) {
+ o_ptr->artifact_bias = RandomArtifactBias::CHAOS;
}
break;
break;
case 40:
o_ptr->art_flags.set(TR_RES_WATER);
- if (!o_ptr->artifact_bias && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
break;
case 41:
o_ptr->art_flags.set(TR_RES_CURSE);
- if (!o_ptr->artifact_bias && one_in_(3)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ if (!o_ptr->has_bias() && one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
case 42:
o_ptr->art_flags.reset(TR_XTRA_SHOTS);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
return true;
o_ptr->art_flags.reset(TR_XTRA_MIGHT);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_RANGER;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::RANGER;
}
return true;
static bool switch_random_art_slay(ItemEntity *o_ptr)
{
switch (o_ptr->artifact_bias) {
- case BIAS_CHAOS:
+ case RandomArtifactBias::CHAOS:
return random_art_slay_chaos(o_ptr);
- case BIAS_MAGE:
- case BIAS_INT:
+ case RandomArtifactBias::MAGE:
+ case RandomArtifactBias::INT:
return random_art_brand_magical(o_ptr);
- case BIAS_PRIESTLY: {
+ case RandomArtifactBias::PRIESTLY: {
const auto tval = o_ptr->bi_key.tval();
if (((tval == ItemKindType::SWORD) || (tval == ItemKindType::POLEARM)) && o_ptr->art_flags.has_not(TR_BLESSED)) {
o_ptr->art_flags.set(TR_BLESSED);
return false;
}
- case BIAS_NECROMANTIC:
+ case RandomArtifactBias::NECROMANTIC:
return random_art_slay_vampiric(o_ptr) || random_art_slay_brand_pois(o_ptr);
- case BIAS_RANGER:
+ case RandomArtifactBias::RANGER:
return random_art_slay_animal(o_ptr);
- case BIAS_ROGUE: {
+ case RandomArtifactBias::ROGUE: {
auto is_throwable = o_ptr->bi_key == BaseitemKey(ItemKindType::SWORD, SV_DAGGER);
is_throwable |= o_ptr->bi_key == BaseitemKey(ItemKindType::POLEARM, SV_SPEAR);
if (is_throwable && o_ptr->art_flags.has_not(TR_THROW)) {
return random_art_slay_brand_pois(o_ptr);
}
- case BIAS_POIS:
+ case RandomArtifactBias::POIS:
return random_art_slay_brand_pois(o_ptr);
- case BIAS_ACID:
+ case RandomArtifactBias::ACID:
return random_art_slay_brand_acid(o_ptr);
- case BIAS_ELEC:
+ case RandomArtifactBias::ELEC:
return random_art_slay_brand_elec(o_ptr);
- case BIAS_FIRE:
+ case RandomArtifactBias::FIRE:
return random_art_slay_brand_fire(o_ptr);
- case BIAS_COLD:
+ case RandomArtifactBias::COLD:
return random_art_slay_brand_cold(o_ptr);
- case BIAS_LAW:
+ case RandomArtifactBias::LAW:
return random_art_slay_evil(o_ptr) || random_art_slay_undead(o_ptr) || random_art_slay_demon(o_ptr);
default:
return false;
o_ptr->art_flags.set(TR_SLAY_EVIL);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(2)) {
- o_ptr->artifact_bias = BIAS_LAW;
+ if (!o_ptr->has_bias() && one_in_(2)) {
+ o_ptr->artifact_bias = RandomArtifactBias::LAW;
break;
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
o_ptr->art_flags.set(TR_SLAY_UNDEAD);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
o_ptr->art_flags.set(TR_SLAY_DEMON);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_PRIESTLY;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::PRIESTLY;
}
break;
}
o_ptr->art_flags.set(TR_VORPAL);
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_WARRIOR;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::WARRIOR;
}
break;
case 21:
case 22:
o_ptr->art_flags.set(TR_BRAND_FIRE);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_FIRE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::FIRE;
}
break;
case 23:
case 24:
o_ptr->art_flags.set(TR_BRAND_COLD);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_COLD;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::COLD;
}
break;
case 25:
case 26:
o_ptr->art_flags.set(TR_BRAND_ELEC);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_ELEC;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ELEC;
}
break;
case 27:
case 28:
o_ptr->art_flags.set(TR_BRAND_ACID);
- if (!o_ptr->artifact_bias) {
- o_ptr->artifact_bias = BIAS_ACID;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ACID;
}
break;
case 29:
case 30:
o_ptr->art_flags.set(TR_BRAND_POIS);
- if ((o_ptr->artifact_bias == BIAS_NONE) && !one_in_(3)) {
- o_ptr->artifact_bias = BIAS_POIS;
+ if (!o_ptr->has_bias() && !one_in_(3)) {
+ o_ptr->artifact_bias = RandomArtifactBias::POIS;
break;
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(6)) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias() && one_in_(6)) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
break;
}
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
case 31:
o_ptr->art_flags.set(TR_VAMPIRIC);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_NECROMANTIC;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::NECROMANTIC;
}
break;
case 32:
o_ptr->art_flags.set(TR_FORCE_WEAPON);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = (one_in_(2) ? BIAS_MAGE : BIAS_PRIESTLY);
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = (one_in_(2) ? RandomArtifactBias::MAGE : RandomArtifactBias::PRIESTLY);
}
break;
break;
case 35:
o_ptr->art_flags.set(TR_BRAND_MAGIC);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_MAGE;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::MAGE;
}
break;
case 36:
case 37:
o_ptr->art_flags.set(TR_CHAOTIC);
- if (o_ptr->artifact_bias == BIAS_NONE) {
- o_ptr->artifact_bias = BIAS_CHAOS;
+ if (!o_ptr->has_bias()) {
+ o_ptr->artifact_bias = RandomArtifactBias::CHAOS;
}
break;
o_ptr->art_flags.set(TR_SLAY_GOOD);
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(2)) {
- o_ptr->artifact_bias = BIAS_POIS;
+ if (!o_ptr->has_bias() && one_in_(2)) {
+ o_ptr->artifact_bias = RandomArtifactBias::POIS;
break;
}
- if ((o_ptr->artifact_bias == BIAS_NONE) && one_in_(9)) {
- o_ptr->artifact_bias = BIAS_ROGUE;
+ if (!o_ptr->has_bias() && one_in_(9)) {
+ o_ptr->artifact_bias = RandomArtifactBias::ROGUE;
}
break;
#include "system/item-entity.h"
#include "artifact/fixed-art-types.h"
+#include "artifact/random-art-bias-types.h"
#include "artifact/random-art-effects.h"
#include "monster-race/monster-race.h"
#include "object-enchant/activation-info-table.h"
return this->get_activation_index() != RandomArtActType::NONE;
}
+bool ItemEntity::has_bias() const
+{
+ return this->artifact_bias != RandomArtifactBias::NONE;
+}
+
BaseitemInfo &ItemEntity::get_baseitem() const
{
return BaseitemList::get_instance().get_baseitem(this->bi_id);
enum class FixedArtifactId : short;
enum class ItemKindType : short;
enum class SmithEffectType : int16_t;
+enum class RandomArtifactBias : int;
enum class RandomArtActType : short;
class ActivationType;
TrFlags art_flags{}; /*!< Extra Flags for ego and artifacts */
EnumClassFlagGroup<CurseTraitType> curse_flags{}; /*!< Flags for curse */
MONSTER_IDX held_m_idx{}; /*!< アイテムを所持しているモンスターID (いないなら 0) / Monster holding us (if any) */
- int artifact_bias{}; /*!< ランダムアーティファクト生成時のバイアスID */
+ RandomArtifactBias artifact_bias{}; /*!< ランダムアーティファクト生成時のバイアスID */
void wipe();
void copy_from(const ItemEntity *j_ptr);
bool is_inscribed() const;
std::vector<ActivationType>::const_iterator find_activation_info() const;
bool has_activation() const;
+ bool has_bias() const;
BaseitemInfo &get_baseitem() const;
EgoItemDefinition &get_ego() const;
/*!
* @brief ランダムアーティファクトのバイアス名称テーブル
*/
-const std::map<random_art_bias_type, std::string> ARTIFACT_BIAS_NAMES = {
- { BIAS_NONE, _("なし", "None") },
- { BIAS_ELEC, _("電撃", "Elec") },
- { BIAS_POIS, _("毒", "Poison") },
- { BIAS_FIRE, _("火炎", "Fire") },
- { BIAS_COLD, _("冷気", "Cold") },
- { BIAS_ACID, _("酸", "Acid") },
- { BIAS_STR, _("腕力", "STR") },
- { BIAS_INT, _("知力", "INT") },
- { BIAS_WIS, _("賢さ", "WIS") },
- { BIAS_DEX, _("器用さ", "DEX") },
- { BIAS_CON, _("耐久", "CON") },
- { BIAS_CHR, _("魅力", "CHA") },
- { BIAS_CHAOS, _("混沌", "Chaos") },
- { BIAS_PRIESTLY, _("プリースト", "Priestly") },
- { BIAS_NECROMANTIC, _("死霊", "Necromantic") },
- { BIAS_LAW, _("法", "Law") },
- { BIAS_ROGUE, _("盗賊", "Rogue") },
- { BIAS_MAGE, _("メイジ", "Mage") },
- { BIAS_WARRIOR, _("戦士", "Warrior") },
- { BIAS_RANGER, _("レンジャー", "Ranger") },
+const std::map<RandomArtifactBias, std::string> ARTIFACT_BIAS_NAMES = {
+ { RandomArtifactBias::NONE, _("なし", "None") },
+ { RandomArtifactBias::ELEC, _("電撃", "Elec") },
+ { RandomArtifactBias::POIS, _("毒", "Poison") },
+ { RandomArtifactBias::FIRE, _("火炎", "Fire") },
+ { RandomArtifactBias::COLD, _("冷気", "Cold") },
+ { RandomArtifactBias::ACID, _("酸", "Acid") },
+ { RandomArtifactBias::STR, _("腕力", "STR") },
+ { RandomArtifactBias::INT, _("知力", "INT") },
+ { RandomArtifactBias::WIS, _("賢さ", "WIS") },
+ { RandomArtifactBias::DEX, _("器用さ", "DEX") },
+ { RandomArtifactBias::CON, _("耐久", "CON") },
+ { RandomArtifactBias::CHR, _("魅力", "CHA") },
+ { RandomArtifactBias::CHAOS, _("混沌", "Chaos") },
+ { RandomArtifactBias::PRIESTLY, _("プリースト", "Priestly") },
+ { RandomArtifactBias::NECROMANTIC, _("死霊", "Necromantic") },
+ { RandomArtifactBias::LAW, _("法", "Law") },
+ { RandomArtifactBias::ROGUE, _("盗賊", "Rogue") },
+ { RandomArtifactBias::MAGE, _("メイジ", "Mage") },
+ { RandomArtifactBias::WARRIOR, _("戦士", "Warrior") },
+ { RandomArtifactBias::RANGER, _("レンジャー", "Ranger") },
};
#include <map>
#include <string>
-enum random_art_bias_type : int;
-extern const std::map<random_art_bias_type, std::string> ARTIFACT_BIAS_NAMES;
+enum class RandomArtifactBias : int;
+extern const std::map<RandomArtifactBias, std::string> ARTIFACT_BIAS_NAMES;