name some unknown Ep3 enum values

This commit is contained in:
Martin Michelsen
2023-09-10 09:27:28 -07:00
parent 52ed062ed9
commit 7585eaeae5
4 changed files with 65 additions and 67 deletions
+8 -8
View File
@@ -405,7 +405,7 @@ bool CardSpecial::apply_stat_deltas_to_card_from_condition_and_clear_cond(
cond.clear(); cond.clear();
switch (cond_type) { switch (cond_type) {
case ConditionType::UNKNOWN_0C: case ConditionType::A_T_SWAP_0C:
if (cond_flags & 2) { if (cond_flags & 2) {
int16_t ap = clamp<int16_t>(card->ap, -99, 99); int16_t ap = clamp<int16_t>(card->ap, -99, 99);
int16_t tp = clamp<int16_t>(card->tp, -99, 99); int16_t tp = clamp<int16_t>(card->tp, -99, 99);
@@ -1653,15 +1653,15 @@ bool CardSpecial::execute_effect(
case ConditionType::RAMPAGE: case ConditionType::RAMPAGE:
case ConditionType::IMMOBILE: case ConditionType::IMMOBILE:
case ConditionType::HOLD: case ConditionType::HOLD:
case ConditionType::UNKNOWN_07: case ConditionType::CANNOT_DEFEND:
case ConditionType::GUOM: case ConditionType::GUOM:
case ConditionType::PARALYZE: case ConditionType::PARALYZE:
case ConditionType::PIERCE: case ConditionType::PIERCE:
case ConditionType::UNKNOWN_0F: case ConditionType::UNUSED_0F:
case ConditionType::UNKNOWN_12: case ConditionType::SET_MV_COST_TO_0:
case ConditionType::UNKNOWN_13: case ConditionType::UNKNOWN_13:
case ConditionType::ACID: case ConditionType::ACID:
case ConditionType::UNKNOWN_15: case ConditionType::ADD_1_TO_MV_COST:
case ConditionType::ABILITY_TRAP: case ConditionType::ABILITY_TRAP:
case ConditionType::FREEZE: case ConditionType::FREEZE:
case ConditionType::MAJOR_PIERCE: case ConditionType::MAJOR_PIERCE:
@@ -1719,7 +1719,7 @@ bool CardSpecial::execute_effect(
} }
return true; return true;
case ConditionType::UNKNOWN_0C: case ConditionType::A_T_SWAP_0C:
case ConditionType::A_T_SWAP_PERM: case ConditionType::A_T_SWAP_PERM:
if (unknown_p7 & 4) { if (unknown_p7 & 4) {
int16_t ap = clamp<int16_t>(card->ap, -99, 99); int16_t ap = clamp<int16_t>(card->ap, -99, 99);
@@ -1845,12 +1845,12 @@ bool CardSpecial::execute_effect(
auto& cond = card->action_chain.conditions[z]; auto& cond = card->action_chain.conditions[z];
if ((cond.type == ConditionType::IMMOBILE) || if ((cond.type == ConditionType::IMMOBILE) ||
(cond.type == ConditionType::HOLD) || (cond.type == ConditionType::HOLD) ||
(cond.type == ConditionType::UNKNOWN_07) || (cond.type == ConditionType::CANNOT_DEFEND) ||
(cond.type == ConditionType::GUOM) || (cond.type == ConditionType::GUOM) ||
(cond.type == ConditionType::PARALYZE) || (cond.type == ConditionType::PARALYZE) ||
(cond.type == ConditionType::UNKNOWN_13) || (cond.type == ConditionType::UNKNOWN_13) ||
(cond.type == ConditionType::ACID) || (cond.type == ConditionType::ACID) ||
(cond.type == ConditionType::UNKNOWN_15) || (cond.type == ConditionType::ADD_1_TO_MV_COST) ||
(cond.type == ConditionType::CURSE) || (cond.type == ConditionType::CURSE) ||
(cond.type == ConditionType::PIERCE_RAMPAGE_BLOCK) || (cond.type == ConditionType::PIERCE_RAMPAGE_BLOCK) ||
(cond.type == ConditionType::FREEZE) || (cond.type == ConditionType::FREEZE) ||
+24 -24
View File
@@ -144,28 +144,28 @@ const char* name_for_criterion_code(CriterionCode code) {
return "SAME_PLAYER"; return "SAME_PLAYER";
case CriterionCode::SAME_TEAM_NOT_SAME_PLAYER: case CriterionCode::SAME_TEAM_NOT_SAME_PLAYER:
return "SAME_TEAM_NOT_SAME_PLAYER"; return "SAME_TEAM_NOT_SAME_PLAYER";
case CriterionCode::UNKNOWN_07: case CriterionCode::FC:
return "UNKNOWN_07"; return "FC";
case CriterionCode::NOT_SC: case CriterionCode::NOT_SC:
return "NOT_SC"; return "NOT_SC";
case CriterionCode::SC: case CriterionCode::SC:
return "SC"; return "SC";
case CriterionCode::HU_OR_RA_CLASS_SC: case CriterionCode::HU_OR_RA_CLASS_SC:
return "HU_OR_RA_CLASS_SC"; return "HU_OR_RA_CLASS_SC";
case CriterionCode::HUNTER_HUMAN_SC: case CriterionCode::HUNTER_NON_ANDROID_SC:
return "HUNTER_HUMAN_SC"; return "HUNTER_NON_ANDROID_SC";
case CriterionCode::HUNTER_HU_CLASS_MALE_SC: case CriterionCode::HUNTER_HU_CLASS_MALE_SC:
return "HUNTER_HU_CLASS_MALE_SC"; return "HUNTER_HU_CLASS_MALE_SC";
case CriterionCode::HUNTER_FEMALE_SC: case CriterionCode::HUNTER_FEMALE_SC:
return "HUNTER_FEMALE_SC"; return "HUNTER_FEMALE_SC";
case CriterionCode::HUNTER_HU_OR_FO_CLASS_HUMAN_SC: case CriterionCode::HUNTER_NON_RA_CLASS_HUMAN_SC:
return "HUNTER_HU_OR_FO_CLASS_HUMAN_SC"; return "HUNTER_NON_RA_CLASS_HUMAN_SC";
case CriterionCode::HUNTER_HU_CLASS_ANDROID_SC: case CriterionCode::HUNTER_HU_CLASS_ANDROID_SC:
return "HUNTER_HU_CLASS_ANDROID_SC"; return "HUNTER_HU_CLASS_ANDROID_SC";
case CriterionCode::UNKNOWN_10: case CriterionCode::HUNTER_NON_RA_CLASS_NON_NEWMAN_SC:
return "UNKNOWN_10"; return "HUNTER_NON_RA_CLASS_NON_NEWMAN_SC";
case CriterionCode::UNKNOWN_11: case CriterionCode::HUNTER_NON_NEWMAN_NON_FORCE_MALE_SC:
return "UNKNOWN_11"; return "HUNTER_NON_NEWMAN_NON_FORCE_MALE_SC";
case CriterionCode::HUNTER_HUNEWEARL_CLASS_SC: case CriterionCode::HUNTER_HUNEWEARL_CLASS_SC:
return "HUNTER_HUNEWEARL_CLASS_SC"; return "HUNTER_HUNEWEARL_CLASS_SC";
case CriterionCode::HUNTER_RA_CLASS_MALE_SC: case CriterionCode::HUNTER_RA_CLASS_MALE_SC:
@@ -180,8 +180,8 @@ const char* name_for_criterion_code(CriterionCode code) {
return "HUNTER_RA_CLASS_ANDROID_SC"; return "HUNTER_RA_CLASS_ANDROID_SC";
case CriterionCode::HUNTER_FO_CLASS_FEMALE_SC: case CriterionCode::HUNTER_FO_CLASS_FEMALE_SC:
return "HUNTER_FO_CLASS_FEMALE_SC"; return "HUNTER_FO_CLASS_FEMALE_SC";
case CriterionCode::HUNTER_FEMALE_HUMAN_SC: case CriterionCode::HUNTER_HUMAN_FEMALE_SC:
return "HUNTER_FEMALE_HUMAN_SC"; return "HUNTER_HUMAN_FEMALE_SC";
case CriterionCode::HUNTER_ANDROID_SC: case CriterionCode::HUNTER_ANDROID_SC:
return "HUNTER_ANDROID_SC"; return "HUNTER_ANDROID_SC";
case CriterionCode::HU_OR_FO_CLASS_SC: case CriterionCode::HU_OR_FO_CLASS_SC:
@@ -194,12 +194,12 @@ const char* name_for_criterion_code(CriterionCode code) {
return "TECH_OR_UNKNOWN_ATTACK_MEDIUM"; return "TECH_OR_UNKNOWN_ATTACK_MEDIUM";
case CriterionCode::PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM: case CriterionCode::PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM:
return "PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM"; return "PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM";
case CriterionCode::UNKNOWN_20: case CriterionCode::NON_PHYSICAL_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC:
return "UNKNOWN_20"; return "NON_PHYSICAL_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC";
case CriterionCode::UNKNOWN_21: case CriterionCode::NON_PHYSICAL_NON_TECH_ATTACK_MEDIUM_NON_SC:
return "UNKNOWN_21"; return "NON_PHYSICAL_NON_TECH_ATTACK_MEDIUM_NON_SC";
case CriterionCode::UNKNOWN_22: case CriterionCode::NON_PHYSICAL_NON_TECH_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC:
return "UNKNOWN_22"; return "NON_PHYSICAL_NON_TECH_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC";
default: default:
throw invalid_argument("invalid criterion code"); throw invalid_argument("invalid criterion code");
} }
@@ -470,21 +470,21 @@ static const vector<ConditionDescription> description_for_condition_type({
/* 0x04 */ {true, "DAMAGE_MOD_1", "Set attack damage / AP to N after action cards applied (step 1)"}, /* 0x04 */ {true, "DAMAGE_MOD_1", "Set attack damage / AP to N after action cards applied (step 1)"},
/* 0x05 */ {false, "IMMOBILE", "Give Immobile condition"}, /* 0x05 */ {false, "IMMOBILE", "Give Immobile condition"},
/* 0x06 */ {false, "HOLD", "Give Hold condition"}, /* 0x06 */ {false, "HOLD", "Give Hold condition"},
/* 0x07 */ {false, "UNKNOWN_07", nullptr}, /* 0x07 */ {false, "CANNOT_DEFEND", "Cannot defend"},
/* 0x08 */ {true, "TP_BOOST", "Add N TP temporarily during attack"}, /* 0x08 */ {true, "TP_BOOST", "Add N TP temporarily during attack"},
/* 0x09 */ {true, "GIVE_DAMAGE", "Cause direct N HP loss"}, /* 0x09 */ {true, "GIVE_DAMAGE", "Cause direct N HP loss"},
/* 0x0A */ {false, "GUOM", "Give Guom condition"}, /* 0x0A */ {false, "GUOM", "Give Guom condition"},
/* 0x0B */ {false, "PARALYZE", "Give Paralysis condition"}, /* 0x0B */ {false, "PARALYZE", "Give Paralysis condition"},
/* 0x0C */ {false, "UNKNOWN_0C", nullptr}, /* 0x0C */ {false, "A_T_SWAP_0C", "Swap AP and TP temporarily"},
/* 0x0D */ {false, "A_H_SWAP", "Swap AP and HP temporarily"}, /* 0x0D */ {false, "A_H_SWAP", "Swap AP and HP temporarily"},
/* 0x0E */ {false, "PIERCE", "Attack SC directly even if they have items equipped"}, /* 0x0E */ {false, "PIERCE", "Attack SC directly even if they have items equipped"},
/* 0x0F */ {false, "UNKNOWN_0F", nullptr}, /* 0x0F */ {false, "UNUSED_0F", nullptr},
/* 0x10 */ {true, "HEAL", "Increase HP by N"}, /* 0x10 */ {true, "HEAL", "Increase HP by N"},
/* 0x11 */ {false, "RETURN_TO_HAND", "Return card to hand"}, /* 0x11 */ {false, "RETURN_TO_HAND", "Return card to hand"},
/* 0x12 */ {false, "UNKNOWN_12", nullptr}, /* 0x12 */ {false, "SET_MV_COST_TO_0", "Movement costs nothing"},
/* 0x13 */ {false, "UNKNOWN_13", nullptr}, /* 0x13 */ {false, "UNKNOWN_13", nullptr},
/* 0x14 */ {false, "ACID", "Give Acid condition"}, /* 0x14 */ {false, "ACID", "Give Acid condition"},
/* 0x15 */ {false, "UNKNOWN_15", nullptr}, /* 0x15 */ {false, "ADD_1_TO_MV_COST", "Add 1 to move costs"},
/* 0x16 */ {true, "MIGHTY_KNUCKLE", "Temporarily increase AP by N, and set ATK dice to zero"}, /* 0x16 */ {true, "MIGHTY_KNUCKLE", "Temporarily increase AP by N, and set ATK dice to zero"},
/* 0x17 */ {true, "UNIT_BLOW", "Temporarily increase AP by N * number of this card set within phase"}, /* 0x17 */ {true, "UNIT_BLOW", "Temporarily increase AP by N * number of this card set within phase"},
/* 0x18 */ {false, "CURSE", "Give Curse condition"}, /* 0x18 */ {false, "CURSE", "Give Curse condition"},
@@ -503,7 +503,7 @@ static const vector<ConditionDescription> description_for_condition_type({
/* 0x25 */ {true, "AP_LOSS", "Make attacker temporarily lose N AP during defense"}, /* 0x25 */ {true, "AP_LOSS", "Make attacker temporarily lose N AP during defense"},
/* 0x26 */ {true, "BONUS_FROM_LEADER", "Gain AP equal to the number of cards of type N on the field"}, /* 0x26 */ {true, "BONUS_FROM_LEADER", "Gain AP equal to the number of cards of type N on the field"},
/* 0x27 */ {false, "FREE_MANEUVER", "Enable movement over occupied tiles"}, /* 0x27 */ {false, "FREE_MANEUVER", "Enable movement over occupied tiles"},
/* 0x28 */ {false, "HASTE", "Make move actions free"}, /* 0x28 */ {false, "SCALE_MV_COST", "Multiply movement costs by a factor"},
/* 0x29 */ {true, "CLONE", "Make setting this card free if at least one card of type N is already on the field"}, /* 0x29 */ {true, "CLONE", "Make setting this card free if at least one card of type N is already on the field"},
/* 0x2A */ {true, "DEF_DISABLE_BY_COST", "Disable use of any defense cards costing between (N / 10) and (N % 10) points, inclusive"}, /* 0x2A */ {true, "DEF_DISABLE_BY_COST", "Disable use of any defense cards costing between (N / 10) and (N % 10) points, inclusive"},
/* 0x2B */ {true, "FILIAL", "Increase controlling SC\'s HP by N when this card is destroyed"}, /* 0x2B */ {true, "FILIAL", "Increase controlling SC\'s HP by N when this card is destroyed"},
+15 -15
View File
@@ -68,17 +68,17 @@ enum class CriterionCode : uint8_t {
SAME_TEAM = 0x04, SAME_TEAM = 0x04,
SAME_PLAYER = 0x05, SAME_PLAYER = 0x05,
SAME_TEAM_NOT_SAME_PLAYER = 0x06, // Allies only SAME_TEAM_NOT_SAME_PLAYER = 0x06, // Allies only
UNKNOWN_07 = 0x07, FC = 0x07,
NOT_SC = 0x08, NOT_SC = 0x08,
SC = 0x09, SC = 0x09,
HU_OR_RA_CLASS_SC = 0x0A, HU_OR_RA_CLASS_SC = 0x0A,
HUNTER_HUMAN_SC = 0x0B, HUNTER_NON_ANDROID_SC = 0x0B,
HUNTER_HU_CLASS_MALE_SC = 0x0C, HUNTER_HU_CLASS_MALE_SC = 0x0C,
HUNTER_FEMALE_SC = 0x0D, HUNTER_FEMALE_SC = 0x0D,
HUNTER_HU_OR_FO_CLASS_HUMAN_SC = 0x0E, HUNTER_NON_RA_CLASS_HUMAN_SC = 0x0E,
HUNTER_HU_CLASS_ANDROID_SC = 0x0F, HUNTER_HU_CLASS_ANDROID_SC = 0x0F,
UNKNOWN_10 = 0x10, HUNTER_NON_RA_CLASS_NON_NEWMAN_SC = 0x10,
UNKNOWN_11 = 0x11, HUNTER_NON_NEWMAN_NON_FORCE_MALE_SC = 0x11,
HUNTER_HUNEWEARL_CLASS_SC = 0x12, HUNTER_HUNEWEARL_CLASS_SC = 0x12,
HUNTER_RA_CLASS_MALE_SC = 0x13, HUNTER_RA_CLASS_MALE_SC = 0x13,
HUNTER_RA_CLASS_FEMALE_SC = 0x14, HUNTER_RA_CLASS_FEMALE_SC = 0x14,
@@ -86,16 +86,16 @@ enum class CriterionCode : uint8_t {
HUNTER_HU_OR_RA_CLASS_HUMAN_SC = 0x16, HUNTER_HU_OR_RA_CLASS_HUMAN_SC = 0x16,
HUNTER_RA_CLASS_ANDROID_SC = 0x17, HUNTER_RA_CLASS_ANDROID_SC = 0x17,
HUNTER_FO_CLASS_FEMALE_SC = 0x18, HUNTER_FO_CLASS_FEMALE_SC = 0x18,
HUNTER_FEMALE_HUMAN_SC = 0x19, HUNTER_HUMAN_FEMALE_SC = 0x19,
HUNTER_ANDROID_SC = 0x1A, HUNTER_ANDROID_SC = 0x1A,
HU_OR_FO_CLASS_SC = 0x1B, HU_OR_FO_CLASS_SC = 0x1B,
RA_OR_FO_CLASS_SC = 0x1C, RA_OR_FO_CLASS_SC = 0x1C,
PHYSICAL_OR_UNKNOWN_ATTACK_MEDIUM = 0x1D, PHYSICAL_OR_UNKNOWN_ATTACK_MEDIUM = 0x1D,
TECH_OR_UNKNOWN_ATTACK_MEDIUM = 0x1E, TECH_OR_UNKNOWN_ATTACK_MEDIUM = 0x1E,
PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM = 0x1F, PHYSICAL_OR_TECH_OR_UNKNOWN_ATTACK_MEDIUM = 0x1F,
UNKNOWN_20 = 0x20, NON_PHYSICAL_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC = 0x20,
UNKNOWN_21 = 0x21, NON_PHYSICAL_NON_TECH_ATTACK_MEDIUM_NON_SC = 0x21,
UNKNOWN_22 = 0x22, NON_PHYSICAL_NON_TECH_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC = 0x22,
}; };
const char* name_for_criterion_code(CriterionCode code); const char* name_for_criterion_code(CriterionCode code);
@@ -181,21 +181,21 @@ enum class ConditionType : uint8_t {
DAMAGE_MOD_1 = 0x04, // Set attack damage / AP to N after action cards applied (step 1) DAMAGE_MOD_1 = 0x04, // Set attack damage / AP to N after action cards applied (step 1)
IMMOBILE = 0x05, // Give Immobile condition IMMOBILE = 0x05, // Give Immobile condition
HOLD = 0x06, // Give Hold condition HOLD = 0x06, // Give Hold condition
UNKNOWN_07 = 0x07, CANNOT_DEFEND = 0x07,
TP_BOOST = 0x08, // Add N TP temporarily during attack TP_BOOST = 0x08, // Add N TP temporarily during attack
GIVE_DAMAGE = 0x09, // Cause direct N HP loss GIVE_DAMAGE = 0x09, // Cause direct N HP loss
GUOM = 0x0A, // Give Guom condition GUOM = 0x0A, // Give Guom condition
PARALYZE = 0x0B, // Give Paralysis condition PARALYZE = 0x0B, // Give Paralysis condition
UNKNOWN_0C = 0x0C, // Swap AP and TP temporarily (presumably) A_T_SWAP_0C = 0x0C, // Swap AP and TP temporarily (same as 71?)
A_H_SWAP = 0x0D, // Swap AP and HP temporarily A_H_SWAP = 0x0D, // Swap AP and HP temporarily
PIERCE = 0x0E, // Attack SC directly even if they have items equipped PIERCE = 0x0E, // Attack SC directly even if they have items equipped
UNKNOWN_0F = 0x0F, UNUSED_0F = 0x0F,
HEAL = 0x10, // Increase HP by N HEAL = 0x10, // Increase HP by N
RETURN_TO_HAND = 0x11, // Return card to hand RETURN_TO_HAND = 0x11, // Return card to hand
UNKNOWN_12 = 0x12, SET_MV_COST_TO_0 = 0x12,
UNKNOWN_13 = 0x13, UNKNOWN_13 = 0x13,
ACID = 0x14, // Give Acid condition ACID = 0x14, // Give Acid condition
UNKNOWN_15 = 0x15, ADD_1_TO_MV_COST = 0x15,
MIGHTY_KNUCKLE = 0x16, // Temporarily increase AP by N, and set ATK dice to zero MIGHTY_KNUCKLE = 0x16, // Temporarily increase AP by N, and set ATK dice to zero
UNIT_BLOW = 0x17, // Temporarily increase AP by N * number of this card set within phase UNIT_BLOW = 0x17, // Temporarily increase AP by N * number of this card set within phase
CURSE = 0x18, // Give Curse condition CURSE = 0x18, // Give Curse condition
@@ -214,7 +214,7 @@ enum class ConditionType : uint8_t {
AP_LOSS = 0x25, // Make attacker temporarily lose N AP during defense AP_LOSS = 0x25, // Make attacker temporarily lose N AP during defense
BONUS_FROM_LEADER = 0x26, // Gain AP equal to the number of cards of type N on the field BONUS_FROM_LEADER = 0x26, // Gain AP equal to the number of cards of type N on the field
FREE_MANEUVER = 0x27, // Enable movement over occupied tiles FREE_MANEUVER = 0x27, // Enable movement over occupied tiles
HASTE = 0x28, // Multiply all move action costs by expr (which may be zero) SCALE_MV_COST = 0x28, // Multiply all move action costs by expr (which may be zero)
CLONE = 0x29, // Make setting this card free if at least one card of type N is already on the field CLONE = 0x29, // Make setting this card free if at least one card of type N is already on the field
DEF_DISABLE_BY_COST = 0x2A, // Disable use of any defense cards costing between (N / 10) and (N % 10) points, inclusive DEF_DISABLE_BY_COST = 0x2A, // Disable use of any defense cards costing between (N / 10) and (N % 10) points, inclusive
FILIAL = 0x2B, // Increase controlling SC's HP by N when this card is destroyed FILIAL = 0x2B, // Increase controlling SC's HP by N when this card is destroyed
+18 -20
View File
@@ -941,7 +941,7 @@ bool RulerServer::check_usability_or_condition_apply(
((criterion_code == CriterionCode::SAME_TEAM) || ((criterion_code == CriterionCode::SAME_TEAM) ||
(criterion_code == CriterionCode::SAME_PLAYER) || (criterion_code == CriterionCode::SAME_PLAYER) ||
(criterion_code == CriterionCode::SAME_TEAM_NOT_SAME_PLAYER) || (criterion_code == CriterionCode::SAME_TEAM_NOT_SAME_PLAYER) ||
(criterion_code == CriterionCode::UNKNOWN_07) || (criterion_code == CriterionCode::FC) ||
(criterion_code == CriterionCode::NOT_SC) || (criterion_code == CriterionCode::NOT_SC) ||
(criterion_code == CriterionCode::SC))) { (criterion_code == CriterionCode::SC))) {
log.debug("check_usability_or_condition_apply: criterion is forbidden"); log.debug("check_usability_or_condition_apply: criterion is forbidden");
@@ -992,14 +992,10 @@ bool RulerServer::check_usability_or_condition_apply(
return true; return true;
} }
break; break;
case CriterionCode::UNKNOWN_07: case CriterionCode::FC:
// Like NOT_SC, but for ce3 instead of ce2
log.debug("check_usability_or_condition_apply: UNKNOWN_07: ce3 type is %s", ce3 ? name_for_card_type(ce3->def.type) : "missing");
if (!ce3 || ((ce3->def.type != CardType::HUNTERS_SC) && (ce3->def.type != CardType::ARKZ_SC))) { if (!ce3 || ((ce3->def.type != CardType::HUNTERS_SC) && (ce3->def.type != CardType::ARKZ_SC))) {
log.debug("check_usability_or_condition_apply: UNKNOWN_07: returned %s", ret ? "true" : "false");
return ret; return ret;
} }
log.debug("check_usability_or_condition_apply: UNKNOWN_07: did not pass");
break; break;
case CriterionCode::NOT_SC: case CriterionCode::NOT_SC:
if (!ce2 || ((ce2->def.type != CardType::HUNTERS_SC) && (ce2->def.type != CardType::ARKZ_SC))) { if (!ce2 || ((ce2->def.type != CardType::HUNTERS_SC) && (ce2->def.type != CardType::ARKZ_SC))) {
@@ -1016,7 +1012,7 @@ bool RulerServer::check_usability_or_condition_apply(
return ret; return ret;
} }
break; break;
case CriterionCode::HUNTER_HUMAN_SC: { case CriterionCode::HUNTER_NON_ANDROID_SC: {
static const unordered_set<uint16_t> card_ids = { static const unordered_set<uint16_t> card_ids = {
0x0001, // Orland 0x0001, // Orland
0x0002, // Kranz 0x0002, // Kranz
@@ -1070,6 +1066,7 @@ bool RulerServer::check_usability_or_condition_apply(
0x02B1, // H-RAcaseal 0x02B1, // H-RAcaseal
0x02B3, // H-FOmarl 0x02B3, // H-FOmarl
0x02B5, // H-FOnewearl 0x02B5, // H-FOnewearl
// Note: Seems like 0x02CD (H-RAmarl) should be here, but she isn't.
0x02CE, // H-FOmarl 0x02CE, // H-FOmarl
0x02CF, // H-HUnewearl 0x02CF, // H-HUnewearl
0x02D1, // H-RAmarl 0x02D1, // H-RAmarl
@@ -1079,7 +1076,7 @@ bool RulerServer::check_usability_or_condition_apply(
}; };
return ret && card_ids.count(card_id2); return ret && card_ids.count(card_id2);
} }
case CriterionCode::HUNTER_HU_OR_FO_CLASS_HUMAN_SC: { case CriterionCode::HUNTER_NON_RA_CLASS_HUMAN_SC: {
static const unordered_set<uint16_t> card_ids = { static const unordered_set<uint16_t> card_ids = {
0x0001, // Orland 0x0001, // Orland
0x0003, // Ino'lis 0x0003, // Ino'lis
@@ -1113,7 +1110,7 @@ bool RulerServer::check_usability_or_condition_apply(
}; };
return ret && card_ids.count(card_id2); return ret && card_ids.count(card_id2);
} }
case CriterionCode::UNKNOWN_10: { case CriterionCode::HUNTER_NON_RA_CLASS_NON_NEWMAN_SC: {
static const unordered_set<uint16_t> card_ids = { static const unordered_set<uint16_t> card_ids = {
0x0001, // Orland 0x0001, // Orland
0x0003, // Ino'lis 0x0003, // Ino'lis
@@ -1133,7 +1130,7 @@ bool RulerServer::check_usability_or_condition_apply(
}; };
return ret && card_ids.count(card_id2); return ret && card_ids.count(card_id2);
} }
case CriterionCode::UNKNOWN_11: { case CriterionCode::HUNTER_NON_NEWMAN_NON_FORCE_MALE_SC: {
static const unordered_set<uint16_t> card_ids = { static const unordered_set<uint16_t> card_ids = {
0x0001, // Orland 0x0001, // Orland
0x0002, // Kranz 0x0002, // Kranz
@@ -1144,6 +1141,7 @@ bool RulerServer::check_usability_or_condition_apply(
0x02AE, // H-RAmar 0x02AE, // H-RAmar
0x02B0, // H-RAcast 0x02B0, // H-RAcast
0x02CC, // H-HUmar 0x02CC, // H-HUmar
// Seems like H-RAmarl shouldn't be here, but she is.
0x02CD, // H-RAmarl 0x02CD, // H-RAmarl
0x02D0, // H-RAcast 0x02D0, // H-RAcast
0x02D7, // H-HUcast 0x02D7, // H-HUcast
@@ -1236,7 +1234,7 @@ bool RulerServer::check_usability_or_condition_apply(
}; };
return ret && card_ids.count(card_id2); return ret && card_ids.count(card_id2);
} }
case CriterionCode::HUNTER_FEMALE_HUMAN_SC: { case CriterionCode::HUNTER_HUMAN_FEMALE_SC: {
static const unordered_set<uint16_t> card_ids = { static const unordered_set<uint16_t> card_ids = {
0x0003, // Ino'lis 0x0003, // Ino'lis
0x0004, // Sil'fer 0x0004, // Sil'fer
@@ -1295,7 +1293,7 @@ bool RulerServer::check_usability_or_condition_apply(
return ret; return ret;
} }
break; break;
case CriterionCode::UNKNOWN_20: case CriterionCode::NON_PHYSICAL_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC:
if ((attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::UNKNOWN)) { if ((attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::UNKNOWN)) {
return false; return false;
} }
@@ -1303,7 +1301,7 @@ bool RulerServer::check_usability_or_condition_apply(
return ret; return ret;
} }
break; break;
case CriterionCode::UNKNOWN_21: case CriterionCode::NON_PHYSICAL_NON_TECH_ATTACK_MEDIUM_NON_SC:
if ((attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::TECH)) { if ((attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::TECH)) {
return false; return false;
} }
@@ -1311,7 +1309,7 @@ bool RulerServer::check_usability_or_condition_apply(
return ret; return ret;
} }
break; break;
case CriterionCode::UNKNOWN_22: case CriterionCode::NON_PHYSICAL_NON_TECH_NON_UNKNOWN_ATTACK_MEDIUM_NON_SC:
if ((attack_medium != AttackMedium::UNKNOWN) && (attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::TECH)) { if ((attack_medium != AttackMedium::UNKNOWN) && (attack_medium != AttackMedium::PHYSICAL) && (attack_medium != AttackMedium::TECH)) {
return false; return false;
} }
@@ -1354,8 +1352,8 @@ uint16_t RulerServer::compute_attack_or_defense_costs(
sc_card_ref_if_item = this->short_statuses[client_id]->at(0).card_ref; sc_card_ref_if_item = this->short_statuses[client_id]->at(0).card_ref;
} }
if (this->find_condition_on_card_ref(pa.attacker_card_ref, ConditionType::UNKNOWN_15) || if (this->find_condition_on_card_ref(pa.attacker_card_ref, ConditionType::ADD_1_TO_MV_COST) ||
this->find_condition_on_card_ref(sc_card_ref_if_item, ConditionType::UNKNOWN_15)) { this->find_condition_on_card_ref(sc_card_ref_if_item, ConditionType::ADD_1_TO_MV_COST)) {
cost_bias = 1; cost_bias = 1;
} }
@@ -2119,11 +2117,11 @@ ssize_t RulerServer::get_path_cost(
ssize_t cost_penalty) const { ssize_t cost_penalty) const {
for (size_t x = 0; x < 9; x++) { for (size_t x = 0; x < 9; x++) {
const auto& cond = chain.conditions[x]; const auto& cond = chain.conditions[x];
if (cond.type == ConditionType::UNKNOWN_12) { if (cond.type == ConditionType::SET_MV_COST_TO_0) {
path_length = 0; path_length = 0;
} else if (cond.type == ConditionType::UNKNOWN_15) { } else if (cond.type == ConditionType::ADD_1_TO_MV_COST) {
path_length++; path_length++;
} else if (cond.type == ConditionType::HASTE) { } else if (cond.type == ConditionType::SCALE_MV_COST) {
path_length *= cond.value; path_length *= cond.value;
} }
} }
@@ -2386,7 +2384,7 @@ bool RulerServer::is_defense_valid(const ActionState& pa) {
} }
if (this->find_condition_on_card_ref(pa.target_card_refs[0], ConditionType::HOLD) || if (this->find_condition_on_card_ref(pa.target_card_refs[0], ConditionType::HOLD) ||
this->find_condition_on_card_ref(pa.target_card_refs[0], ConditionType::UNKNOWN_07)) { this->find_condition_on_card_ref(pa.target_card_refs[0], ConditionType::CANNOT_DEFEND)) {
this->error_code3 = -0x63; this->error_code3 = -0x63;
return false; return false;
} }