Skip to content

Commit

Permalink
feat: improve character sheet data
Browse files Browse the repository at this point in the history
Signed-off-by: hxtree <[email protected]>
  • Loading branch information
hxtree committed Jun 13, 2024
1 parent 5b76996 commit 1ba34b7
Show file tree
Hide file tree
Showing 11 changed files with 198 additions and 117 deletions.
20 changes: 13 additions & 7 deletions services/character-sheet/src/data/attribute.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/*
* Attributes are the primary way to describe a character's **last known state**.
* Gauge attributes such as Life, Spirit, and Drive have a current value and a maximum value.
* The maximum value may be exceeded, but the current value cannot be negative.
* The current value is variable, and may be modified by actions.
* The maximum value is fixed, and cannot be modified by actions. Instead it is computed from the
* character's discipline, the character's level, and the character's equipment.
* https://en.wikipedia.org/wiki/Attribute_(role-playing_games)
*/

export enum Attribute {
/** Character Attributes */
EXPERIENCE = 'Experience',

/*
* Gauge attributes
* Gauges have a current value and a maximum value.
* The maximum value may be exceeded, but the current value cannot be negative.
* The current value is variable, and may be modified by actions.
* The maximum value is fixed, and cannot be modified by actions. Instead it is computed from the
* character's discipline, the character's level, and the character's equipment.
* https://en.wikipedia.org/wiki/Attribute_(role-playing_games)
*/
LIFE = 'Life',
SPIRIT = 'Spirit',
DRIVE = 'Drive',

/** Base Attributes */
POWER = 'Power',
SPEED = 'Speed',
WISDOM = 'Wisdom',
Expand Down
5 changes: 3 additions & 2 deletions services/character-sheet/src/data/discipline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export namespace Discipline {
category: Category.ARCHETYPE,
progression: [
{ level: 1, skill: Skill.BOAST },
{ level: 10, skill: Skill.FORMATIONS },
{ level: 50, skill: Skill.ORDER },
{ level: 10, skill: Skill.LAST_STAND },
{ level: 50, skill: Skill.BLITZ_STRIKE },
{ level: 80, skill: Skill.FLANK },
],
};

Expand Down
80 changes: 39 additions & 41 deletions services/character-sheet/src/data/skill/basic.skill.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import { EffectTable } from '../table.effect';
import { EffectRecord, EffectTable } from '../table.effect';
import { Attribute } from '../attribute';
import { MenuSlot } from '../menu-slot';

// todo really what makes something a class skill is whether it can be earned via class? decouple

/**
* Class Skills are motor programs that a character learns to preform.
* Each skill can be acquired via items, etc. but often
* progression is determined by class.
* Active Skills are motor programs that a character learns to perform.
* Each skill can be acquired via items, etc., but often progression is determined by class.
*/
export namespace Basic {
// fuel?
// Whether when performing move if character can hold action to put more effort into action
export enum Focusable {
STAMINA = 'Stamina',
TRUE = 'True',
Expand All @@ -36,21 +31,29 @@ export namespace Basic {
* For every 6 seconds, character gains a plus 1 for example.
*/
booster?: Attribute;

/**
* Cost is the resource expenditure that must be given up by the actor to
* perform the action. By holding button longer additional cost can be
* consumed for some skills.
*/
cost?: EffectRecord[];

menuSlot: MenuSlot;
};

export const BOAST: Type = {
name: 'Boast',
description: 'increase party’s moral',
description: 'Increase party morale.',
effect: [],
cost: [{ remove: Attribute.SPIRIT, quantity: '1d6+10' }],
menuSlot: MenuSlot.FIRST,
};

export const DISGUISE: Type = {
name: 'Disguise',
description: 'Changes appearance and disables command menu until canceled.',
effect: [],
// stamina,
menuSlot: MenuSlot.FIRST,
};

Expand All @@ -63,23 +66,24 @@ export namespace Basic {

export const FOCUS: Type = {
name: 'Focus',
description: 'raise attack and attack percent for following move.',
description: 'Raise attack and attack percent for following move.',
effect: [],
cost: [{ remove: Attribute.SPIRIT, quantity: '1d6+10' }],
menuSlot: MenuSlot.FIRST,
};

export const GRAPPLE: Type = {
name: 'Grapple',
description: 'Lowers character and opponents life.',
effect: [],
cost: [{ remove: Attribute.SPIRIT, quantity: '1d6+10' }],
menuSlot: MenuSlot.FIRST,
};

export const HIDE: Type = {
name: 'Hide',
description: 'Enemy cannot see you',
description: 'Become invisible to enemies.',
effect: [],
// [stamina]
menuSlot: MenuSlot.FIRST,
};

Expand All @@ -92,144 +96,138 @@ export namespace Basic {

export const CHEER: Type = {
name: 'Cheer',
description: 'Targets Spirit increases by 10% for a duration',
description: 'Boost targets Spirit by 10% for a duration.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const SUPPORT: Type = {
name: 'Support',
description: 'Read enemies stats.',
description: 'Provide support to allies.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const HOPE: Type = {
name: 'Hope',
description: 'The most powerful status bonus',
description: 'Bestow the most powerful status bonus.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const INSPIRE: Type = {
name: 'Inspire',
description: 'Increases target Drive gauge',
description: "Increase target's Drive gauge.",
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const SCOUT: Type = {
name: 'Scout',
description: 'Move ahead of party.',
description: 'Move ahead of the party to gather information.',
effect: [],
menuSlot: MenuSlot.FIRST,
// constantly consumes stamina
};

export const MIMIC: Type = {
name: 'Mimic',
description: 'Use the same move that was used on you on the enemy.',
description: 'Use the last move performed on you against the enemy.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const PICKPOCKET: Type = {
name: 'Pickpocket',
description: 'Steal from enemy.',
description: 'Steal items from enemies.',
effect: [],
menuSlot: MenuSlot.FIRST,
// cost [stamina]
};

export const SEAL: Type = {
name: 'Seal',
description: 'Keep enemies from getting close.', // hold an enemy off
// (Good for when party is powering up)
description: 'Prevent enemies from approaching.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const LULLABY: Type = {
name: 'Lullaby',
description: 'Send enemies moves back at them',
description: 'Reflect enemy moves back at them.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const WARD: Type = {
name: 'Ward',
description: '"Keep enemies from getting close.',
// (Good for when party is powering up)
description: 'Keep enemies at bay with spiritual energy.',
effect: [],
cost: [{ remove: Attribute.SPIRIT, quantity: '1d20+10' }],
menuSlot: MenuSlot.FIRST,
};

export const SACRIFICE: Type = {
name: 'Sacrifice',
description: '',
description: 'Sacrifice something precious for a powerful effect.',
effect: [],
cost: [{ remove: Attribute.LIFE, quantity: '1d20+10' }],
menuSlot: MenuSlot.FIRST,
};

export const PROTECT: Type = {
name: 'Protect',
description: 'guard party members behind you.',
// [stamina]
description: 'Guard party members behind you.',
effect: [],
cost: [{ remove: Attribute.SPIRIT, quantity: '1d20+10' }],
menuSlot: MenuSlot.FIRST,
};

export const MOCK: Type = {
name: 'Mock',
description: 'make a mocking action to cause Berserk on the opponent',
// stamina]
description: 'Taunt the enemy, potentially causing them to go berserk.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const SEARCH: Type = {
name: 'Search',
description: 'scan nearby area for goods.',
description: 'Scan the nearby area for valuable items.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const STEAL: Type = {
name: 'Steal',
description: 'Take item from opponent',
// [stamina]
description: 'Take items from opponents.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const REFLECT: Type = {
name: 'Reflect',
description: 'Send enemies moves back at them.',
description: 'Send enemy moves back at them.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const PROTECTION: Type = {
name: 'Protection',
description: 'Create a barrier around a ally',
description: 'Create a protective barrier around an ally.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const LIGHT: Type = {
name: 'Light',
description:
'Keep enemies from moving for a duration of time. Chance Puts enemy to sleep. Stops rage',
'Bind enemies, potentially putting them to sleep and stopping their rage.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

export const RAGE: Type = {
name: 'Rage',
description: 'Increase power decrease wisdom',
description: 'Increase power at the cost of wisdom.',
effect: [],
menuSlot: MenuSlot.FIRST,
};

// "12","Boast/Rally/Inspire","Increase allies determination","10",,"10"
}
24 changes: 16 additions & 8 deletions services/character-sheet/src/data/skill/interaction.skill.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { MenuSlot } from '../menu-slot';

/**
* InteractionSkills are actions that can only be used when a compatible object is present
* InteractionSkill Actions are a type of Command Menu actions,
* Interaction skills are actions that can only be used when a compatible object is present.
* They are a type of Command Menu action.
*/
export namespace Interaction {
export type Type = {
Expand All @@ -20,42 +20,50 @@ export namespace Interaction {

export const GRAB: Type = {
name: 'Grab',
description: 'Grab object',
description: 'Grab an object.',
target: ObjectCategory.MOVEABLE,
menuSlot: MenuSlot.INTERACTION,
};

export const PUSH: Type = {
name: 'Push',
description: 'Push object',
description: 'Push an object.',
target: ObjectCategory.MOVEABLE,
menuSlot: MenuSlot.INTERACTION,
};

export const PULL: Type = {
name: 'Pull',
description: 'Pull object',
description: 'Pull an object.',
target: ObjectCategory.MOVEABLE,
menuSlot: MenuSlot.INTERACTION,
};

export const LIFT: Type = {
name: 'Lift',
description: 'Lift object',
description: 'Lift an object.',
target: ObjectCategory.MOVEABLE,
menuSlot: MenuSlot.INTERACTION,
};

export const THROW: Type = {
name: 'Throw',
description: 'Throw object',
description: 'Throw an object.',
target: ObjectCategory.MOVEABLE,
menuSlot: MenuSlot.INTERACTION,
};

export const PICK_LOCK: Type = {
name: 'Pick Lock',
description: 'Pick a lock',
description: 'Attempt to pick a lock.',
target: ObjectCategory.LOCKED,
menuSlot: MenuSlot.INTERACTION,
};

export const UNLOCK: Type = {
name: 'Unlock',
description: 'Open a lock using a key.',
// consumes a key
target: ObjectCategory.LOCKED,
menuSlot: MenuSlot.INTERACTION,
};
Expand Down
Loading

0 comments on commit 1ba34b7

Please sign in to comment.