|
|
@@ -109,7 +109,7 @@ from pbot.codec.bitbuf import encode6 as _encode6 # noqa: E402
|
|
|
from pbot.codec.frame import Frame as _Frame # noqa: E402
|
|
|
from pbot.world.actor import ActorKey as _ActorKey # noqa: E402
|
|
|
from pbot.world.actor import Monster as _Monster # noqa: E402
|
|
|
-from pbot.world.update import WorldUpdater as _WU # noqa: E402
|
|
|
+from pbot.world.mirror import WorldMirror as _WorldMirror # noqa: E402
|
|
|
|
|
|
|
|
|
def _sc31(victim: str, attacker: str) -> _Frame:
|
|
|
@@ -121,7 +121,7 @@ def _sc31(victim: str, attacker: str) -> _Frame:
|
|
|
|
|
|
def test_sc31_other_attacker_marks_contended() -> None:
|
|
|
w = _new_world_with_monster()
|
|
|
- _WU().apply(w, _sc31("44444", "9999000179080001"))
|
|
|
+ WorldUpdater().apply(w, _sc31("44444", "9999000179080001"))
|
|
|
assert w.monsters[44444].contested_t > 0.0
|
|
|
|
|
|
|
|
|
@@ -129,11 +129,11 @@ def test_sc31_my_hit_clears_contended() -> None:
|
|
|
w = _new_world_with_monster()
|
|
|
w.monsters[44444] = _Monster(key=_ActorKey(44444), x=5, y=5, race=0,
|
|
|
name="鸡", is_dead=False, contested_t=123.0)
|
|
|
- _WU().apply(w, _sc31("44444", w.me.uid))
|
|
|
+ WorldUpdater().apply(w, _sc31("44444", w.me.uid))
|
|
|
assert w.monsters[44444].contested_t == 0.0
|
|
|
|
|
|
|
|
|
-def _new_world_with_monster():
|
|
|
+def _new_world_with_monster() -> "_WorldMirror":
|
|
|
from pbot.world.mirror import WorldMirror
|
|
|
w = WorldMirror()
|
|
|
w.me.uid = "14590001790847124000069434"
|