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/combat/state.go | |
| parent | 389e307f205f9b7edf604fb9f86e1038ead736ef (diff) | |
| download | thehouseoficarus-731adf2e0fbcac9a32179da077299ed6465af41e.tar.gz | |
feat: movement overhauled. agility-enhancing items added.
Diffstat (limited to 'internal/combat/state.go')
| -rw-r--r-- | internal/combat/state.go | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/internal/combat/state.go b/internal/combat/state.go index 43b693b..9c8d346 100644 --- a/internal/combat/state.go +++ b/internal/combat/state.go @@ -3,10 +3,9 @@ package combat import "sync" type State struct { - PlayerName string - MobID string - Active bool - LockedTicks int + PlayerName string + MobID string + Active bool } var ( @@ -19,10 +18,9 @@ func EnterCombat(playerName, mobID string) { mu.Lock() defer mu.Unlock() combatants[playerName] = &State{ - PlayerName: playerName, - MobID: mobID, - Active: true, - LockedTicks: 15, + PlayerName: playerName, + MobID: mobID, + Active: true, } mobTargets[mobID] = playerName } @@ -56,15 +54,3 @@ func GetMobTarget(mobID string) string { defer mu.Unlock() return mobTargets[mobID] } - -func TickCombat() { - mu.Lock() - defer mu.Unlock() - for _, state := range combatants { - if state.LockedTicks > 0 { - state.LockedTicks-- - } - } -} - - |
