Skip to content

Commit

Permalink
Merge pull request #776 from ryceg:chore/extract-files-from-townData
Browse files Browse the repository at this point in the history
add
  • Loading branch information
ryceg authored Oct 31, 2022
2 parents 081e40b + 29771ae commit 98244ce
Show file tree
Hide file tree
Showing 9 changed files with 1,494 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/roads/roadNames.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const roadNames = {
name: ['Castle', 'Keep', 'Kings', 'Queens', 'Prince', 'Princess', 'Lords', 'Ladies', 'Noble', 'Duke', 'Duchess', 'Rogue', 'Priest', 'Abbott', 'Pope', 'Saint', 'Spring', 'Winter', 'Summer', 'Autumn', 'Butcher', 'Tailor', 'Smith', 'Potter', 'Baker', 'Farrier', 'Old', 'New', 'Common', 'Main', 'High', 'Low', 'Butcher', 'Tailor', 'Smith', 'Potter', 'Baker', 'Farrier', 'Church', 'Bank', 'Old', 'New', 'Common', 'Main', 'High', 'Low', 'North', 'South', 'West', 'East', 'First', 'Water', 'Brook', 'Lake', 'Canal', 'River', 'Beach', 'Pearl', 'Broad', 'Grand', 'Cherry', 'Willow', 'Mulberry', 'Grove', 'Bridge', 'Hill', 'Ridge', 'Wall', 'Front', 'Green'],
type: ['Street', 'Street', 'Street', 'Street', 'Lane', 'Lane', 'Lane', 'Road', 'Road', 'Road', 'Road', 'Square', 'Square', 'Market', 'Way', 'Crescent', 'Close', 'Wynd', 'Row', 'Avenue', 'Alley', 'Drive', 'Boulevard', 'Plaza', 'Circle']
}
89 changes: 89 additions & 0 deletions lib/town/economicIdeologyData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import { PartialRecord } from '../types'
import { EconomicIdeology } from './townData'
import { Town, TownRolls } from './_common'

export const economicIdeologyData: {
[key in EconomicIdeology]: {
modifiers: PartialRecord<TownRolls, number>
descriptors: {
economicIdeologyIC: string
economicIdeologyIST: string
economicIdeologyDescription: (town: Town) => string
tippy: string
}
}
} = {
feudalism: {
modifiers: {
economics: 15,
welfare: -25,
law: 15,
military: 20
},
descriptors: {
economicIdeologyIC: 'feudalistic',
economicIdeologyIST: 'feudalist',
economicIdeologyDescription: (town: Town) => `The people of ${town.name} work the land in exchange for working their lord's lands.`,
tippy: "The crown gives land to the nobles in exchange for military service. Peasants work, tithe, and fight for the nobles in exchange for being able to live on the noble's lands."
}
},
capitalism: {
modifiers: {
economics: -20,
welfare: -25,
law: 15,
military: 20
},
descriptors: {
economicIdeologyIC: 'capitalistic',
economicIdeologyIST: 'capitalist',
economicIdeologyDescription: (town: Town) => `The people of ${town.name} work in exchange for payment from their employers, which they use to buy the necessities.`,
tippy: 'Trade and industry are controlled by private owners for profit, rather than the state.'
}
},
syndicalism: {
modifiers: {
economics: 35,
welfare: 25,
law: -15,
military: -15,
equality: 25
},
descriptors: {
economicIdeologyIC: 'syndicalistic',
economicIdeologyIST: 'syndicalist',
economicIdeologyDescription: (town: Town) => `The people of ${town.name} own the lands they work on collectively, and together benefit from its prosperity.`,
tippy: 'The workers own the lands they work on collectively, and together benefit from its prosperity.'
}
},
communism: {
modifiers: {
economics: 40,
welfare: 30,
law: -15,
military: -30,
equality: 25
},
descriptors: {
economicIdeologyIC: 'communistic',
economicIdeologyIST: 'communist',
economicIdeologyDescription: (town: Town) => `The people of ${town.name} work the jobs that they are able to, and are paid according to their needs. Excess profits are reinvested to strengthen the society as a whole.`,
tippy: 'People work the jobs that they are able to, and are paid according to their needs. Excess profits are reinvested to strengthen the society as a whole.'
}
},
primitivism: {
modifiers: {
economics: 40,
welfare: -25,
law: -30,
military: -30,
equality: -25
},
descriptors: {
economicIdeologyIC: 'primitivistic',
economicIdeologyIST: 'primitivist',
economicIdeologyDescription: (town: Town) => `The people of ${town.name} work the land in a loosely organised sense; there is no concept of ownership, and the majority of the $town.type's citizens are hunter-gatherers.`,
tippy: 'There is no formal government, and people are largely hunter-gatherers with no concept of ownership; might makes right.'
}
}
}
302 changes: 302 additions & 0 deletions lib/town/miscTownData.ts

Large diffs are not rendered by default.

254 changes: 254 additions & 0 deletions lib/town/politicalIdeologyData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
import { PartialRecord } from '../types'
import { FactionType } from '../faction/factionData'
import { NPC } from '../npc-generation/_common'
import { PoliticalIdeology } from './townData'
import { TownRolls } from './_common'

export const politicalIdeologyData: {
[key in PoliticalIdeology]: {
leaderTraits: () => Partial<NPC>
modifiers: PartialRecord<TownRolls, number>
data: {
isFaction: boolean
leaderType: string
governmentType: FactionType
politicalIdeologyIC: string
description: string
}
}
} = {
autocracy: {
leaderTraits: () => ({
hasClass: false,
profession: 'lord',
background: 'noble',
title: 'Lord',
socialClass: 'nobility'
}),
modifiers: {
economics: 45,
welfare: -25,
law: 15,
military: 25,
arcana: -5
},
data: {
isFaction: false,
leaderType: 'the supreme leader',
governmentType: 'nobles',
politicalIdeologyIC: 'autocratic',
description: 'Governed by one person.'
}
},
meritocracy: {
leaderTraits: () => ({
hasClass: false,
background: 'noble',
title: 'Lord',
socialClass: 'nobility'
}),
modifiers: {
economics: 15,
welfare: 5,
law: -5,
military: -5,
arcana: 15,
equality: 25
},
data: {
isFaction: false,
leaderType: 'the competent',
governmentType: 'commoners',
politicalIdeologyIC: 'meritocratic',
description: 'Governed by the best.'
}
},
democracy: {
leaderTraits: () => ({
hasClass: false,
profession: 'prime minister',
background: 'commoner',
title: 'Lord',
socialClass: 'nobility'
}),
modifiers: {
economics: -15,
welfare: 25,
law: 15,
military: -5,
arcana: 15,
equality: 25
},
data: {
isFaction: false,
leaderType: 'the people',
governmentType: 'commoners',
politicalIdeologyIC: 'democratic',
description: 'Governed by the elected.'
}
},
kleptocracy: {
leaderTraits: () => ({
hasClass: true,
profession: 'rogue',
background: 'criminal',
title: 'High Thief',
socialClass: 'nobility'
}),
modifiers: {
economics: -35,
welfare: -25,
law: -30,
military: -5,
arcana: 15
},
data: {
isFaction: true,
leaderType: "the Thieves' Guild",
governmentType: 'thieves',
politicalIdeologyIC: 'kleptocratic',
description: 'Governed by the thieves.'
}
},
magocracy: {
leaderTraits: () => ({
hasClass: true,
profession: 'wizard',
background: 'sage',
title: 'Archchancellor',
socialClass: 'nobility'
}),
modifiers: {
economics: 2,
welfare: 5,
law: -5,
military: -5,
arcana: 50
},
data: {
isFaction: true,
leaderType: 'the wizards',
governmentType: 'wizards',
politicalIdeologyIC: 'magocratic',
description: 'Governed by the wizards.'
}
},
militocracy: {
leaderTraits: () => ({
hasClass: true,
profession: 'fighter',
background: 'soldier',
title: 'Commander',
socialClass: 'nobility'
}),
modifiers: {
economics: 25,
welfare: -5,
law: 30,
military: 50,
arcana: -15,
equality: -25
},
data: {
isFaction: true,
leaderType: 'the military',
governmentType: 'military',
politicalIdeologyIC: 'militocratic',
description: 'Governed by the military.'
}
},
oligarchy: {
leaderTraits: () => ({
hasClass: false,
profession: 'noble',
background: 'noble',
title: 'Lord',
socialClass: 'nobility'
}),
modifiers: {
economics: 15,
welfare: -15,
law: 5,
military: 5,
arcana: -5
},
data: {
isFaction: false,
leaderType: 'the powerful few',
governmentType: 'nobles',
politicalIdeologyIC: 'oligarchic',
description: 'Governed by the powerful few.'
}
},
sophocracy: {
leaderTraits: () => ({
hasClass: false,
profession: lib.random(['scholar', 'philosopher', 'horologist', 'mathematician']),
background: 'sage',
title: 'Sir',
socialClass: 'nobility'
}),
modifiers: {
economics: 15,
welfare: 50,
law: -5,
military: -5,
arcana: 15,
equality: 25
},
data: {
isFaction: true,
leaderType: 'the scholars',
governmentType: 'scholars',
politicalIdeologyIC: 'sophocratic',
description: 'Governed by the scholars.'
}
},
theocracy: {
leaderTraits: () => ({
hasClass: true,
profession: 'cleric',
background: 'acolyte',
title: 'High Priest',
gender: 'man',
socialClass: 'nobility'
}),
modifiers: {
economics: 15,
welfare: 30,
law: 15,
military: -15,
arcana: 35
},
data: {
isFaction: true,
leaderType: 'the holy',
governmentType: 'priests',
politicalIdeologyIC: 'theocratic',
description: 'Governed by the church.'
}
},
technocracy: {
leaderTraits: () => ({
hasClass: false,
profession: 'architect',
background: 'guild artisan',
title: 'Architect',
socialClass: 'nobility'
}),
modifiers: {
economics: 35,
welfare: 15,
law: -15,
military: -5,
arcana: 25
},
data: {
isFaction: false,
leaderType: 'the engineers',
governmentType: 'craftsmen',
politicalIdeologyIC: 'technocratic',
description: 'Governed by the engineers.'
}
}
}
Loading

1 comment on commit 98244ce

@vercel
Copy link

@vercel vercel bot commented on 98244ce Oct 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.