special attack

Guide for special attack

Special Attack System

Overview

Players have a Special Attack bar that regenerates over time and can be consumed to perform powerful attacks with specific weapons (e.g., Dragon Dagger).

Mechanics

  • Energy: 0% to 100%.
  • Regeneration:
    • Rate: 10% every 30 seconds (50 ticks).
    • Logic: GameState::run_tick_logic increments special_attack_energy by 10 if < 100 every 50 ticks.
  • Consumption:
    • Usage requires checking special_attack_energy >= cost.
    • If successful, deduct cost and perform special effect (accuracy boost, double hit, etc).

Implementation Details

  • State: special_attack_energy in Player struct.
  • Logic: GameState::run_tick_logic for regen.
  • Pending: SpecialAttackManager or similar to handle specific weapon effects.