aboutsummaryrefslogtreecommitdiff
path: root/internal/player
diff options
context:
space:
mode:
Diffstat (limited to 'internal/player')
-rw-r--r--internal/player/player.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/internal/player/player.go b/internal/player/player.go
index 1cd8677..48c9359 100644
--- a/internal/player/player.go
+++ b/internal/player/player.go
@@ -123,6 +123,10 @@ var OptionDefs = []OptionDef{
{"queue_silently", OptBool, true, nil, "Suppress messages for queued tick actions"},
{"room_desc_width", OptInt, 70, nil, "Maximum width for room descriptions"},
{"unicode", OptBool, true, nil, "Unicode box-drawing characters"},
+ {"run_countdown", OptBool, false, nil, "Show countdown messages when fleeing combat"},
+ {"visual_ticks", OptBool, false, nil, "Display a tick marker every game tick"},
+ {"visual_tick_count", OptInt, 0, nil, "Cycle length for tick counter (0 = no counter)"},
+ {"visual_tick_text", OptString, "Tick", nil, "Text displayed for visual ticks"},
}
var optionByName map[string]*OptionDef
@@ -153,10 +157,20 @@ type Player struct {
Options map[string]any `yaml:"-"`
Flags map[string]any `yaml:"flags"`
RegenerateTick int
- Action *action.Action `yaml:"-"`
- ActionState any `yaml:"-"`
- WalkSequence []string `yaml:"-"`
+ Action *action.Action `yaml:"-"`
+ ActionState any `yaml:"-"`
+ WalkSequence []string `yaml:"-"`
ConsumeCooldown int `yaml:"-"`
+ MoveTicks int `yaml:"-"`
+ MoveDirection string `yaml:"-"`
+ MoveTarget int `yaml:"-"`
+ VisualTickCurrent int `yaml:"-"`
+}
+
+func (p *Player) ClearMoveState() {
+ p.MoveTicks = 0
+ p.MoveDirection = ""
+ p.MoveTarget = 0
}
func (p *Player) OptionBool(name string) bool {
@@ -291,7 +305,7 @@ func (p *Player) AddSkillXP(s SkillName, amount int) int {
}
func (p *Player) CombatLevel() int {
- base := 0.25 * float64(p.Level(Defense)+p.Level(Hitpoints)+p.Level(Science))
+ base := 0.25 * float64(p.Level(Defense)+p.Level(Hitpoints)+p.Level(Technology))
att := float64(p.Level(Attack))
str := float64(p.Level(Strength))
@@ -301,7 +315,7 @@ func (p *Player) CombatLevel() int {
base += 0.25 * (att + str)
}
- base += 0.125 * float64(p.Level(Technology))
+ base += 0.125 * float64(p.Level(Science))
return int(base)
}