diff --git a/src/games/Blades/index.ts b/src/games/Blades/index.ts new file mode 100644 index 00000000..ecdae378 --- /dev/null +++ b/src/games/Blades/index.ts @@ -0,0 +1,33 @@ +import { roll as baseRoll } from '~src/roll' +import { RollResult } from './types' + +function judgeResult(sortedRolls: number[]): RollResult { + const sixes = sortedRolls.filter((r) => r === 6).length + if (sixes >= 2) { + return RollResult.CRITICAL + } + + switch (sortedRolls[0]) { + case 6: + return RollResult.SUCCESS + case 5: + case 4: + return RollResult.PARTIAL + default: + return RollResult.FAILURE + } +} + +function roll(count: number): [RollResult, number[]] { + const rollResult = baseRoll({ + sides: 6, + quantity: count + }) + const rolls = rollResult.rawResult.flat().sort((a, b) => a - b) + + return [judgeResult(rolls), rolls] +} + +import * as types from './types' + +export default { roll, judgeResult, ...types } diff --git a/src/games/InTheDark/types.ts b/src/games/Blades/types.ts similarity index 73% rename from src/games/InTheDark/types.ts rename to src/games/Blades/types.ts index b91b175c..9238d320 100644 --- a/src/games/InTheDark/types.ts +++ b/src/games/Blades/types.ts @@ -1,4 +1,4 @@ -export enum InTheDarkRollResult { +export enum RollResult { CRITICAL = 'critical', SUCCESS = 'success', PARTIAL = 'partial', diff --git a/src/games/5E/index.ts b/src/games/DnD5E/index.ts similarity index 56% rename from src/games/5E/index.ts rename to src/games/DnD5E/index.ts index ffbc3920..d99b5e4e 100644 --- a/src/games/5E/index.ts +++ b/src/games/DnD5E/index.ts @@ -1,9 +1,9 @@ import { roll as baseRoll } from '~src/roll' -import { RollMods5E } from './type' +import { RollMods } from './type' -function roll(bonus: number = 0, mod: RollMods5E): number { - const isAdvantage = RollMods5E.Advantage === mod - const isDisadvantage = RollMods5E.Disadvantage === mod +function roll(bonus: number = 0, mod: RollMods): number { + const isAdvantage = RollMods.Advantage === mod + const isDisadvantage = RollMods.Disadvantage === mod const rollResult = baseRoll({ sides: 20, quantity: isAdvantage || isDisadvantage ? 2 : 1, @@ -16,5 +16,6 @@ function roll(bonus: number = 0, mod: RollMods5E): number { return rollResult.total } +import * as types from './type' -export default { roll, RollMods5E } +export default { roll, ...types } diff --git a/src/games/5E/type.ts b/src/games/DnD5E/type.ts similarity index 70% rename from src/games/5E/type.ts rename to src/games/DnD5E/type.ts index e510c5d1..2ce3074b 100644 --- a/src/games/5E/type.ts +++ b/src/games/DnD5E/type.ts @@ -1,4 +1,4 @@ -export enum RollMods5E { +export enum RollMods { Advantage = 'advantage', Disadvantage = 'disadvantage' } diff --git a/src/games/InTheDark/index.ts b/src/games/InTheDark/index.ts deleted file mode 100644 index 7c015f8f..00000000 --- a/src/games/InTheDark/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { roll as baseRoll } from '~src/roll' -import { InTheDarkRollResult } from './types' - -function judgeResult(sortedRolls: number[]): InTheDarkRollResult { - const sixes = sortedRolls.filter((r) => r === 6).length - if (sixes >= 2) { - return InTheDarkRollResult.CRITICAL - } - - switch (sortedRolls[0]) { - case 6: - return InTheDarkRollResult.SUCCESS - case 5: - case 4: - return InTheDarkRollResult.PARTIAL - default: - return InTheDarkRollResult.FAILURE - } -} - -function roll(count: number): [InTheDarkRollResult, number[]] { - const rollResult = baseRoll({ - sides: 6, - quantity: count - }) - const rolls = rollResult.rawResult.flat().sort((a, b) => a - b) - - return [judgeResult(rolls), rolls] -} - -export default { roll, judgeResult, InTheDarkRollResult } diff --git a/src/games/SU/index.ts b/src/games/SU/index.ts deleted file mode 100644 index 3a221265..00000000 --- a/src/games/SU/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SUCoreMechanic } from './types' - -function interpretResult(result: number): SUCoreMechanic { - switch (true) { - case result === 20: - return SUCoreMechanic.nailedIt - case result >= 11 && result <= 19: - return SUCoreMechanic.success - case result >= 6 && result <= 10: - return SUCoreMechanic.toughChoice - case result >= 2 && result <= 5: - return SUCoreMechanic.failure - default: - return SUCoreMechanic.cascadeFailure - } -} - -export default { interpretResult } diff --git a/src/games/SalvageUnion/index.ts b/src/games/SalvageUnion/index.ts new file mode 100644 index 00000000..2f7973cf --- /dev/null +++ b/src/games/SalvageUnion/index.ts @@ -0,0 +1,28 @@ +import { RollTables } from './tables' +import { CoreMechanic, Entry, Table } from './types' +import { roll as baseRoll } from '~src/roll' + +function interpretRelt(relt: number): CoreMechanic { + switch (true) { + case relt === 20: + return CoreMechanic.nailedIt + case relt >= 11 && relt <= 19: + return CoreMechanic.ccess + case relt >= 6 && relt <= 10: + return CoreMechanic.toughChoice + case relt >= 2 && relt <= 5: + return CoreMechanic.failure + default: + return CoreMechanic.cascadeFailure + } +} + +function roll(tableKey: Table = Table.coreMechanic): [Entry, number] { + const { total } = baseRoll(20) + return [RollTables[tableKey][interpretRelt(total)], total] +} + +import * as types from './types' +import * as tables from './tables' + +export default { interpretRelt, roll, ...tables, ...types } diff --git a/src/games/SU/tables.ts b/src/games/SalvageUnion/tables.ts similarity index 61% rename from src/games/SU/tables.ts rename to src/games/SalvageUnion/tables.ts index 4bf762b5..1692ca82 100644 --- a/src/games/SU/tables.ts +++ b/src/games/SalvageUnion/tables.ts @@ -1,314 +1,319 @@ -import { SUCoreMechanic, SUTable, SUTableType } from './types' +import { CoreMechanic, Table, TableType } from './types' -export const SUNPCActionTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { - label: SUCoreMechanic.nailedIt, +export const NPCActionTable: TableType = { + [CoreMechanic.nailedIt]: { + label: CoreMechanic.nailedIt, description: - 'The NPC succeeds spectacularly at their action. They get an additional bonus of the Mediator’s choice. If they are making an attack, they hit, and do double damage or get another bonus of the Mediator’s choice.' + 'The NPC cceeds spectacularly at their action. They get an additional bonus of the Mediator’s choice. If they are making an attack, they hit, and do double damage or get another bonus of the Mediator’s choice.' }, - [SUCoreMechanic.success]: { - label: SUCoreMechanic.success, + [CoreMechanic.ccess]: { + label: CoreMechanic.ccess, description: - 'The NPC achieves their action successfully. An attack hits and deals standard damage.' + 'The NPC achieves their action ccessfully. An attack hits and deals standard damage.' }, - [SUCoreMechanic.toughChoice]: { - label: SUCoreMechanic.toughChoice, + [CoreMechanic.toughChoice]: { + label: CoreMechanic.toughChoice, description: - 'The NPC is successful, but faces a Tough Choice. The players give the Mediator a choice between two Setbacks. In combat, a weapon attack hits, but with a choice of Setback chosen by the players.' + 'The NPC is ccessful, but faces a Tough Choice. The players give the Mediator a choice between two Setbacks. In combat, a weapon attack hits, but with a choice of Setback chosen by the players.' }, - [SUCoreMechanic.failure]: { - label: SUCoreMechanic.failure, + [CoreMechanic.failure]: { + label: CoreMechanic.failure, description: 'The NPC has failed at their action. The players choose an appropriate Setback for failure. In combat, a weapon attack misses.' }, - [SUCoreMechanic.cascadeFailure]: { - label: SUCoreMechanic.cascadeFailure, + [CoreMechanic.cascadeFailure]: { + label: CoreMechanic.cascadeFailure, description: - 'The NPC has catastrophically failed at their action. They suffer a Severe Setback of the player’s choice. A weapon attack misses, with a Severe Setback chosen by the players.' + 'The NPC has catastrophically failed at their action. They ffer a Severe Setback of the player’s choice. A weapon attack misses, with a Severe Setback chosen by the players.' } } -export const SUNPCReactionTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const NPCReactionTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'Actively Friendly and Helpful', description: 'The NPCs are incredibly friendly and positive towards the group and will actively help them in any reasonable way they can.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Friendly', description: 'The NPCs are friendly and willing to talk, trade, and offer information to the group; however, they will still ask for their fair share in return.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Unfriendly', description: 'The NPCs react in an unfriendly manner to the group; they are difficult to talk or trade with and reluctant to offer any help to the Pilots.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Hostile', description: 'The NPCs are actively hostile to the group. They will defend their area, make motions to attack, gesture and threaten, and be unwilling to help in any way.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Actively Hostile', description: 'The NPCs will launch an attack on the group if appropriate or flee from them, barricade themselves in, and avoid contact as though they were hostile.' } } -export const SUNPMoraleTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const NPMoraleTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'Fight to the Death', description: 'The NPCs see this one through to the end. They hunker down and will not retreat from this fight under any circumstance.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Keep Fighting', description: 'The NPCs continue to fight this one out for now.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Fighting Retreat', description: 'The NPCs retreat, but do so whilst continuing to fight. They will fight for one more round and then retreat.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Retreat', description: 'The NPCs flee the fight as quickly and safely as possible.' }, - [SUCoreMechanic.cascadeFailure]: { - label: 'Surrender', + [CoreMechanic.cascadeFailure]: { + label: 'rrender', description: - 'The NPCs surrender to whoever is attacking them. If there is nobody to surrender to, they will recklessly flee.' + 'The NPCs rrender to whoever is attacking them. If there is nobody to rrender to, they will recklessly flee.' } } -export const SUCoreMechanicTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { - label: SUCoreMechanic.nailedIt, +export const CoreMechanicTable: TableType = { + [CoreMechanic.nailedIt]: { + label: CoreMechanic.nailedIt, description: - 'You have overcome the odds and managed an outstanding success. You may achieve an additional bonus of your choice to the action. When dealing damage, you can choose to double it or pick another appropriate bonus effect.' + 'You have overcome the odds and managed an outstanding ccess. You may achieve an additional bonus of your choice to the action. When dealing damage, you can choose to double it or pick another appropriate bonus effect.' }, - [SUCoreMechanic.success]: { - label: SUCoreMechanic.success, + [CoreMechanic.ccess]: { + label: CoreMechanic.ccess, description: 'You have achieved your goal without any compromises. When attacking, you hit the target and deal standard damage.' }, - [SUCoreMechanic.toughChoice]: { - label: SUCoreMechanic.toughChoice, + [CoreMechanic.toughChoice]: { + label: CoreMechanic.toughChoice, description: - 'You succeed in your action, but at a cost. The Mediator gives you a Tough Choice with some kind of Setback attached. When attacking, you hit, but must make a Tough Choice.' + 'You cceed in your action, but at a cost. The Mediator gives you a Tough Choice with some kind of Setback attached. When attacking, you hit, but must make a Tough Choice.' }, - [SUCoreMechanic.failure]: { - label: SUCoreMechanic.failure, + [CoreMechanic.failure]: { + label: CoreMechanic.failure, description: 'You have failed at what you were attempting to do. You face a Setback of the Mediator’s choice. When attacking, you miss the target.' }, - [SUCoreMechanic.cascadeFailure]: { - label: SUCoreMechanic.cascadeFailure, + [CoreMechanic.cascadeFailure]: { + label: CoreMechanic.cascadeFailure, description: - 'Something has gone terribly wrong. You suffer a severe conse- quence of the Mediator’s choice. When attacking, you miss the target and suffer a Setback chosen by the Mediator.' + 'Something has gone terribly wrong. You ffer a severe conse- quence of the Mediator’s choice. When attacking, you miss the target and ffer a Setback chosen by the Mediator.' } } -export const SUGroupInitiativeTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const GroupInitiativeTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'You shot first', description: 'Two Pilots chosen by the players act first. Play then passes to the NPC group and one NPC chosen by the Mediator acts next.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Quickdraw', description: 'One Pilot chosen by the players acts first. Play then passes to the NPC group and one NPC chosen by the Mediator acts.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Wait and See', description: 'One NPC chosen by the players acts first. Play then passes to the player group and one Pilot chosen by the players acts.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Fumble', description: 'One NPC chosen by the Mediator acts first. Play then passes to the player group and one Pilot chosen by the players acts.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Ambush', description: 'Two NPCs chosen by the Mediator act first. Play then passes to the player group and one Pilot is chosen by the players to act next.' } } -export const SURetreatTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const RetreatTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'Perfect Escape', description: - 'The group makes a perfect escape from the situation to any location of their choice within the Region Map and cannot be pursued.' + 'The group makes a perfect escape from the situation to any location of their choice within the Region Map and cannot be pured.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Escape', description: - 'The group makes a safe escape from the situation to any adjacent location of their choice within the Map and cannot be pursued.' + 'The group makes a safe escape from the situation to any adjacent location of their choice within the Map and cannot be pured.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Dangerous Escape', description: 'The group escapes to any adjacent location of their choice within the Region Map, but at a cost. They must make a Tough Choice related to the situation.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Failed Escape', description: 'The group fails to retreat from the situation and are pinned down. They cannot retreat and must fight it out to the end.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Disastrous Escape', description: - 'he group retreat to an adjacent location of their choice within the Region Map, but at a severe cost. They suffer a Severe Setback and may be pursued.' + 'he group retreat to an adjacent location of their choice within the Region Map, but at a severe cost. They ffer a Severe Setback and may be pured.' } } -export const SUCriticalDamageTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { - label: 'Miraculous Survival', +export const CriticalDamageTable: TableType = { + [CoreMechanic.nailedIt]: { + label: 'Miraculous rvival', description: 'Your Mech is somehow Intact. It has 1 SP and is still fully operational. Your Pilot is unharmed.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Core Damage', description: ' Your Mech Chassis is damaged and inoperable until repaired. All mounted Systems and Modules remain Intact. Your Pilot is reduced to 0 HP unless they have some means to escape the Mech.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Module Destruction', description: ' A Module mounted on your Mech is destroyed. This is chosen by the Mediator or at random. Your Mech Chassis is damaged and inoperable until repaired. Your Pilot is unharmed.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'System Destruction', description: 'A System mounted on your Mech is destroyed. This is chosen by the Mediator or at random. Your Mech Chassis is damaged and inoperable until repaired. Your Pilot is unharmed.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Catastrophic Failure', description: 'The Mech, as well as any mounted Systems and Modules as well as all Cargo, is destroyed. Your Pilot dies unless they have a means to escape the Mech.' } } -export const SUCriticalInjuryTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { - label: 'Miraculous Survival', +export const CriticalInjuryTable: TableType = { + [CoreMechanic.nailedIt]: { + label: 'Miraculous rvival', description: - 'You survive against the odds. You have 1 HP, remain conscious and can act normally.' + 'You rvive against the odds. You have 1 HP, remain conscious and can act normally.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Unconscious', description: 'You are stable at 0 HP, but unconscious and cannot move or take actions until you gain at least 1 HP. You will regain consciousness naturally in 1 hour and get back up with 1 HP.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Minor Injury', description: - 'You suffer a Minor Injury such as a sprain, burns, or minor concussion. Your Max HP is reduced by 1 until healed in a Tech 3 - 4 Med Bay. In addition, you are Unconscious. Apply the result of 11 - 19.' + 'You ffer a Minor Injury ch as a sprain, burns, or minor concussion. Your Max HP is reduced by 1 until healed in a Tech 3 - 4 Med Bay. In addition, you are Unconscious. Apply the relt of 11 - 19.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Major Injury', description: - 'You suffer a Major Injury such as permanent scarring, broken ribs, or internal injuries. Your Max HP is reduced by 2 until healed in a Tech 5 - 6 Med Bay. In addition, you are Unconscious. Apply the result of 11-19.' + 'You ffer a Major Injury ch as permanent scarring, broken ribs, or internal injuries. Your Max HP is reduced by 2 until healed in a Tech 5 - 6 Med Bay. In addition, you are Unconscious. Apply the relt of 11-19.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Fatal Injury', - description: 'Your Pilot suffers a fatal injury and dies.' + description: 'Your Pilot ffers a fatal injury and dies.' } } -export const SUReactorOverloadTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const ReactorOverloadTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'Reactor Overdrive', description: 'Your Mech’s reactor goes into overdrive. Your Mech can take any additional action this turn or Push their next roll within 10 minutes for free.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Reactor Overheat', description: 'Your Mech’s reactor has overheated. Your Mech shuts down and gains the Vulnerable Trait. Your Mech will re-activate at the end of your next turn. In addition, your Mech takes an amount of SP damage equal to your current Heat.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Module Overload', description: 'One of your Mech’s Modules chosen at random or by the Mediator is destroyed.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'System Overload', description: 'One of your Mech’s Systems chosen at random or by the Mediator is destroyed.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Reactor Overload', description: 'Your Mech’s reactor goes into full meltdown and explodes. Your Mech, as well as any mounted Systems, Modules, and all Cargo, is destroyed in the explosion. Everything in Close Range of your Mech takes SP damage equal to your Mech’s Maximum Heat Capacity. They may take any Turn Action or Reaction in response to try to avoid this. Your Pilot dies unless they have a means to escape. The area your Mech was in becomes Irradiated.' } } -export const SUAreaSalvageTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const AreaSalvageTable: TableType = { + [CoreMechanic.nailedIt]: { label: 'Jackpot!', description: 'You find a Mech Chassis, System, or Module at the Tech Level of the area. It is in the Damaged Condition. This can be randomised or chosen by the Mediator.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Winning', description: 'You find 3 Scrap of the Tech Level of the area.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Not Bad', description: 'You find 2 Scrap of the Tech Level of the area.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Better than nothing', description: 'You find 1 Scrap of the Tech Level of the area.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Nothing', description: 'You find nothing in this area.' } } -export const SUMechSalvageTable: SUTableType = { - [SUCoreMechanic.nailedIt]: { +export const MechSalvageTable: TableType = { + [CoreMechanic.nailedIt]: { label: "Lion's Share", description: 'You salvage the Mech Chassis, a System and a Module of your choice mounted on it. They both have the Damaged Condition. Anything else is considered destroyed.' }, - [SUCoreMechanic.success]: { + [CoreMechanic.ccess]: { label: 'Meat and Potatoes', description: 'You salvage the Mech Chassis or a System or Module of your choice mounted on it. It has the Damaged Condition. Anything else is considered destroyed.' }, - [SUCoreMechanic.toughChoice]: { + [CoreMechanic.toughChoice]: { label: 'Bits and Pieces', description: 'You salvage a System or Module of your choice mounted on the Mech. It has the Damaged Condition. Anything else is considered destroyed.' }, - [SUCoreMechanic.failure]: { + [CoreMechanic.failure]: { label: 'Nuts and Bolts', description: 'You salvage half of the Salvage Value of the Mech Chassis in Scrap of its Tech Level, to a minimum of 1. Everything else is considered destroyed.' }, - [SUCoreMechanic.cascadeFailure]: { + [CoreMechanic.cascadeFailure]: { label: 'Ashes and Dust', description: 'The Mech is unsalvageable: its Chassis, Systems and Modules are all considered destroyed.' } } -export const SUNPCTables = { - [SUTable.npcAction]: SUNPCActionTable, - [SUTable.npcReaction]: SUNPCReactionTable, - [SUTable.npcMorale]: SUNPMoraleTable +export const NPCTables = { + [Table.npcAction]: NPCActionTable, + [Table.npcReaction]: NPCReactionTable, + [Table.npcMorale]: NPMoraleTable } -export const SURollTables = { - ...SUNPCTables, - [SUTable.coreMechanic]: SUCoreMechanicTable, - [SUTable.groupInitiative]: SUGroupInitiativeTable, - [SUTable.retreat]: SURetreatTable +export const RollTables = { + ...NPCTables, + [Table.coreMechanic]: CoreMechanicTable, + [Table.groupInitiative]: GroupInitiativeTable, + [Table.retreat]: RetreatTable, + [Table.criticalDamage]: CriticalDamageTable, + [Table.criticalInjury]: CriticalInjuryTable, + [Table.reactorOverload]: ReactorOverloadTable, + [Table.areaSalvage]: AreaSalvageTable, + [Table.mechSalvage]: MechSalvageTable } diff --git a/src/games/SU/types.ts b/src/games/SalvageUnion/types.ts similarity index 76% rename from src/games/SU/types.ts rename to src/games/SalvageUnion/types.ts index c01df922..2346fafe 100644 --- a/src/games/SU/types.ts +++ b/src/games/SalvageUnion/types.ts @@ -1,12 +1,12 @@ -export enum SUCoreMechanic { +export enum CoreMechanic { nailedIt = 'Nailed It', - success = 'Success', + ccess = 'ccess', toughChoice = 'Tough Choice', failure = 'Failure', cascadeFailure = 'Cascade Failure' } -export enum SUTable { +export enum Table { npcAction = 'NPC Action', npcReaction = 'Reaction', npcMorale = 'Morale', @@ -20,11 +20,11 @@ export enum SUTable { mechSalvage = 'Mech Salvage' } -export type SUEntry = { +export type Entry = { label: string description: string } -export type SUTableType = { - [key in SUCoreMechanic]: SUEntry +export type TableType = { + [key in CoreMechanic]: Entry } diff --git a/src/games/index.ts b/src/games/index.ts new file mode 100644 index 00000000..b04ed0e7 --- /dev/null +++ b/src/games/index.ts @@ -0,0 +1,3 @@ +export { default as SalvageUnion } from './SalvageUnion' +export { default as DnD5E } from './DnD5E' +export { default as Blades } from './Blades' diff --git a/src/index.ts b/src/index.ts index fe61c7ad..6d62030a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export { roll } from './roll' +export * from './games' export * from './D' export * from './premadeDice' export * from './models'