This commit is contained in:
+4
-7
@@ -34,12 +34,12 @@ const CardRole = {
|
||||
SMALLFOLK: "smallfolk",
|
||||
};
|
||||
|
||||
function createEffectCondition(json, cardUUID) {
|
||||
function createEffectCondition(json, card) {
|
||||
const createdCondition = {};
|
||||
if (typeof json === "string") {
|
||||
createdCondition.effectId = json;
|
||||
if (json == EffectType.FACTION_COMBO) {
|
||||
createdCondition.faction = cardUUID.faction;
|
||||
createdCondition.faction = card.faction;
|
||||
}
|
||||
createdCondition.amount = 1;
|
||||
} else {
|
||||
@@ -47,7 +47,7 @@ function createEffectCondition(json, cardUUID) {
|
||||
createdCondition.amount = json.amount ?? 1;
|
||||
createdCondition.cardId = json.card_id;
|
||||
if (json.id == EffectType.FACTION_COMBO) {
|
||||
createdCondition.faction = json.faction ?? cardUUID.faction;
|
||||
createdCondition.faction = json.faction ?? card.faction;
|
||||
}
|
||||
}
|
||||
return createdCondition;
|
||||
@@ -70,10 +70,7 @@ function createEffects(card, cardUUID) {
|
||||
}
|
||||
|
||||
if (e.effect_type) {
|
||||
createdEffect.condition = createEffectCondition(
|
||||
e.effect_type,
|
||||
cardUUID
|
||||
);
|
||||
createdEffect.condition = createEffectCondition(e.effect_type, card);
|
||||
}
|
||||
|
||||
if (e.mutex) {
|
||||
|
||||
Reference in New Issue
Block a user