fix(bot): a pker arms at the bank it walked to, and goes home afterwards #225

Merged
sickday merged 1 commit from fix/bot-stair-climbing into main 2026-08-15 14:20:53 +00:00
Owner

A dead pker drops everything, so :arming can only do anything beside a bank --
Act.refit/2 is gated on near_bank?/1. home/2 fired on arrival at the bank
instead, moving the body to state.anchor before it armed, and for this kind
Kinds.base_config/3 sets anchor to the tile ::botgen was run on rather than a
bank. So the whole trip read: die, respawn in Lumbridge, walk to the castle and
climb two flights to a real bank, teleport away from it untouched, fail
near_bank?, answer bare? true, and end {:failed, :bare} into the brain's
five-failure cascade. Watched on a client that is a pker that cannot rearm and
never gets back into the wilderness, and the climb it just made was for
nothing.

Arriving somewhere is not being ready to leave it. Going home is what a body
does when it is armed, so the relocate moves to the two exits :arming takes to
:travel_to_grounds, and the arrival sites keep only the half that always
applies -- a fresh leg and fresh budgets, now ledger/1. That also drops an
assumption nothing stated: the anchor no longer has to be a bank for a regroup
to work, so a fleet raised anywhere recovers.

Named ledger/1 because settle/4 is already private in this module, and because
"hand back a fresh ledger" is what home/2's own doc had been calling it.

One consequence beyond the fix: every arming completion now relocates, not only
the ones that follow a regroup, so the loot loop gains a hop home after banking
and selling. That reads correct -- finished at the bank, go back to the grounds
-- and the bot suite is unchanged by it, but it is a behaviour change rather
than a repair and belongs in the log as one.

Two of the three tests fail against the old order. The third asserts refit
fires at the castle bank on plane 2, which held before and after; it is there
because near_bank?/1 reads nearest_bank/1 at its same-plane default, and the
only thing making that answer the Lumbridge booth is the booth being upstairs
with the body.

What this does not change is that refit is not a withdrawal. The body now
stands at a real booth to do it, but nothing is opened and nothing leaves a
container -- #150, still.

A dead pker drops everything, so :arming can only do anything beside a bank -- Act.refit/2 is gated on near_bank?/1. home/2 fired on arrival at the bank instead, moving the body to state.anchor before it armed, and for this kind Kinds.base_config/3 sets anchor to the tile ::botgen was run on rather than a bank. So the whole trip read: die, respawn in Lumbridge, walk to the castle and climb two flights to a real bank, teleport away from it untouched, fail near_bank?, answer bare? true, and end {:failed, :bare} into the brain's five-failure cascade. Watched on a client that is a pker that cannot rearm and never gets back into the wilderness, and the climb it just made was for nothing. Arriving somewhere is not being ready to leave it. Going home is what a body does when it is armed, so the relocate moves to the two exits :arming takes to :travel_to_grounds, and the arrival sites keep only the half that always applies -- a fresh leg and fresh budgets, now ledger/1. That also drops an assumption nothing stated: the anchor no longer has to be a bank for a regroup to work, so a fleet raised anywhere recovers. Named ledger/1 because settle/4 is already private in this module, and because "hand back a fresh ledger" is what home/2's own doc had been calling it. One consequence beyond the fix: every arming completion now relocates, not only the ones that follow a regroup, so the loot loop gains a hop home after banking and selling. That reads correct -- finished at the bank, go back to the grounds -- and the bot suite is unchanged by it, but it is a behaviour change rather than a repair and belongs in the log as one. Two of the three tests fail against the old order. The third asserts refit fires at the castle bank on plane 2, which held before and after; it is there because near_bank?/1 reads nearest_bank/1 at its same-plane default, and the only thing making that answer the Lumbridge booth is the booth being upstairs with the body. What this does not change is that refit is not a withdrawal. The body now stands at a real booth to do it, but nothing is opened and nothing leaves a container -- #150, still.
fix(bot): a pker arms at the bank it walked to, and goes home afterwards
All checks were successful
ci / gates (pull_request) Successful in 3m25s
build / image (push) Successful in 38s
ci / gates (push) Successful in 3m28s
fb81131522
A dead pker drops everything, so :arming can only do anything beside a bank --
Act.refit/2 is gated on near_bank?/1. home/2 fired on arrival at the bank
instead, moving the body to state.anchor before it armed, and for this kind
Kinds.base_config/3 sets anchor to the tile ::botgen was run on rather than a
bank. So the whole trip read: die, respawn in Lumbridge, walk to the castle and
climb two flights to a real bank, teleport away from it untouched, fail
near_bank?, answer bare? true, and end {:failed, :bare} into the brain's
five-failure cascade. Watched on a client that is a pker that cannot rearm and
never gets back into the wilderness, and the climb it just made was for
nothing.

Arriving somewhere is not being ready to leave it. Going home is what a body
does when it is armed, so the relocate moves to the two exits :arming takes to
:travel_to_grounds, and the arrival sites keep only the half that always
applies -- a fresh leg and fresh budgets, now ledger/1. That also drops an
assumption nothing stated: the anchor no longer has to be a bank for a regroup
to work, so a fleet raised anywhere recovers.

Named ledger/1 because settle/4 is already private in this module, and because
"hand back a fresh ledger" is what home/2's own doc had been calling it.

One consequence beyond the fix: every arming completion now relocates, not only
the ones that follow a regroup, so the loot loop gains a hop home after banking
and selling. That reads correct -- finished at the bank, go back to the grounds
-- and the bot suite is unchanged by it, but it is a behaviour change rather
than a repair and belongs in the log as one.

Two of the three tests fail against the old order. The third asserts refit
fires at the castle bank on plane 2, which held before and after; it is there
because near_bank?/1 reads nearest_bank/1 at its same-plane default, and the
only thing making that answer the Lumbridge booth is the booth being upstairs
with the body.

What this does not change is that refit is not a withdrawal. The body now
stands at a real booth to do it, but nothing is opened and nothing leaves a
container -- #150, still.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Revenant/Server!225
No description provided.