add-effect

Manage battle effects with event listeners in JavaScript.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured way to add, manage, and remove temporary status modifiers (buffs, debuffs, shields) within a battle system, ensuring consistent and predictable game mechanics.

Core Features & Use Cases

  • Effect Implementation: Define custom effects with specific logic for application, removal, and event handling.
  • Event Listener Management: Safely register and unregister listeners for battle events to modify game flow.
  • Use Case: Implement a "Poison" effect that deals damage over time, or a "Defense Boost" that reduces incoming damage for a set number of turns.

Quick Start

Add a 'poison' effect to the target Pokemon with 10 damage per turn.

Frequently Asked Questions about add-effect

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

FAQPage Schema
How do I add status modifiers like buffs and debuffs to a turn-based battle system?

To add status modifiers to a turn-based battle system, you define custom effects with specific logic for application, removal, and event handling. This approach ensures consistent game mechanics for buffs, debuffs, and shields.

Can I implement damage over time effects like poison in a turn-based combat game?

Yes, you can implement damage over time effects like poison in turn-based combat. You define the custom effect logic to deal specific damage amounts per turn and manage its persistent state through event listeners.

How does event listener management work when removing temporary battle effects?

Event listener management for removing battle effects involves safely unregistering listeners attached to battle events. This prevents outdated effect logic from interfering with the ongoing game flow when a status modifier expires.

Do I need JavaScript to manage stat modification logic for game buffs and debuffs?

Yes, you need JavaScript to manage stat modification logic for game buffs and debuffs. Careful implementation in JavaScript is required to adhere to defined patterns for effect application and event interception.

What's the best way to structure dynamic application and removal of shields in game development?

The best way to structure dynamic application and removal of shields is through a management system that supports persistent state tracking. This allows consistent application and removal of neutral status modifiers during combat.

Why use event listeners for intercepting battle events in a turn-based combat system?

Event listeners are used for intercepting battle events to dynamically modify game flow during combat. They allow custom effects like Defense Boost to safely reduce incoming damage by intercepting relevant events for a set duration.