Skip to content

Conversation

@Kamusvalenzuela
Copy link
Owner

Bugs fixed:

  • Updated predicates (PredicateStunnedOrSleeping, PredicateUnableToCastSpells) to explicity return TRUE only for effects that actually block behavior
  • All other effects safely return FALSE
    This removes unintended runtime crashes while preserving vanilla behavior

Healing modifier logic bug FIX

  • Refactored Entity.ApplyHealingModifiers
  • Healing boost and healing reduction now coexists
  • Effects are grouped by category:
    • Multiple boosts = strongest boost only
    • Multiple reductions = strongest reduct only
  • Final healing is calculated multiplicatively
    Formula:
FinalHeal = BaseHeal * (1 + MaxBoost) * (1 - MaxReduction)

This matches standar RPG behavior and prevents edge cases (e.g 100% reduction always blocks healing)

Knockback double-application & desync
Im still with troubles for fix this, and im searching new ways for solve this
Proyectile spells with knockback were aplying displacement:

  • During projectile movement.
  • Again on impact
    This caused:
  • Server-side displacement stacking
  • Client-side animation only showing the first knockback
  • Resulting positional desync.
    FIX:
  • I've tryed to apply knockback only once per hit, but seems to be not working fine
  • Server and client positions remain in desync

Migration cleanup:

  • Removed fragmented migration files helped by GeminiAI 3.0
  • Consolidated them into a single migration:
    • 20251212000000_AddCombatEffects
  • Applies to both SQLite and MySQL
    Added fields:
  • Combat_KnockbackTiles (int)
  • Combat_PercentageEffect (int?)

Verification

  • Tested scenarios:
    • NPC Casting spells with new effects no longer crashed the server
    • Healing boost and healing reduction apply correctly and deterministically
    • Knockback tryes to behave consistently and visually matched with server position

NOTES:

  • No database queries were added to combat calculations
  • All logic operates on cached in-memory status data
  • Vanilla behavior remains unchanged for existing SpellEffects

Kamus added 2 commits December 15, 2025 13:21
and edited the migration files (Migration helped by Gemini AI 3.0)
@Kamusvalenzuela Kamusvalenzuela merged commit 0ed7b06 into main Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant