Rebalance rings and trinkets, fix swing timers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c35c2289e2
commit
1bac06cb28
4 changed files with 34 additions and 11 deletions
|
|
@ -804,7 +804,10 @@ def _swing(state: dict, unit: dict, t: float, rng: random.Random) -> None:
|
|||
target = state["units"].get(unit["target"] or "")
|
||||
if not target or not _alive(target):
|
||||
return
|
||||
unit["next"] = t + unit["interval"]
|
||||
# A player's swing keeps what the slice rounded off, or every swing time would round up to
|
||||
# a quarter second and most haste would do nothing. After a cast or stun the clock restarts.
|
||||
on_time = unit["side"] == "party" and t - unit["next"] < STEP
|
||||
unit["next"] = (unit["next"] if on_time else t) + unit["interval"]
|
||||
if unit["side"] == "party":
|
||||
top = max(2, round(unit["base"] * _affinity(target, unit["damage"])))
|
||||
if rng.random() >= hit_chance(unit["accuracy"], target["evasion"]):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue