return false;
}
- if (i >= '1' && i <= '4') {
+ if ((i >= '1') && (i <= '4')) {
melee_arena.set_bet_number(i - '1');
melee_arena.update_odds();
break;
}
- else {
- bell();
- }
+ bell();
}
clear_bldg(4, 4);
}
msg_print(nullptr);
- melee_arena.set_odds(*wager);
+ melee_arena.set_payback(*wager);
melee_arena.set_wager(*wager);
player_ptr->au -= *wager;
reset_tim_flags(player_ptr);
this->wager = value;
}
-int MeleeArena::get_odds() const
+int MeleeArena::get_payback() const
{
- return this->odds;
+ return this->payback;
}
-void MeleeArena::set_odds(int input_wager)
+void MeleeArena::set_payback(int input_wager)
{
- this->odds = std::max(input_wager + 1, input_wager * this->get_odds() / 100);
+ this->payback = std::max(input_wager + 1, input_wager * this->odds / 100);
}
void MeleeArena::update_odds()
void set_bet_number(int value);
int get_wager() const;
void set_wager(int value);
- int get_odds() const;
- void set_odds(int input_wager);
+ int get_payback() const;
+ void set_payback(int input_wager);
void update_odds();
MeleeGladiator &get_gladiator(int n);
const MeleeGladiator &get_gladiator(int n) const;
int bet_number = 0;
int wager = 0; //!< @detail 引き分け時の払い戻しに必要.
int odds = 0;
+ int payback = 0;
std::array<MeleeGladiator, NUM_GLADIATORS> gladiators{};
int decide_max_level() const;
auto &melee_arena = MeleeArena::get_instance();
if (melee_arena.matches_bet_number(win_m_idx - 1)) {
msg_print(_("おめでとうございます。", "Congratulations."));
- const auto odds = melee_arena.get_odds();
+ const auto odds = melee_arena.get_payback();
msg_format(_("%d$を受け取った。", "You received %d gold."), odds);
this->player_ptr->au += odds;
} else {