diff options
Diffstat (limited to 'internal/combat')
| -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-- - } - } -} - - |
