Fix character sheet holiday actions, remove dead holiday prompt, cap babysit counter

- Character sheet now checks isHolidayToday() for correct remaining
  action counts on holidays
- Remove renderAdvHolidaySecondPrompt (dead code after economy split)
  and its test
- Babysit harvest counter clamped to max to prevent exceeding budget

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-04-08 15:31:25 -07:00
parent 7e4fbe5ec8
commit a44a9d9234
3 changed files with 17 additions and 79 deletions

View File

@@ -256,31 +256,6 @@ func TestFixedHolidays_NoDuplicateMonthDay(t *testing.T) {
}
}
func TestHolidaySecondPromptRender(t *testing.T) {
char := &AdventureCharacter{
DisplayName: "TestPlayer",
CombatLevel: 5,
MiningSkill: 3,
ForagingSkill: 2,
}
equip := map[EquipmentSlot]*AdvEquipment{
SlotWeapon: {Tier: 1, Condition: 100, Name: "Iron Sword"},
}
bonuses := &AdvBonusSummary{}
text := renderAdvHolidaySecondPrompt(char, equip, bonuses)
if !strings.Contains(text, "Action 1 complete") {
t.Error("second prompt should mention action 1 complete")
}
if !strings.Contains(text, "second action") {
t.Error("second prompt should mention second action")
}
if !strings.Contains(text, "Dungeon") {
t.Error("second prompt should list Dungeon option")
}
}
func TestDailySummary_HolidayBlock(t *testing.T) {
players := []AdvPlayerDaySummary{
{DisplayName: "Alice", Activity: "dungeon", Location: "Cellar", Outcome: "success", LootValue: 500, HolidayActions: 2},