feat: add skill tree system with 2 branches per class

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 14:36:19 +09:00
parent 05cf59c659
commit 8ef3d9dd13
3 changed files with 347 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ type Player struct {
Dead bool
Fled bool
SkillUses int // remaining skill uses this combat
Skills *PlayerSkills
}
func NewPlayer(name string, class Class) *Player {
@@ -118,6 +119,7 @@ func (p *Player) EffectiveATK() int {
atk += r.Value
}
}
atk += p.Skills.GetATKBonus(p.Class)
return atk
}
@@ -133,6 +135,7 @@ func (p *Player) EffectiveDEF() int {
def += r.Value
}
}
def += p.Skills.GetDEFBonus(p.Class)
return def
}