diff --git a/public/index.html b/public/index.html
index 09032ae..7405f00 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,13 +7,13 @@
TPW Roller App
-
+
-
-
+
+
-
+
diff --git a/src/App.svelte b/src/App.svelte
index 61f22ed..ab04f44 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,16 +1,17 @@
diff --git a/src/components/CreatureCard.svelte b/src/components/CreatureCard.svelte
new file mode 100644
index 0000000..9e83414
--- /dev/null
+++ b/src/components/CreatureCard.svelte
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+ {capitalize(creature.type)}
+ {#if creature.subtype !== ""}({creature.subtype}) {/if}: {capitalize(
+ creature.description
+ )}
+
+
+
+
+
+
+ Details:
+
+ {#if creature.ability}Ability: {creature.ability.description} {/if}
+ {#if creature.activity}Activity: {creature.activity.description} {/if}
+ {#if creature.adjective}
+ Adjective: {creature.adjective.description}
+
+ {/if}
+ {#if creature.age}Age: {creature.age.description} {/if}
+ {#if creature.alignment}
+ Alignment: {creature.alignment.description}
+
+ {/if}
+ {#if creature.aspect}Aspect: {creature.aspect.description} {/if}
+ {#if creature.condition}
+ Condition: {creature.condition.description}
+
+ {/if}
+ {#if creature.disposition}
+ Disposition: {creature.disposition.description}
+
+ {/if}
+ {#if creature.feature}Feature: {creature.feature.description} {/if}
+ {#if creature.npc}
+ NPC Stats:
+
+ {/if}
+ {#if creature.numAppearing}
+ Number Appearing: {creature.numAppearing.description}
+
+ {/if}
+ {#if creature.size}Size: {creature.size.description} {/if}
+ {#if creature.tags.length > 0}
+ Tags: {#each creature.tags as tag} {tag.description}, {/each}
+ {/if}
+
+
+
+
+
+ {timestamp}
+
+
+
+
diff --git a/src/components/CreatureRoller.svelte b/src/components/CreatureRoller.svelte
new file mode 100644
index 0000000..cc341c2
--- /dev/null
+++ b/src/components/CreatureRoller.svelte
@@ -0,0 +1,27 @@
+
+
+
+ Roll Creature
+
+ {#each rollResults as { creature, timestamp }}
+
+ {/each}
+
+
+
diff --git a/src/rollers/DangerRoller.svelte b/src/components/DangerRoller.svelte
similarity index 94%
rename from src/rollers/DangerRoller.svelte
rename to src/components/DangerRoller.svelte
index 71a1014..f4dba61 100644
--- a/src/rollers/DangerRoller.svelte
+++ b/src/components/DangerRoller.svelte
@@ -1,7 +1,7 @@
@@ -89,8 +94,8 @@
roll(rollVisibility())}>Roll Visibility
- {#each rollResults as { type, value, timestamp }}
- {timestamp}: ({type}): {value}
+ {#each rollResults as { type, roll, value, timestamp }}
+ {timestamp}: ({type}): {value}
{/each}
diff --git a/src/components/DieIcon.svelte b/src/components/DieIcon.svelte
new file mode 100644
index 0000000..dc2c4aa
--- /dev/null
+++ b/src/components/DieIcon.svelte
@@ -0,0 +1,45 @@
+
+
+
+
+
+ [d{faces}: {value}]
+
+
+
+
+
diff --git a/src/components/DiscoveryCard.svelte b/src/components/DiscoveryCard.svelte
new file mode 100644
index 0000000..0bf0027
--- /dev/null
+++ b/src/components/DiscoveryCard.svelte
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+ {capitalize(discovery.category)}
+
+ {#if discovery.subcategory !== ""}
+ ({discovery.subcategory} ){/if}: {capitalize(discovery.description)}
+
+
+
+
+
+
+ {#if discovery.category == "creature"}
+
+
+
+ {:else if discovery.category == "steading"}
+
+ TODO: format steadings
+
+ {:else}
+
+ Details:
+
+ {#if discovery.age}Age: {discovery.age.description} {/if}
+ {#if discovery.alignment}
+ Alignment: {discovery.alignment.description}
+ {/if}
+ {#if discovery.aspect}Aspect: {discovery.aspect.description} {/if}
+ {#if discovery.creature}
+ Produced/Inhabited By: {discovery.creature.description}
+
+ {/if}
+ {#if discovery.element}Element: {discovery.element.description} {/if}
+ {#if discovery.magicType}
+ MagicType: {discovery.magicType.description}
+ {/if}
+ {#if discovery.ruination}
+ Ruination: {discovery.ruination.description}
+ {/if}
+ {#if discovery.size}Size: {discovery.size.description} {/if}
+ {#if discovery.steading}Steading: {discovery.steading.description} {/if}
+ {#if discovery.visibility}
+ Visibility: {discovery.visibility.description}
+ {/if}
+
+
+ {/if}
+
+
+
+ {timestamp}
+
+
+
+
diff --git a/src/components/DiscoveryRoller.svelte b/src/components/DiscoveryRoller.svelte
new file mode 100644
index 0000000..dcc105d
--- /dev/null
+++ b/src/components/DiscoveryRoller.svelte
@@ -0,0 +1,37 @@
+
+
+
+
+ Roll Discovery
+
+
+ {#each rollResults as { discovery, timestamp }}
+
+ {/each}
+
+
+
diff --git a/src/components/DungeonCard.svelte b/src/components/DungeonCard.svelte
new file mode 100644
index 0000000..19e76e6
--- /dev/null
+++ b/src/components/DungeonCard.svelte
@@ -0,0 +1,84 @@
+
+
+
+
+
+ {capitalize(dungeon.size.description)} {dungeon.function.description} built by (a/an) {dungeon.builder.description}
+
+
+
+ Fell to ruination from {dungeon.ruination.description} .
+
+
+
+
+ Common Themes ({dungeon.size.commonThemes}):
+
+ {#each dungeon.commonThemes as theme}
+ {theme.category}: {theme.description}
+ {/each}
+
+
+
+ Unique Themes ({dungeon.size.uniqueThemes}):
+
+ {#each dungeon.uniqueThemes as theme}
+ {theme.category}: {theme.description}
+ {/each}
+
+
+
+ Common Areas ({dungeon.size.commonAreas}):
+
+ {#each dungeon.commonAreas as area}
+ {area.type}/{area.category}: {area.description}
+ {/each}
+
+
+
+ Unique Areas ({dungeon.size.uniqueAreas}):
+
+ {#each dungeon.uniqueAreas as area}
+ {area.type}/{area.category}: {area.description}
+ {/each}
+
+
+
+
+
+ {timestamp}
+
+
+
+
diff --git a/src/components/DungeonRoller.svelte b/src/components/DungeonRoller.svelte
new file mode 100644
index 0000000..66c5333
--- /dev/null
+++ b/src/components/DungeonRoller.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+ Roll Dungeon
+
+
+ {#each rollResults as { dungeon, timestamp }}
+
+ {/each}
+
+
+
diff --git a/src/components/FollowerCard.svelte b/src/components/FollowerCard.svelte
new file mode 100644
index 0000000..dd64ec7
--- /dev/null
+++ b/src/components/FollowerCard.svelte
@@ -0,0 +1,105 @@
+
+
+
+
+
+ {follower.name} ({follower.gender})
+
+
+
+ From {follower.homeSteading.homesteadName} in {follower.homeSteading.kingdomName}
+
+
+
+
+ Quality:
+
+ They are {follower.quality.description} (Quality: {follower.quality.value}). They
+ {follower.background.description} .
+
+
+
+ Tags:
+
+ {#each follower.tags as tag}
+ {tag.name}: {tag.description}
+ {/each}
+
+
+
+ Moves:
+
+ {#each follower.moves as move}
+ {move.description}
+ {/each}
+
+
+
+ Loyalty:
+
+ They have a loyalty score of {follower.loyalty.value}{#if !!follower.loyalty.description}
+ and {follower.loyalty.description} {/if}.
+
+
+
+ Instinct:
+
+ When left to their own devices, they will {follower.instinct.description} .
+
+
+
+ Cost:
+
+ They are motivated by {follower.cost.name} . They will want {follower.cost.description}
+
+
+
+ Hit Points:
+
+ They are {follower.hitPoints.description} and have {follower.hitPoints.value} HP.
+
+
+
+ Armor & Shield:
+
+ They are equipped with {follower.armor.description} ({follower.armor.value} armor).
+
+
+
+ Damage:
+
+ In a fight, they {follower.damage.description} dealing d{follower.damage.value} damage.
+
+
+
+ Load & Gear:
+
+ {#each follower.loadAndGear.gear as gear}
+ {gear}
+ {/each}
+
+
+
+
+
+ {timestamp}
+
+
+
+
diff --git a/src/components/FollowerRoller.svelte b/src/components/FollowerRoller.svelte
new file mode 100644
index 0000000..e4aa182
--- /dev/null
+++ b/src/components/FollowerRoller.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+ Roll Followers
+
+
+ {#each rollResults as { follower, timestamp }}
+
+ {/each}
+
+
+
diff --git a/src/componenets/Footer.svelte b/src/components/Footer.svelte
similarity index 100%
rename from src/componenets/Footer.svelte
rename to src/components/Footer.svelte
diff --git a/src/rollers/KingdomRoller.svelte b/src/components/KingdomRoller.svelte
similarity index 94%
rename from src/rollers/KingdomRoller.svelte
rename to src/components/KingdomRoller.svelte
index 116f7dc..f786daa 100644
--- a/src/rollers/KingdomRoller.svelte
+++ b/src/components/KingdomRoller.svelte
@@ -3,7 +3,7 @@
import { format as formatDate } from "date-fns";
import { Button, Icon } from "sveltestrap";
- import { kingdoms, rollCategory } from "./kingdoms";
+ import { kingdoms, rollCategory } from "../rollers/kingdoms";
let rollResults: { value: string; icon: string; timestamp: string }[] = [];
let kingdom = "arpad";
diff --git a/src/components/NpcCard.svelte b/src/components/NpcCard.svelte
new file mode 100644
index 0000000..609a667
--- /dev/null
+++ b/src/components/NpcCard.svelte
@@ -0,0 +1,50 @@
+
+
+
+
+
+ {npc.getDescription()}
+
+
+
+ From {npc.hometown} .
+
+
+
+
+ Background Context:
+
+
+ They are a(n) {npc.context.alignment.description} {npc.context.description} with
+ {npc.trait.category} ({npc.context.trait.description})
+ encountered in a(n) {npc.context.category} setting while they are {npc.context.activity.description}
+
+
+
+
+ Follower Stats:
+
+
+
+
+
+ {timestamp}
+
+
+
+
diff --git a/src/components/NpcRoller.svelte b/src/components/NpcRoller.svelte
new file mode 100644
index 0000000..1ea864e
--- /dev/null
+++ b/src/components/NpcRoller.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+ Roll Npc
+
+
+ {#each rollResults as { npc, timestamp }}
+
+ {/each}
+
+
+
diff --git a/src/rollers/PlaceRoller.svelte b/src/components/PlaceRoller.svelte
similarity index 92%
rename from src/rollers/PlaceRoller.svelte
rename to src/components/PlaceRoller.svelte
index acdd657..53988fc 100644
--- a/src/rollers/PlaceRoller.svelte
+++ b/src/components/PlaceRoller.svelte
@@ -1,7 +1,7 @@
+
+
+
+ {item.description}
+
+
+
diff --git a/src/rollers/CreatureRoller.svelte b/src/rollers/CreatureRoller.svelte
deleted file mode 100644
index 0ec79cb..0000000
--- a/src/rollers/CreatureRoller.svelte
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
- Roll Creature
-
- {#each rollResults as { creature, timestamp }}
-
-
-
- {capitalize(creature.type)}
- {#if creature.subtype !== ""}({creature.subtype}) {/if}: {capitalize(creature.description)}
-
-
-
-
-
-
- Details:
-
- {#if creature.ability}Ability: {creature.ability.description} {/if}
- {#if creature.activity}Activity: {creature.activity.description} {/if}
- {#if creature.adjective}Adjective: {creature.adjective.description} {/if}
- {#if creature.age}Age: {creature.age.description} {/if}
- {#if creature.alignment}Alignment: {creature.alignment.description} {/if}
- {#if creature.aspect}Aspect: {creature.aspect.description} {/if}
- {#if creature.condition}Condition: {creature.condition.description} {/if}
- {#if creature.disposition}Disposition: {creature.disposition.description} {/if}
- {#if creature.feature}Feature: {creature.feature.description} {/if}
- {#if creature.npc}NPC Name: {creature.npc.name} {/if}
- {#if creature.numAppearing}Number Appearing: {creature.numAppearing.description} {/if}
- {#if creature.size}Size: {creature.size.description} {/if}
- {#if creature.tags.length > 0}
- Tags: {#each creature.tags as tag} {tag.description}, {/each}
- {/if}
-
-
-
-
-
- {timestamp}
-
- {/each}
-
-
-
diff --git a/src/rollers/DiscoveryRoller.svelte b/src/rollers/DiscoveryRoller.svelte
deleted file mode 100644
index 25d7635..0000000
--- a/src/rollers/DiscoveryRoller.svelte
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
- Roll Discovery
-
-
- {#each rollResults as { discovery, timestamp }}
-
-
- {capitalize(discovery.category)}{#if discovery.subcategory !== ""} ({discovery.subcategory}){/if}: {capitalize(
- discovery.description
- )}
-
-
-
-
- {#if discovery.category == "creature"}
-
- Are you feeling lucky, punk?
-
- {:else if discovery.category == "steading"}
-
- TODO: format steadings
-
- {:else}
-
- Details:
-
- {#if discovery.age}Age: {discovery.age.description} {/if}
- {#if discovery.alignment}Alignment: {discovery.alignment.description} {/if}
- {#if discovery.aspect}Aspect: {discovery.aspect.description} {/if}
- {#if discovery.creature}Produced/Inhabited By: {discovery.creature.description} {/if}
- {#if discovery.element}Element: {discovery.element.description} {/if}
- {#if discovery.magicType}MagicType: {discovery.magicType.description} {/if}
- {#if discovery.ruination}Ruination: {discovery.ruination.description} {/if}
- {#if discovery.size}Size: {discovery.size.description} {/if}
- {#if discovery.steading}Steading: {discovery.steading.description} {/if}
- {#if discovery.visibility}Visibility: {discovery.visibility.description} {/if}
-
-
- {/if}
-
-
-
- {timestamp}
-
- {/each}
-
-
-
diff --git a/src/rollers/DungeonRoller.svelte b/src/rollers/DungeonRoller.svelte
deleted file mode 100644
index a8e6911..0000000
--- a/src/rollers/DungeonRoller.svelte
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
- Roll Dungeon
-
-
- {#each rollResults as { dungeon, timestamp }}
-
-
- {capitalize(dungeon.size.description)} {dungeon.function.description} built by (a/an) {dungeon.builder.description}
-
-
-
- Fell to ruination from {dungeon.ruination.description} .
-
-
-
-
- Common Themes ({dungeon.size.commonThemes}):
-
- {#each dungeon.commonThemes as theme}
- {theme.category}: {theme.description}
- {/each}
-
-
-
- Unique Themes ({dungeon.size.uniqueThemes}):
-
- {#each dungeon.uniqueThemes as theme}
- {theme.category}: {theme.description}
- {/each}
-
-
-
- Common Areas ({dungeon.size.commonAreas}):
-
- {#each dungeon.commonAreas as area}
- {area.type}/{area.category}: {area.description}
- {/each}
-
-
-
- Unique Areas ({dungeon.size.uniqueAreas}):
-
- {#each dungeon.uniqueAreas as area}
- {area.type}/{area.category}: {area.description}
- {/each}
-
-
-
-
-
- {timestamp}
-
- {/each}
-
-
-
diff --git a/src/rollers/FollowerRoller.svelte b/src/rollers/FollowerRoller.svelte
deleted file mode 100644
index 6ab4630..0000000
--- a/src/rollers/FollowerRoller.svelte
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
- Roll Followers
-
-
- {#each rollResults as { follower, timestamp }}
-
-
- {follower.name} ({follower.gender})
-
-
-
- From {follower.homeSteading.homesteadName} in {follower.homeSteading.kingdomName}
-
-
-
-
- Quality:
-
- They are {follower.quality.description} (Quality: {follower.quality.value}). They
- {follower.background.description} .
-
-
-
- Tags:
-
- {#each follower.tags as tag}
- {tag.name}: {tag.description}
- {/each}
-
-
-
- Moves:
-
- {#each follower.moves as move}
- {move.description}
- {/each}
-
-
-
- Loyalty:
-
- They have a loyalty score of {follower.loyalty.value}{#if !!follower.loyalty.description}
- and {follower.loyalty.description} {/if}.
-
-
-
- Instinct:
-
- When left to their own devices, they will {follower.instinct.description} .
-
-
-
- Cost:
-
- They are motivated by {follower.cost.name} . They will want {follower.cost.description}
-
-
-
- Hit Points:
-
- They are {follower.hitPoints.description} and have {follower.hitPoints.value} HP.
-
-
-
- Armor & Shield:
-
- They are equipped with {follower.armor.description} ({follower.armor.value} armor).
-
-
-
- Damage:
-
- In a fight, they {follower.damage.description} dealing d{follower.damage.value} damage.
-
-
-
- Load & Gear:
-
- {#each follower.loadAndGear.gear as gear}
- {gear}
- {/each}
-
-
-
-
-
- {timestamp}
-
- {/each}
-
-
-
diff --git a/src/rollers/NpcRoller.svelte b/src/rollers/NpcRoller.svelte
deleted file mode 100644
index 7e86c03..0000000
--- a/src/rollers/NpcRoller.svelte
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
- Roll Npc
-
-
- {#each rollResults as { npc, timestamp }}
-
-
- {npc.getDescription()}
-
-
-
- From {npc.hometown} .
-
-
-
-
- Background Context:
-
-
- They are a(n) {npc.context.alignment.description} {npc.context.description} with
- {npc.trait.category} ({npc.context.trait.description})
- encountered in a(n) {npc.context.category} setting while they are {npc.context.activity.description}
-
-
-
-
- Follower Stats:
-
-
-
-
-
- {timestamp}
-
- {/each}
-
-
-
diff --git a/src/rollers/creatures.ts b/src/rollers/creatures.ts
index 7b252aa..75fd7ff 100644
--- a/src/rollers/creatures.ts
+++ b/src/rollers/creatures.ts
@@ -5,7 +5,7 @@ import { Ability, Activity, Adjective, Age, Alignment, Aspect, Condition, Dispos
import { Npc, rollNpc } from './npcs';
export class Creature {
- constructor(public roll: number = 0, public subroll: number = 0, public specifcroll: number = 0, public type: string = "", public subtype: string = "", public description: string = "") { };
+ constructor(public roll: number = 0, public subroll: number = 0, public specificroll: number = 0, public type: string = "", public subtype: string = "", public description: string = "") { };
ability?: Ability;
activity?: Activity;
diff --git a/src/rollers/kingdoms.ts b/src/rollers/kingdoms.ts
index ec65b61..58e1288 100644
--- a/src/rollers/kingdoms.ts
+++ b/src/rollers/kingdoms.ts
@@ -43,7 +43,7 @@ export const kingdoms: { [kingdom: string]: Kingdom } = {
categories: ['male', 'female', 'steading', 'mount'],
male: ['Me', 'Mi', 'Amaziah', 'Ayokunle', 'Ary', 'Bambang', 'Bima', 'Budi', 'Darma', 'Dian', 'Eli', 'Gunardi', 'Hartono', 'Irwan', 'Lauwita', 'Manusama', 'Okan', 'Onesimus', 'Sammin', 'Tameem', 'Tanaya', 'Tirto', 'Wiryono', 'Yandi', 'Zebulun',],
female: ['Mah', 'Bulan', 'Candrakusuma', 'Devi', 'Hanjojo', 'Iman', 'Intan', 'Laksniini', 'Lestari', 'Limijanto', 'Marah', 'Megawati', 'Melati', 'Nadiyya', 'Ophrah', 'Ramza', 'Sapphiral', 'Selah', 'Suminten', 'Tamar', 'Tanjaya', 'Tjokro', 'Tri', 'Wangi', 'Zenze',],
- steading: ['Airdib (Blessed Waters)', 'Airjinh (Clearwater)', 'Akhir Jalan (Road\'s End)', 'Berdarah (Bloody)', 'Bidang Bera (Fallow Field)', 'Candibula (Moon Temple)', 'Ditingga (Forsaken)', 'Emasungai (Gold Creek)', 'Gunung (Mountain)', 'Kayu (Timber)', 'Kuil (Temple)', 'Ladang Hijau (Greenfield)', 'Lembah (Valley)', 'Menjau (Far Away)', 'Ngarai (Canyon)', 'Persimpangan (Crossroads)', 'Puncakit (Hilltop)', 'Sungairac (}bison River)', 'Teibing (Cliffside)', 'Tempat Aman (Safe Place)', 'Tempat Istir (Rest Place)', 'Terkutuk (Cursed)', 'Tersentu (Touched by God)', 'Wahah (Oasis)', 'Yangtinggi (High Tower)',],
+ steading: ['Airdib (Blessed Waters)', 'Airjinh (Clearwater)', 'Akhir Jalan (Road\'s End)', 'Berdarah (Bloody)', 'Bidang Bera (Fallow Field)', 'Candibula (Moon Temple)', 'Ditingga (Forsaken)', 'Emasungai (Gold Creek)', 'Gunung (Mountain)', 'Kayu (Timber)', 'Kuil (Temple)', 'Ladang Hijau (Greenfield)', 'Lembah (Valley)', 'Menjau (Far Away)', 'Ngarai (Canyon)', 'Persimpangan (Crossroads)', 'Puncakit (Hilltop)', 'Sungairac (Bison River)', 'Teibing (Cliffside)', 'Tempat Aman (Safe Place)', 'Tempat Istir (Rest Place)', 'Terkutuk (Cursed)', 'Tersentu (Touched by God)', 'Wahah (Oasis)', 'Yangtinggi (High Tower)',],
mount: ['Anginu (North Wind)', 'Api (Blaze)', 'Bakat (Felicity)', 'Bakti (Loyal)', 'Beruntung (Lucky)', 'Bilah (Blade)', 'Biru (Blue)', 'Gemetar (Quiver)', 'Guntur (Thunder)', 'Hidungi (Black Nose)', 'Janda (Widow)', 'Kakicerah (Bright Foot)', 'Kakiring (Light Foot)', 'Keriangan (Sunshine)', 'Kunang (Firefly)', 'Lapar (Hungry)', 'Murni (Pure)', 'Paruh (Bill)', 'Penebus (Avenger)', 'Penyelemat (Savior)', 'Prajurit (Warrior)', 'Rusak (Broken)', 'Satucep (Fast One)', 'Setia (True Heart)', 'Tahanla (Durable)',]
},
};
diff --git a/src/types/Roll.ts b/src/types/Roll.ts
new file mode 100644
index 0000000..47a4871
--- /dev/null
+++ b/src/types/Roll.ts
@@ -0,0 +1,4 @@
+export class Roll {
+ roll: number;
+ description: string;
+}
\ No newline at end of file
diff --git a/svelte.config.js b/svelte.config.js
index 3403ddf..bcd7482 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -1,5 +1,8 @@
+const sveltePreprocess = require('svelte-preprocess');
+
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/tpw/'
- : '/'
+ : '/',
+ preprocess: sveltePreprocess()
}
\ No newline at end of file