feat(bot): a pker goes home on a teleport somebody could watch #228
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bot-stair-climbing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Crossing the world was Act.relocate/2 -- Player.teleport/2 with no animation,
no graphic, no delay and no cost. On a client that is a body that stops
existing here and starts existing there, which is the half of #150 an observer
notices. The operator's framing is that realism is what an observer can see
rather than what the input path did, and a silent reposition fails that on
every count while a bot pressing buttons would not improve it at all.
So :going_home sits between :arming and :travel_to_grounds and spends a real
teleport. Contract.Departure.choose/3 reads what the body wears and carries
and answers one click -- a worn glory's own Edgeville option, or a tablet's
Break -- and World.Content.ItemTeleport does the rest: animation, graphic,
ticks, and the charge coming off the item. There is a dwell at the booth
before the rekit and another before the departure, because a body that banks
and vanishes on consecutive ticks reads as machinery whatever the animation
does.
The rule that does the most work is a refusal. An Amulet of glory in the
backpack answers Rub with a five-row chatbox and a bot cannot answer a
chatbox, so a packed family is offered only when it states exactly one
destination -- which is the bare Climb on Lumbridge's middle staircase again,
in another subsystem. Worn, the same glory is offered, because the equipment
tab states each destination as its own option and the label is the
destination. That needed Act.worn_action/4, since nothing could click
interface 387 before.
Two faults measurement caught that reasoning had not. Ranking worn above
packed outright looked right and sent a body holding an Ardougne tablet 100
tiles from its lever on a 356-tile glory hop instead, so the shorter walk
decides and worn is only the tiebreak. And depart/3 first chose a lever and
then teleported toward it, which is the same mistake one level up; it hands
over every lever now and lets the item pick.
Both of this world's entry levers land in the same Deserted Keep, so which one
a body walks to is a question about where it is standing. lever_for/1 answers
by distance and the hardcoded 1814 constants are gone -- a glory lands 21
tiles from 26761 and five hundred from Ardougne's. Widening homes/1 to match
was the obvious wrong fix and is reverted with a note: that function says
where a fleet rises and where a loot trip banks, and letting Edgeville into it
moved every
::botgen pker leverfleet off Ardougne.A pker carries the fare now -- a six-charge glory and a Varrock tablet, two of
twenty-eight slots through the reserve argument pker_kit/7 already had for a
rotating bot's tools. They fail differently on purpose: the glory is the
shorter trip and the better landing but runs down a charge ladder, the tablet
is one charge that always works and lands a long walk out. Which meant
teaching the kit that a charge is the item: armed?/3 gates on exact ids, so a
glory degrading 11978 -> 11976 would have left a body never armed again.
worn/3 excludes teleport families and kit_missing?/2 compares by ladder, so a
spent glory still counts as a glory and the bank restocks it.
Act.relocate/2 survives two hops later as the last resort. A bot with no
teleport and no walk out of Lumbridge never fights again, and a fleet that
quietly stops is worse than one that visibly cheats -- but it is the exception
now rather than the mechanism.
Six existing tests changed rather than broke. Three :arming assertions name
:going_home because the phase graph genuinely gained a phase, and the shared
state/1 helper defaults dwelt: true so that arming tests keep asserting the
step after the dwell rather than the dwell. Both are the kind of edit that can
paper over a regression, so: no assertion was weakened, and the dwell has
tests of its own that opt out of the default.