game/prompt/69_global_shake_settings.md

1.1 KiB

Task: Global Shake Settings

Goal: Make shakeCount and shakeOffset in ShakeWidget configurable via global settings, similar to attackAnimationScale.

Context

Currently, ShakeWidget uses hardcoded defaults or constructor parameters for shakeOffset and shakeCount. The user wants to adjust these values globally from the Settings screen to fine-tune the visual feedback.

Requirements

  1. Settings Provider Updates:

    • Add shakeOffset (double, default 30.0).
    • Add shakeCount (int, default 3).
    • Implement persistence using SharedPreferences.
  2. Settings UI:

    • Add sliders to the Settings screen to control these values.
    • Shake Offset: Range approx 0-100?
    • Shake Count: Range approx 1-10?
  3. ShakeWidget Updates:

    • Consume SettingsProvider to get the global values.
    • Apply these values to the shake animation logic.

Plan

  1. Modify lib/providers/settings_provider.dart to add the new settings.
  2. Modify lib/screens/settings_screen.dart to add the sliders.
  3. Modify lib/widgets/battle/shake_widget.dart to use the provider.