-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
// Call of Cthulhu Models | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
export interface CocBackstory | ||
{ | ||
description : string; | ||
ideology : string; | ||
significantPeople : string; | ||
meaningfulLocations : string; | ||
treasuredPossession : string; | ||
traits : string; | ||
injuries : string; | ||
phobias : string; | ||
arcaneTomes : string; | ||
encounters : string; | ||
} | ||
|
||
export interface CoCSkill | ||
{ | ||
name : string; | ||
defaultValue : number; | ||
value : number; | ||
} | ||
|
||
export interface CoCCharacteristics | ||
{ | ||
strength : number; | ||
constitution : number; | ||
size : number; | ||
dexterity : number; | ||
appearance : number; | ||
intelligence : number; | ||
power : number; | ||
education : number; | ||
} | ||
|
||
export interface CoCStat | ||
{ | ||
value : number; | ||
max : number; | ||
starting ?: number; | ||
} | ||
|
||
export interface CocBiography | ||
{ | ||
age : number; | ||
birthplace : string; | ||
name : string; | ||
occupation : string; | ||
pronouns : string; | ||
residence : string; | ||
} | ||
|
||
export interface CoCWeapon | ||
{ | ||
name : string; | ||
damage : string; | ||
range : string; | ||
attacks : number; | ||
ammo : number; | ||
malfunctions : number; | ||
skill : string; // TODO: This is a skill name, should be a reference to a skill | ||
} | ||
|
||
export interface CoCWealth | ||
{ | ||
cash : number; | ||
assets : string; | ||
spendingLevel : string; | ||
} | ||
|
||
export interface CoCSystemDetails | ||
{ | ||
biography : CocBiography; | ||
characteristics : CoCCharacteristics; | ||
skills : CoCSkill[]; | ||
movement : number; | ||
luck : CoCStat; | ||
sanity : CoCStat; | ||
hitPoints : CoCStat; | ||
magicPoints : CoCStat; | ||
status : { | ||
temporaryInsanity : boolean; | ||
indefiniteInsanity : boolean; | ||
majorWound : boolean; | ||
unconscious : boolean; | ||
dying : boolean; | ||
} | ||
weapons : CoCWeapon[]; | ||
backstory : CocBackstory; | ||
gear : string[]; | ||
wealth : CoCWealth; | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
// Call of Cthulhu DB Tables | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
import type { Knex } from 'knex'; | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
export async function up(knex : Knex) : Promise<Knex.QueryBuilder> | ||
{ | ||
await knex.schema.createTable('coc_weapons', (table) => | ||
{ | ||
table.increments('id').primary(); | ||
table.string('name').notNullable(); | ||
table.string('damage').notNullable(); | ||
table.string('range').notNullable(); | ||
table.integer('attacks').notNullable(); | ||
table.integer('ammo').notNullable(); | ||
table.integer('malfunction').notNullable(); | ||
table.string('notes').notNullable(); | ||
}); | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
export async function down(knex: Knex): Promise<Knex.QueryBuilder> | ||
{ | ||
await knex.schema.dropTable('coc_weapons'); | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
// Fate Model Defaults | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
export default { | ||
character: { | ||
} | ||
}; | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
// Call of Cthulhu System | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
// BaseClass | ||
import { BaseSystem } from '../base'; | ||
|
||
// Defaults | ||
import defaults from './defaults'; | ||
|
||
// Logger | ||
import logging from '@strata-js/util-logging'; | ||
import { SupportStatus } from '../../../common/interfaces/models/system'; | ||
|
||
const logger = logging.getLogger('fate-system'); | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
// System definition | ||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
const id = 'coc'; | ||
const name = 'Call of Cthulhu'; | ||
const description = 'In Call of Cthulhu, you take on the role of everyday people who become investigators of the ' | ||
+ 'unknown—whether they are prepared or not. The mysterious places, people, and situations you encounter are ' | ||
+ 'often not what they seem—you and your friends are the only thing standing in the way of diabolical cults and ' | ||
+ 'cosmic monsters from beyond space!'; | ||
|
||
class FATESystem extends BaseSystem | ||
{ | ||
constructor() | ||
{ | ||
super(id, name, description, defaults.character, SupportStatus.InDevelopment); | ||
|
||
logger.info(`Loaded '${ name }' system.`); | ||
} | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- | ||
|
||
export default new FATESystem(); | ||
|
||
//---------------------------------------------------------------------------------------------------------------------- |