create_state_skill
Design skills that inflict status effects like poison or sleep in RPG Maker MZ/MV games. Specify success chance, MP cost, and target scope to create balanced combat abilities.
Instructions
Create a state-inflicting skill (poison, sleep, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Skill name | |
| stateId | Yes | State ID (4=poison, 5=blind, 6=silence, 8=confusion, etc.) | |
| chance | Yes | Success chance (0.0-1.0) | |
| mpCost | Yes | MP cost | |
| scope | Yes | Target scope (1=enemy single, 2=enemy all) | |
| description | No | Skill description |
Implementation Reference
- src/tools/skillTools.ts:287-320 (handler)Implementation of the createStateSkill tool, which creates a new skill that adds a state effect.
export async function createStateSkill( projectPath: string, name: string, stateId: number, chance: number, mpCost: number, scope: number, description?: string ): Promise<Skill> { return await createSkill(projectPath, { name, description: description || `${name}で状態異常を付与する`, mpCost, scope, effects: [ { code: 21, // Add state dataId: stateId, value1: chance, value2: 0 } ], damage: { type: 0, elementId: 0, formula: '0', variance: 20, critical: false }, animationId: 1, message1: `%1は${name}を使った!`, stypeId: 1 }); }