rename Leader/Group function in Ep3 server

This commit is contained in:
Martin Michelsen
2023-10-12 11:46:33 -07:00
parent 31c0a35bb6
commit 4e29f22655
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -1246,7 +1246,7 @@ size_t CardSpecial::count_action_cards_with_condition_for_current_attack(
return ret; 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 { uint16_t card_id, uint16_t card_ref) const {
size_t ret = 0; size_t ret = 0;
for (size_t client_id = 0; client_id < 4; client_id++) { for (size_t client_id = 0; client_id < 4; client_id++) {
@@ -2007,7 +2007,7 @@ bool CardSpecial::execute_effect(
case ConditionType::BONUS_FROM_LEADER: case ConditionType::BONUS_FROM_LEADER:
if (unknown_p7 & 1) { 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<int16_t>(clamped_unknown_p5, -99, 99); (card->action_chain).chain.ap_effect_bonus = clamp<int16_t>(clamped_unknown_p5, -99, 99);
} }
return true; return true;
@@ -2205,7 +2205,7 @@ bool CardSpecial::execute_effect(
auto ce = card->get_definition(); auto ce = card->get_definition();
if (ce) { if (ce) {
int16_t count = clamp<int16_t>( int16_t count = clamp<int16_t>(
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<int16_t>( card->action_chain.chain.ap_effect_bonus = clamp<int16_t>(
card->action_chain.chain.ap_effect_bonus + count * positive_expr_value, -99, 99); 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: case ConditionType::COMBO_TP:
if (unknown_p7 & 1) { 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); expr_value, 0xFFFF);
card->action_chain.chain.tp_effect_bonus = clamp<int16_t>( card->action_chain.chain.tp_effect_bonus = clamp<int16_t>(
count + card->action_chain.chain.tp_effect_bonus, -99, 99); count + card->action_chain.chain.tp_effect_bonus, -99, 99);
+1 -1
View File
@@ -165,7 +165,7 @@ public:
ConditionType cond_type, uint16_t card_ref) const; ConditionType cond_type, uint16_t card_ref) const;
size_t count_action_cards_with_condition_for_current_attack( size_t count_action_cards_with_condition_for_current_attack(
std::shared_ptr<const Card> card, ConditionType cond_type, uint16_t card_ref) const; std::shared_ptr<const Card> 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; uint16_t card_id, uint16_t card_ref) const;
std::vector<std::shared_ptr<const Card>> get_all_set_cards_by_team_and_class( std::vector<std::shared_ptr<const Card>> get_all_set_cards_by_team_and_class(
CardClass card_class, uint8_t team_id, bool exclude_destroyed_cards) const; CardClass card_class, uint8_t team_id, bool exclude_destroyed_cards) const;