don't allow dead players to surrender in ep3

This commit is contained in:
Martin Michelsen
2024-09-17 21:55:29 -07:00
parent e6e11794b8
commit 1ee3caf640
3 changed files with 12 additions and 0 deletions
+5
View File
@@ -132,6 +132,11 @@ shared_ptr<const Server> PlayerState::server() const {
return s;
}
bool PlayerState::is_alive() const {
auto sc_card = this->get_sc_card();
return (sc_card && !(sc_card->card_flags & 2));
}
bool PlayerState::draw_cards_allowed() const {
if (this->assist_flags & AssistFlag::IS_SKIPPING_TURN) {
return false;
+2
View File
@@ -47,6 +47,8 @@ public:
std::shared_ptr<Server> server();
std::shared_ptr<const Server> server() const;
bool is_alive() const;
bool draw_cards_allowed() const;
void apply_assist_card_effect_on_set(std::shared_ptr<PlayerState> setter_ps);
void apply_dice_effects();