diff options
| author | historia <[not public]> | 2026-06-17 02:27:20 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-17 02:27:20 -0400 |
| commit | 731adf2e0fbcac9a32179da077299ed6465af41e (patch) | |
| tree | 29d368917f258350d426f2680bec59feeb464eaf /internal/player/player.go | |
| parent | 389e307f205f9b7edf604fb9f86e1038ead736ef (diff) | |
| download | thehouseoficarus-731adf2e0fbcac9a32179da077299ed6465af41e.tar.gz | |
feat: movement overhauled. agility-enhancing items added.
Diffstat (limited to 'internal/player/player.go')
| -rw-r--r-- | internal/player/player.go | 24 |
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) } |
