-
Notifications
You must be signed in to change notification settings - Fork 0
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
18 changed files
with
237 additions
and
252 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
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
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 |
---|---|---|
|
@@ -17,7 +17,6 @@ interface State extends BaseUState { | |
} | ||
} | ||
|
||
|
||
///////////////////////////////////////////////// | ||
|
||
export { | ||
|
2 changes: 2 additions & 0 deletions
2
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/.npmrc
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,2 @@ | ||
registry=https://registry.npmjs.org/ | ||
package-lock=false |
1 change: 1 addition & 0 deletions
1
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/.tabset
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 @@ | ||
tabset --badge $1 --color "#39CCCC" |
1 change: 1 addition & 0 deletions
1
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/README.md
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 @@ | ||
see @tbrpg/logic--adventures |
59 changes: 59 additions & 0 deletions
59
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/package.json
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,59 @@ | ||
{ | ||
"name": "@tbrpg/logic--adventure--resolved", | ||
"description": "resolved adventure logic and utilities", | ||
"version": "0.0.1", | ||
"author": "Offirmo <offirmo.net@gmail.com>", | ||
"license": "Unlicense", | ||
"private": true, | ||
|
||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": "./dist/src.es2023.esm/index.js", | ||
"require": "./dist/src.es2023.cjs/index.js" | ||
} | ||
}, | ||
"module": "dist/src.es2023.esm/index.js", | ||
"main": "dist/src.es2023.cjs/index.js", | ||
"typings": "dist/src.es2023.esm/index.d.ts", | ||
"source": "src/index.ts", | ||
|
||
"peerDependencies": { | ||
"tslib": "^2" | ||
}, | ||
"dependencies": { | ||
"@offirmo-private/state-utils": "*", | ||
"@offirmo-private/ts-types": "*", | ||
"@offirmo/random": "^3", | ||
"@oh-my-rpg/state--prng": "^0", | ||
"@tbrpg/definitions": "^0", | ||
"@tbrpg/logic--armors": "^0", | ||
"@tbrpg/logic--monsters": "^0", | ||
"@tbrpg/logic--weapons": "^0", | ||
"@tbrpg/state--character": "^0", | ||
"@tbrpg/state--inventory": "^0", | ||
"@tbrpg/state--wallet": "^0", | ||
"tiny-invariant": "^1", | ||
"typescript-string-enums": "^1" | ||
}, | ||
|
||
"scripts": { | ||
"clean": "monorepo-script--clean-package …dist", | ||
|
||
"_build:dev:watch": "monorepo-script--build-typescript-package --watch", | ||
"_build:prod": "monorepo-script--build-typescript-package", | ||
|
||
"dev": "run-s clean _build:dev:watch", | ||
"test": "./node_modules/.bin/mocha --bail --config ./node_modules/@offirmo/unit-test-toolbox/mocharc.json ./node_modules/@offirmo/unit-test-toolbox/mocha-chai-init-node.mjs 'dist/src.es2023.esm/**/*spec.js'", | ||
"build": "run-s clean _build:prod", | ||
"cheatsheet": "node doc/cheatsheet.js" | ||
}, | ||
"devDependencies": { | ||
"@offirmo-private/monorepo-scripts": "*", | ||
"@offirmo-private/ts-types": "*", | ||
"@offirmo/unit-test-toolbox": "^9", | ||
"npm-run-all": "^4", | ||
"tslib": "^2" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/src/consts.ts
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,11 @@ | ||
//////////////////////////////////// | ||
|
||
const LIB = '@tbrpg/logic--adventure--resolved' | ||
|
||
//////////////////////////////////// | ||
|
||
export { | ||
LIB, | ||
} | ||
|
||
//////////////////////////////////// |
111 changes: 111 additions & 0 deletions
111
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/src/examples/index.ts
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,111 @@ | ||
import { type Immutable, enforceꓽimmutable } from '@offirmo-private/state-utils' | ||
|
||
import { DEMO_WEAPON_1 } from '@tbrpg/logic--weapons' | ||
import { DEMO_MONSTER_01 } from '@tbrpg/logic--monsters' | ||
|
||
import { ResolvedAdventure } from '../types.js' | ||
|
||
///////////////////////////////////////////////// | ||
|
||
// needed to test migrations, both here and in composing parents | ||
|
||
const DEMO_ADVENTURE_01: Immutable<ResolvedAdventure> = enforceꓽimmutable<ResolvedAdventure>({ | ||
hid: 'fight_lost_any', | ||
uuid: 'uu1~example~adventure~01', | ||
good: true, | ||
encounter: DEMO_MONSTER_01, | ||
gains: { | ||
level: 0, | ||
health: 0, | ||
mana: 0, | ||
strength: 0, | ||
agility: 0, | ||
charisma: 0, | ||
wisdom: 0, | ||
luck: 1, | ||
coin: 0, | ||
token: 0, | ||
armor: null, | ||
weapon: null, | ||
improvementⵧarmor: false, | ||
improvementⵧweapon: false, | ||
}, | ||
}) | ||
// with coin gain | ||
const DEMO_ADVENTURE_02: Immutable<ResolvedAdventure> = enforceꓽimmutable<ResolvedAdventure>({ | ||
hid: 'dying_man', | ||
uuid: 'uu1~example~adventure~02', | ||
good: true, | ||
encounter: null, | ||
gains: { | ||
level: 0, | ||
health: 0, | ||
mana: 0, | ||
strength: 0, | ||
agility: 0, | ||
charisma: 0, | ||
wisdom: 0, | ||
luck: 0, | ||
coin: 1234, | ||
token: 0, | ||
weapon: null, | ||
armor: null, | ||
improvementⵧweapon: false, | ||
improvementⵧarmor: false, | ||
}, | ||
}) | ||
// with loot gain | ||
const DEMO_ADVENTURE_03: Immutable<ResolvedAdventure> = enforceꓽimmutable<ResolvedAdventure>({ | ||
hid: 'rare_goods_seller', | ||
uuid: 'uu1~example~adventure~03', | ||
good: true, | ||
encounter: null, | ||
gains: { | ||
level: 0, | ||
health: 0, | ||
mana: 0, | ||
strength: 0, | ||
agility: 0, | ||
charisma: 0, | ||
wisdom: 0, | ||
luck: 0, | ||
coin: 0, | ||
token: 0, | ||
weapon: DEMO_WEAPON_1, | ||
armor: null, | ||
improvementⵧweapon: false, | ||
improvementⵧarmor: false, | ||
}, | ||
}) | ||
// with weapon enhancement gain | ||
const DEMO_ADVENTURE_04: Immutable<ResolvedAdventure> = enforceꓽimmutable<ResolvedAdventure>({ | ||
hid: 'princess', | ||
uuid: 'uu1~example~adventure~04', | ||
good: true, | ||
encounter: null, | ||
gains: { | ||
level: 0, | ||
health: 0, | ||
mana: 0, | ||
strength: 0, | ||
agility: 0, | ||
charisma: 0, | ||
wisdom: 0, | ||
luck: 0, | ||
coin: 123, | ||
token: 0, | ||
weapon: null, | ||
armor: null, | ||
improvementⵧweapon: false, | ||
improvementⵧarmor: true, | ||
}, | ||
}) | ||
|
||
///////////////////////////////////////////////// | ||
|
||
export { | ||
DEMO_ADVENTURE_01, | ||
DEMO_ADVENTURE_02, | ||
DEMO_ADVENTURE_03, | ||
DEMO_ADVENTURE_04, | ||
} |
3 changes: 3 additions & 0 deletions
3
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/src/index.ts
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,3 @@ | ||
export * from './types.js' | ||
export * from './reducers/index.js' | ||
export * from './examples/index.js' |
7 changes: 7 additions & 0 deletions
7
stack--current/A-apps--core/the-boring-rpg/logic--adventure--resolved/tsconfig.json
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,7 @@ | ||
{ | ||
"extends": "../../../0-meta/tsconfig.json", | ||
"include": [ | ||
"../../../0-meta/typescript-custom-typings/*.d.ts", | ||
"src/**/*.ts" | ||
] | ||
} |
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
Oops, something went wrong.