Only add 'faction2_code' if the card has a second class
This commit is contained in:
parent
f2a9f81834
commit
1d21b1e10c
@ -54,7 +54,6 @@ var card_data = {
|
|||||||
// TODO: could be derived?
|
// TODO: could be derived?
|
||||||
deck_limit: 2,
|
deck_limit: 2,
|
||||||
faction_code: String(Component.settings.get('CardClass')).toLowerCase(),
|
faction_code: String(Component.settings.get('CardClass')).toLowerCase(),
|
||||||
faction2_code: String(Component.settings.get('CardClass2')).toLowerCase(),
|
|
||||||
flavor: String(Component.settings.get('Flavor')),
|
flavor: String(Component.settings.get('Flavor')),
|
||||||
health: parseInt(Component.settings.get('Stamina')) || null,
|
health: parseInt(Component.settings.get('Stamina')) || null,
|
||||||
illustrator: String(Component.settings.get('Artist')),
|
illustrator: String(Component.settings.get('Artist')),
|
||||||
@ -77,6 +76,10 @@ var card_data = {
|
|||||||
will: skills["Willpower"],
|
will: skills["Willpower"],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (Component.settings.get('CardClass2') != 'None') {
|
||||||
|
card_data.faction2_code = String(Component.settings.get('CardClass2')).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
if (card_types[Component.getFrontTemplateKey()] == 'enemy') {
|
if (card_types[Component.getFrontTemplateKey()] == 'enemy') {
|
||||||
// TODO: "weakness" or "basicweakness"
|
// TODO: "weakness" or "basicweakness"
|
||||||
card_data.subtype_code = "basicweakness";
|
card_data.subtype_code = "basicweakness";
|
||||||
|
Loading…
Reference in New Issue
Block a user