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,10 +166,18 @@ function build_card(component) {
var faction = component.settings.get('CardClass');
if (faction) {
card_data.faction_code = String(faction).toLowerCase();
var faction2 = component.settings.get('CardClass2');
if (faction2 && faction2 != 'None') {
card_data.faction2_code = String(faction2).toLowerCase();
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();
var faction2 = component.settings.get('CardClass2');
if (faction2 && faction2 != 'None') {
card_data.faction2_code = String(faction2).toLowerCase();
}
}
}