mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
WIP: in-flight combat/expedition/flavor changes
Bundle of uncommitted working-tree edits across combat engine, expedition cycle, flavor pools, and TwinBee/zone narration. Includes new files: combat_debug.go, dnd_boss_consumables.go, dnd_dex_floor.go, plus CHANGES_24H.md and REBALANCE_NOTES.md scratch notes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -272,6 +272,22 @@ func (p *AdventurePlugin) postDailySummary() {
|
||||
ps.DeathLocation = c.DeathLocation
|
||||
if c.DeadUntil != nil {
|
||||
ps.DeadUntil = c.DeadUntil.Format("15:04") + " UTC"
|
||||
remaining := time.Until(*c.DeadUntil)
|
||||
if remaining > 0 {
|
||||
hrs := int(remaining.Hours())
|
||||
mins := int(remaining.Minutes()) - hrs*60
|
||||
// {hours}: round half-up integer hours.
|
||||
ps.DeadUntilHours = int(remaining.Hours() + 0.5)
|
||||
// {duration}: precise — "5h 27m", "47m", "2h".
|
||||
switch {
|
||||
case hrs > 0 && mins > 0:
|
||||
ps.DeadUntilDuration = fmt.Sprintf("%dh %dm", hrs, mins)
|
||||
case hrs > 0:
|
||||
ps.DeadUntilDuration = fmt.Sprintf("%dh", hrs)
|
||||
default:
|
||||
ps.DeadUntilDuration = fmt.Sprintf("%dm", mins)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(acts) > 0 {
|
||||
last := acts[len(acts)-1]
|
||||
|
||||
Reference in New Issue
Block a user