Add damage system - HP threshold model (Implementation A) - #24
Open
wannerdev wants to merge 2 commits into
Open
Conversation
- Created damage_system module with Health and DemoteCooldown components - Implemented sun radiation damage system (5 HP/sec in heat radius) - Added collision damage based on relative speed and mass - Level demotion thresholds: 100-67% L3, 66-34% L2, 33-1% L1, 0% destroyed - I-frame system prevents multi-demote (0.5s cooldown) - Visual damage effects (red glow based on HP percentage) - Level-based max HP: L1=50, L2=85, L3=120 - Satellites spawn with full HP for their level - Automatic sprite updates on level change - DamageEvent system for extensible damage sources
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.
Description
Implements a comprehensive damage system with HP-based level demotion, sun radiation damage, and visual damage indicators.
Implementation Approach
This is Implementation A - HP + Threshold Model with i-frames and automatic level demotion.
Core Features
Health System
Level Demotion Thresholds
Sun Radiation Damage
I-Frame System
Visual Feedback
Changes
damage_systemmoduleHealthcomponent with level-based max HPDamageEventfor extensible damage systemDemoteCooldownfor i-frame trackingSunExposurefor radiation damage trackingapply_sun_radiation_damagesystemhandle_damage_eventssystem with demotion logicdraw_damage_effectsfor visual feedbackTechnical Implementation
Damage Event System
Sun Radiation
Level Demotion Logic
Visual Damage Indicator
Gameplay Impact
Strategic Depth
Risk vs Reward
Balancing
Benefits
Testing
Future Enhancements
Related Feature
Implements: Damage System (HP + Threshold Model)