From 4e29f22655a0fda170b3fbc0a34fe75e1003417d Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 12 Oct 2023 11:46:33 -0700 Subject: [PATCH] rename Leader/Group function in Ep3 server --- src/Episode3/CardSpecial.cc | 8 ++++---- src/Episode3/CardSpecial.hh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Episode3/CardSpecial.cc b/src/Episode3/CardSpecial.cc index b78e425f..d2b28ab4 100644 --- a/src/Episode3/CardSpecial.cc +++ b/src/Episode3/CardSpecial.cc @@ -1246,7 +1246,7 @@ size_t CardSpecial::count_action_cards_with_condition_for_current_attack( return ret; } -size_t CardSpecial::count_cards_with_card_id_set_by_player_except_card_ref( +size_t CardSpecial::count_cards_with_card_id_except_card_ref( uint16_t card_id, uint16_t card_ref) const { size_t ret = 0; for (size_t client_id = 0; client_id < 4; client_id++) { @@ -2007,7 +2007,7 @@ bool CardSpecial::execute_effect( case ConditionType::BONUS_FROM_LEADER: if (unknown_p7 & 1) { - clamped_unknown_p5 = this->count_cards_with_card_id_set_by_player_except_card_ref(expr_value, 0xFFFF) + (card->action_chain).chain.ap_effect_bonus; + clamped_unknown_p5 = this->count_cards_with_card_id_except_card_ref(expr_value, 0xFFFF) + (card->action_chain).chain.ap_effect_bonus; (card->action_chain).chain.ap_effect_bonus = clamp(clamped_unknown_p5, -99, 99); } return true; @@ -2205,7 +2205,7 @@ bool CardSpecial::execute_effect( auto ce = card->get_definition(); if (ce) { int16_t count = clamp( - this->count_cards_with_card_id_set_by_player_except_card_ref(ce->def.card_id, card->get_card_ref()), -99, 99); + this->count_cards_with_card_id_except_card_ref(ce->def.card_id, card->get_card_ref()), -99, 99); card->action_chain.chain.ap_effect_bonus = clamp( card->action_chain.chain.ap_effect_bonus + count * positive_expr_value, -99, 99); } @@ -2319,7 +2319,7 @@ bool CardSpecial::execute_effect( case ConditionType::COMBO_TP: if (unknown_p7 & 1) { - ssize_t count = this->count_cards_with_card_id_set_by_player_except_card_ref( + ssize_t count = this->count_cards_with_card_id_except_card_ref( expr_value, 0xFFFF); card->action_chain.chain.tp_effect_bonus = clamp( count + card->action_chain.chain.tp_effect_bonus, -99, 99); diff --git a/src/Episode3/CardSpecial.hh b/src/Episode3/CardSpecial.hh index 8d4a6e40..c6668a2e 100644 --- a/src/Episode3/CardSpecial.hh +++ b/src/Episode3/CardSpecial.hh @@ -165,7 +165,7 @@ public: ConditionType cond_type, uint16_t card_ref) const; size_t count_action_cards_with_condition_for_current_attack( std::shared_ptr card, ConditionType cond_type, uint16_t card_ref) const; - size_t count_cards_with_card_id_set_by_player_except_card_ref( + size_t count_cards_with_card_id_except_card_ref( uint16_t card_id, uint16_t card_ref) const; std::vector> get_all_set_cards_by_team_and_class( CardClass card_class, uint8_t team_id, bool exclude_destroyed_cards) const;