UNPKG

@aige/core

Version:
103 lines (102 loc) 4.41 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.execute = exports.schema = void 0; const schemas_1 = require("../schemas"); const InventoryItemSchema_1 = __importDefault(require("../schemas/InventoryItemSchema")); exports.schema = { type: 'function', function: { name: 'commit_action', description: 'Commits a user action; returning the new scene and other data', parameters: { type: 'object', required: ['scene', 'scene_emoji', 'actions', 'rumor'], properties: { scene: { type: 'string', description: 'The new scene description after the action is committed. This is the main text that the player sees and must be different from the last scene' }, scene_emoji: { type: 'string', description: 'An emoji that represents the new scene' }, actions: schemas_1.ActionsSchema, rumor: { type: 'string', description: 'A rumor that the player has heard' }, health_delta: { type: 'number', description: 'The change in health of the player (if armor is > 0, armor is damaged instead)' }, health_description: { type: 'string', description: 'The description of the new health of the player (first-person perspective)' }, armor_delta: { type: 'number', description: 'The change in armor of the player (if armor is 0, health is damaged instead)' }, money_delta: { type: 'number', description: 'The change in money of the player' }, experience_delta: { type: 'number', description: 'The change in experience of the player' }, reputation_delta: { type: 'number', description: 'The change in reputation of the player' }, reputation_description: { type: 'string', description: 'The description of the new reputation value of the player, values > 0 = good, values < 0 = bad' }, inventory_removed: { type: 'string', description: 'The item removed from the inventory (if any)' }, inventory_added: InventoryItemSchema_1.default, quest_removed: { type: 'string', description: 'The name of the quest removed (if any), if complete give rewards' }, quest_added: schemas_1.QuestSchema, character_removed: { type: 'string', description: 'The character removed (if any)' }, character_added: schemas_1.CharacterSchema, location: { type: 'string', description: 'The new location of the player (if changed)' }, location_description: { type: 'string', description: 'The description of the new location of the player (if changed)' }, appearance: { type: 'string', description: 'The new appearance of the player (if changed)' }, weather: schemas_1.WeatherSchema, weather_emoji: { type: 'string', description: 'An emoji that represents the new weather of the location (if changed)' }, weather_description: { type: 'string', description: 'The description of the new weather of the location (if changed)' } } } } }; const execute = (parameters) => { return parameters; }; exports.execute = execute;