feat: skill cooldown (3/combat), inventory limit (10), scaled event damage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 13:46:17 +09:00
parent 9ed71eeccd
commit 15199bd26f
5 changed files with 28 additions and 2 deletions

View File

@@ -282,6 +282,9 @@ func (s *GameSession) BuyItem(playerID string, itemIdx int) bool {
item := s.state.ShopItems[itemIdx]
for _, p := range s.state.Players {
if p.Fingerprint == playerID && p.Gold >= item.Price {
if len(p.Inventory) >= 10 {
return false
}
p.Gold -= item.Price
p.Inventory = append(p.Inventory, item)
return true