Convert Weakness/Basic Weakness pseudo-classes into subtype_code

This commit is contained in:
Adam Goldsmith 2021-09-08 22:38:27 -04:00
parent d67d1192cf
commit c024c8b8a8

View File

@ -166,12 +166,20 @@ function build_card(component) {
var faction = component.settings.get('CardClass'); var faction = component.settings.get('CardClass');
if (faction) { if (faction) {
if (faction == 'Weakness') {
card_data.subtype_code = "weakness";
}
else if (faction == 'Basic Weakness') {
card_data.subtype_code = "basicweakness";
}
else {
card_data.faction_code = String(faction).toLowerCase(); card_data.faction_code = String(faction).toLowerCase();
var faction2 = component.settings.get('CardClass2'); var faction2 = component.settings.get('CardClass2');
if (faction2 && faction2 != 'None') { if (faction2 && faction2 != 'None') {
card_data.faction2_code = String(faction2).toLowerCase(); card_data.faction2_code = String(faction2).toLowerCase();
} }
} }
}
if (card_types[component.getFrontTemplateKey()] == 'enemy') { if (card_types[component.getFrontTemplateKey()] == 'enemy') {
// TODO: "weakness" or "basicweakness" // TODO: "weakness" or "basicweakness"