#!/usr/bin/env bash # #94 bench: ZONE-LESS death un-wreck on the replicant. # # Node A (master) kills itself with TYPE-0 (collision) self-damage: the # TakeDamage hub's collision divert prices it as internal rattle -- armor and # damage zones never move -- reproducing the night-7 field ram-death without # a ram. Node B observes with BT_DEATH_LOG: the fix must print # [respawn] replicant un-wrecked + warp (mode 9->...) # after each of A's respawns. Pre-fix, the un-wreck rode a zone falling edge # that a zone-less death never produces -- B kept drawing A as the wreck. # # usage: mp_zoneless.sh [explosive] (arg switches A to the default weapon- # type harness -- the REGRESSION leg: zone deaths must still un-wreck) set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 sed "s/^map=.*/map=grass/; s/^time=.*/time=day/" MP.EGG > ZL.EGG TYPE="${1:-collision}" OBS=zl_${TYPE}_obs.log MST=zl_${TYPE}_master.log rm -f "$OBS" "$MST" # observer first (B): death-log ON -- the un-wreck line is the verdict BT_MP_LOG=1 BT_REPL_LOG=1 BT_DEATH_LOG=1 \ bt_launch "$OBS" ZL.EGG 0x0C -net 1601 sleep 2 # master (A): repeated self-kill of the requested damage type. Collision # damage is priced down by ~5e-5 (the 100 km/h reference scale) so its dose # is raw-kinetic-sized; the explosive regression leg uses the classic 60/s. SD_TYPE=""; DOSE=60 [ "$TYPE" = "collision" ] && { SD_TYPE=collision; DOSE=250000; } BT_MP_LOG=1 BT_DMG_LOG=1 BT_DEATH_LOG=1 \ BT_SELF_DAMAGE=$DOSE BT_SELF_DAMAGE_TYPE=$SD_TYPE \ BT_SELF_DAMAGE_DELAY=12 BT_SELF_DAMAGE_REPEAT=1 \ bt_launch "$MST" ZL.EGG 0x03 -net 1501 sleep 4 python ../tools/btconsole.py ZL.EGG 127.0.0.1:1501 127.0.0.1:1601 & PC=$! sleep 150 kill $PC 2>/dev/null bt_kill_ours rm -f ZL.EGG echo "=== MASTER ($MST): deaths + rattle ===" grep -c "DESTROYED" "$MST" grep -m3 "colldmg\|selfdmg" "$MST" echo "=== OBSERVER ($OBS): wreck swaps vs un-wrecks ===" grep -c "wreck swap" "$OBS" grep "un-wrecked" "$OBS" echo "=== DONE ($TYPE) ==="