introduce formula field + override for monster stat seed
authorxangelo <git@xangelo.ca>
Fri, 30 Jun 2023 10:16:17 +0000 (06:16 -0400)
committerxangelo <git@xangelo.ca>
Fri, 30 Jun 2023 10:16:17 +0000 (06:16 -0400)
seeds/monsters.ts

index ab920fd1876eec44c9cce8df0b93144f49f4b60a..c9ca8b536fd91a0218abfe9b8ad432f7888e9a24 100644 (file)
@@ -50,10 +50,10 @@ export async function createMonsters(): Promise<void> {
         return {
           id: r.fields.id,
           name: r.fields.Name,
-          strength: r.fields.STR,
-          constitution: r.fields.CON,
-          dexterity: r.fields.DEX,
-          intelligence: r.fields.INT,
+          strength: r.fields['STR_override'] || r.fields.STR,
+          constitution: r.fields['CON_override'] || r.fields.CON,
+          dexterity: r.fields['DEX_override'] || r.fields.DEX,
+          intelligence: r.fields['INT_override'] || r.fields.INT,
           exp: r.fields.EXP,
           level: r.fields.Level,
           gold: r.fields.GOLD,