add-held-item

Implement held item effects and event listeners for Pokémon battles.

13|5|Updated Apr 6, 2023
One-click install
npx skills add https://github.com/ewei068/pokestar --skill add-held-item
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-held-item
Source: https://github.com/ewei068/pokestar/tree/main/.cursor/skills/add-held-item
Command: npx skills add https://github.com/ewei068/pokestar --skill add-held-item

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured way to add passive effects and unique behaviors to Pokémon through held items, enriching the battle system.

Core Features & Use Cases

  • Item Implementation: Define how items affect Pokémon during battles (stat boosts, damage reflection, status cures, etc.).
  • Event Handling: Register listeners for various battle events to trigger item effects.
  • Use Case: Implement a "Leftovers" item that passively heals a Pokémon at the end of each turn, or a "Focus Sash" that allows a Pokémon to survive a single fatal blow.

Quick Start

Add a new held item by defining its effects in the src/battle/data/heldItems.js file.

Frequently Asked Questions about add-held-item

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add held items to a Pokemon battle system?

Held items enhance Pokemon battles by defining passive effects like stat boosts, damage reflection, and status cures through event listeners. You implement these behaviors by defining item effects in the src/battle/data/heldItems.js file to trigger dynamic battle modifications.

What types of item effects can I implement for Pokemon battles?

Pokemon battle item effects include stat boosters, damage reflectors, status healers, and survival items. You can define specific behaviors like passive end-of-turn healing or surviving a single fatal blow by registering event listeners.

How does event handling work for Pokemon held items?

Event handling for Pokemon held items requires registering listeners for specific battle events to trigger item effects dynamically. You must adhere to a specific item structure and event listener registration pattern to properly modify battle interactions.

Do I need specific dependencies to implement held items in my game?

No external dependencies are required to implement held items in your game. You only need to follow the specific item structure and event listener registration patterns within your existing battle system to define passive effects and unique item behaviors.

What is the best way to structure a Focus Sash item that prevents a Pokemon from fainting?

The best way to structure a Focus Sash item is to define it as a survival item in the heldItems.js file, using event listeners to intercept fatal damage and ensure the Pokemon survives a single fatal blow. Adhering to the specific item structure ensures proper battle interactions.