feat: replace all hardcoded constants with config values
Replace hardcoded game constants with values from the config system: - GameSession now receives *config.Config from Lobby - TurnTimeout, MaxFloors, SkillUses, InventoryLimit use config values - combat.AttemptFlee accepts fleeChance param - combat.ResolveAttacks accepts coopBonus param - entity.NewMonster accepts scaling param - Solo HP/DEF reduction uses config SoloHPReduction - Lobby JoinRoom uses config MaxPlayers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,11 +54,11 @@ type Monster struct {
|
||||
Pattern BossPattern
|
||||
}
|
||||
|
||||
func NewMonster(mt MonsterType, floor int) *Monster {
|
||||
func NewMonster(mt MonsterType, floor int, scaling float64) *Monster {
|
||||
base := monsterDefs[mt]
|
||||
scale := 1.0
|
||||
if !base.IsBoss && floor > base.MinFloor {
|
||||
scale = math.Pow(1.15, float64(floor-base.MinFloor))
|
||||
scale = math.Pow(scaling, float64(floor-base.MinFloor))
|
||||
}
|
||||
hp := int(math.Round(float64(base.HP) * scale))
|
||||
atk := int(math.Round(float64(base.ATK) * scale))
|
||||
|
||||
Reference in New Issue
Block a user