Fix player damage system: migrate to 3-layer defense and fix projectile owner ID#26
Open
Copilot wants to merge 83 commits intocopilot/refonte-systme-armement-bonusfrom
Open
Conversation
…on and crit Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…onstants Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor DefenseSystem as the sole authority for damage application
Centralize damage authority in DefenseSystem with DamagePacket abstraction
Feb 14, 2026
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot
AI
changed the title
Centralize damage authority in DefenseSystem with DamagePacket abstraction
Refactor CombatSystem to delegate all damage to DefenseSystem
Feb 14, 2026
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot
AI
changed the title
Refactor CombatSystem to delegate all damage to DefenseSystem
Add unified ShipStats data model
Feb 14, 2026
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Copilot
AI
changed the title
Add unified ShipStats data model
Add FinalStatsCalculator for deterministic stat aggregation
Feb 14, 2026
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…ion and fix debug label Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…E_MIN constant Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…m-pipeline Add public resistance modifier API to DefenseSystem
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…ystem Add dirty flag system and defense sandbox for stat recalculation infrastructure
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…shes Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
… combat sandbox Co-authored-by: Linkatplug <36280686+Linkatplug@users.noreply.github.com>
…ance-proof Add combat development sandboxes and fix rendering defensive code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Player was not taking damage from enemy projectiles due to owner ID mismatch. Enemy projectiles created with
owner: "enemy"(string) caused CollisionSystem entity lookup to fail, filtering out all enemy projectiles.Critical Fixes
Enemy projectile owner ID (
js/systems/CombatSystem.js)owner: "enemy"→owner: enemy.id(numeric entity ID)Player defense system migration (
js/Game.js,js/systems/CollisionSystem.js)healthcomponent withdefensecomponent (shield/armor/structure layers)defense.invulnerableinstead ofhealth.invulnerableXP bar field mismatch (
js/Game.js,js/systems/UISystem.js)xpToNext: 100→xpRequired: 100to match all system expectations(xp / undefined) * 100→(xp / xpRequired) * 100UI Cleanup
index.html,js/systems/UISystem.js,js/ui/EnhancedUIComponents.jsArchitecture
DefenseSystem integration:
DamagePacket enforcement:
Debug Support
Added comprehensive debug logging gated by
window.DEBUG_DEFENSE:Documentation
Moved all markdown reports to
/rapportsfolder with detailed diagnostics.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.