From c024c8b8a878033dc0f29c0f48c6f33364aae814 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 8 Sep 2021 22:38:27 -0400 Subject: [PATCH] Convert Weakness/Basic Weakness pseudo-classes into `subtype_code` --- strange_eons_to_arkhamdb.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/strange_eons_to_arkhamdb.js b/strange_eons_to_arkhamdb.js index b6abb89..3a011f4 100644 --- a/strange_eons_to_arkhamdb.js +++ b/strange_eons_to_arkhamdb.js @@ -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(); + } } }