feat: multiplayer flee marks player as out for current combat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 10:47:38 +09:00
parent 6f35bc1172
commit cd2013a917
2 changed files with 36 additions and 8 deletions

View File

@@ -34,6 +34,7 @@ type Player struct {
Inventory []Item
Relics []Relic
Dead bool
Fled bool
}
func NewPlayer(name string, class Class) *Player {
@@ -67,6 +68,10 @@ func (p *Player) IsDead() bool {
return p.Dead
}
func (p *Player) IsOut() bool {
return p.Dead || p.Fled
}
func (p *Player) Revive(hpPercent float64) {
p.Dead = false
p.HP = int(float64(p.MaxHP) * hpPercent)