diff --git a/packages/actions/data/$schema.json b/packages/actions/data/$schema.json index a052625..8b5e51a 100644 --- a/packages/actions/data/$schema.json +++ b/packages/actions/data/$schema.json @@ -9,7 +9,7 @@ "type": "number" }, "id": { - "enum": ["bit", "coin", "gem", "mote", "north-star", "usd"], + "enum": ["bit", "coin", "gem", "mote", "north-star", "pest", "usd"], "type": "string" }, "type": { diff --git a/packages/actions/data/pests.json b/packages/actions/data/pests.json new file mode 100644 index 0000000..0747c51 --- /dev/null +++ b/packages/actions/data/pests.json @@ -0,0 +1,178 @@ +{ + "$schema": "./$schema.json", + "actions": [ + { + "inputs": [{ "amount": 25, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "PESTHUNTER_BADGE", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [ + { "amount": 1, "id": "PESTHUNTER_BADGE", "type": "item" }, + { "amount": 50, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "PESTHUNTER_RING", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [ + { "amount": 1, "id": "PESTHUNTER_RING", "type": "item" }, + { "amount": 100, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "PESTHUNTER_ARTIFACT", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 5, "id": "RED_MUSHROOM", "type": "item" }], + "outputs": [{ "amount": 1, "id": "MUSHROOM_HELMET", "type": "item" }], + "place": [ + { + "grid": [ + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + null, + null + ], + "type": "workbench" + } + ] + }, + { + "inputs": [ + { "amount": 1, "id": "MUSHROOM_HELMET", "type": "item" }, + { "amount": 50, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "BIOHAZARD_HELMET", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 8, "id": "RED_MUSHROOM", "type": "item" }], + "outputs": [{ "amount": 1, "id": "MUSHROOM_CHESTPLATE", "type": "item" }], + "place": [ + { + "grid": [ + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" } + ], + "type": "workbench" + } + ] + }, + { + "inputs": [ + { "amount": 1, "id": "MUSHROOM_CHESTPLATE", "type": "item" }, + { "amount": 80, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "BIOHAZARD_SUIT", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 7, "id": "RED_MUSHROOM", "type": "item" }], + "outputs": [{ "amount": 1, "id": "MUSHROOM_LEGGINGS", "type": "item" }], + "place": [ + { + "grid": [ + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" } + ], + "type": "workbench" + } + ] + }, + { + "inputs": [ + { "amount": 1, "id": "MUSHROOM_LEGGINGS", "type": "item" }, + { "amount": 70, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "BIOHAZARD_LEGGINGS", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 4, "id": "RED_MUSHROOM", "type": "item" }], + "outputs": [{ "amount": 1, "id": "MUSHROOM_BOOTS", "type": "item" }], + "place": [ + { + "grid": [ + null, + null, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" }, + null, + { "amount": 1, "id": "RED_MUSHROOM", "type": "item" } + ], + "type": "workbench" + } + ] + }, + { + "inputs": [ + { "amount": 1, "id": "MUSHROOM_BOOTS", "type": "item" }, + { "amount": 40, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "BIOHAZARD_BOOTS", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 40, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "PESTHUNTERS_GLOVES", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 40, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "PESTHUNTERS_GLOVES", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 50, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "PEST_TRAP", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [ + { "amount": 1, "id": "PEST_TRAP", "type": "item" }, + { "amount": 75, "id": "pest", "type": "currency" } + ], + "outputs": [{ "amount": 1, "id": "MOUSE_PEST_TRAP", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 500, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "PESTHUNTING_GUIDE", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 1500, "id": "pest", "type": "currency" }], + "outputs": [ + { "amount": 1, "id": "PESTHUNTERS_LAIR_BARN_SKIN", "type": "item" } + ], + "place": [{ "id": "PHILLIP", "type": "npc" }] + }, + { + "inputs": [{ "amount": 500, "id": "pest", "type": "currency" }], + "outputs": [{ "amount": 1, "id": "SF:PET_HEDGEHOG", "type": "item" }], + "place": [{ "id": "PHILLIP", "type": "npc" }] + } + ] +} diff --git a/packages/actions/package.json b/packages/actions/package.json index d62215c..89f171a 100644 --- a/packages/actions/package.json +++ b/packages/actions/package.json @@ -42,5 +42,5 @@ "sideEffects": false, "type": "commonjs", "types": "dist/index.d.ts", - "version": "0.1.4" + "version": "0.2.0" } diff --git a/packages/actions/source/data.ts b/packages/actions/source/data.ts index 7c75b5b..57b4feb 100644 --- a/packages/actions/source/data.ts +++ b/packages/actions/source/data.ts @@ -4,6 +4,7 @@ import { actions as _crimsonIsle } from '../data/crimson-isle.json' import { actions as _gems } from '../data/gems.json' import { actions as _northStars } from '../data/north-stars.json' import { actions as _northStarsCrafts } from '../data/north-stars-crafts.json' +import { actions as _pests } from '../data/pests.json' import { actions as _wood } from '../data/wood.json' import { Action } from './types' @@ -16,6 +17,8 @@ export const gems = _gems as Action[] export const northStars = _northStars as Action[] export const northStarsCrafts = _northStarsCrafts as Action[] +export const pests = _pests as Action[] + export const wood = _wood as Action[] export const allActions = [ @@ -25,5 +28,6 @@ export const allActions = [ ...gems, ...northStars, ...northStarsCrafts, + ...pests, ...wood, ] diff --git a/packages/actions/source/schema.ts b/packages/actions/source/schema.ts index 8c78eec..95d1e3f 100644 --- a/packages/actions/source/schema.ts +++ b/packages/actions/source/schema.ts @@ -11,7 +11,7 @@ export const actionIoItemSchema = z export const actionIoCurrencySchema = z .object({ amount: z.number().finite(), - id: z.enum(['bit', 'coin', 'gem', 'north-star', 'second', 'usd']), + id: z.enum(['bit', 'coin', 'gem', 'north-star', 'pest', 'second', 'usd']), type: z.literal('currency'), }) .strict()