void AmuletEnchanter::sval_enchant()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
void AmuletEnchanter::give_high_ego_index()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
, power(power)
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
void LiteEnchanter::add_dark_flag()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
auto &r_ref = monraces_info[r_idx];
auto check = (floor_ptr->dun_level < r_ref.level) ? (r_ref.level - floor_ptr->dun_level) : 0;
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
continue;
}
void RingEnchanter::sval_enchant()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
void RingEnchanter::give_high_ego_index()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
void SoftArmorEnchanter::sval_enchant()
{
const auto sval = this->o_ptr->bi_key.sval();
- if (!sval.has_value()) {
+ if (!sval) {
return;
}
}
const auto chainsword_noise = get_random_line(_("chainswd_j.txt", "chainswd.txt"), 0);
- if (chainsword_noise.has_value()) {
+ if (chainsword_noise) {
msg_print(chainsword_noise.value());
}
}
{
static std::string activation_detail;
auto tmp_act_ptr = find_activation_info(o_ptr);
- if (!tmp_act_ptr.has_value()) {
+ if (!tmp_act_ptr) {
return _("未定義", "something undefined");
}
short lookup_baseitem_id(const BaseitemKey &key)
{
const auto sval = key.sval();
- if (sval.has_value()) {
+ if (sval) {
return exe_lookup(key);
}
/* Also, give some extra for activatable powers... */
if (o_ptr->is_random_artifact() && o_ptr->art_flags.has(TR_ACTIVATE)) {
auto act_ptr = find_activation_info(o_ptr);
- if (act_ptr.has_value()) {
+ if (act_ptr) {
total += act_ptr.value()->value;
}
}
if (this->player_ptr->lev < cond.level) {
continue;
}
- if (cond.pclass.has_value()) {
+ if (cond.pclass) {
auto is_class_equal = PlayerClass(this->player_ptr).equals(cond.pclass.value());
if (cond.not_class && is_class_equal) {
continue;
const auto prompt = winning_seppuku ? _("辞世の句: ", "Haiku: ") : _("断末魔の叫び: ", "Last words: ");
while (true) {
const auto input_last_words = input_string(prompt, max_last_words, death_message);
- if (!input_last_words.has_value()) {
+ if (!input_last_words) {
continue;
}
const auto copy_size = sizeof(player_ptr->name);
constexpr auto prompt = _("キャラクターの名前を入力して下さい: ", "Enter a name for your character: ");
const auto name = input_string(prompt, max_name_size, initial_name);
- if (name.has_value()) {
+ if (name) {
if (!name->empty()) {
angband_strcpy(player_ptr->name, name.value(), copy_size);
}
};
const auto r_idx = select_r_idx();
- if (!r_idx.has_value()) {
+ if (!r_idx) {
return false;
}