#!/usr/bin/env bash # #150/#151: count type-2 arm executions per kill + measure the eject score arithmetic . /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 3 rm -f sc_a.log sc_b.log sc_r.log mkdir -p /c/git/bt411/scratchpad/night14/mlbak && mv matchlog_*.txt /c/git/bt411/scratchpad/night14/mlbak/ 2>/dev/null bt_expert_egg MP.EGG SC.EGG sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; s/^vehicle=.*/vehicle=madcat/" SC.EGG # B: unarmed slow target, respawns on death ( export BT_GOTO=enemy BT_GOTO_STOP=80 BT_SCORE_LOG=1 BT_DEATH_LOG=1 BT_MATCHLOG=1 BT_MP_LOG=1 bt_launch sc_b.log SC.EGG 0x0C -net 1601 ) sleep 2 # A: kills B with autofire, then panic-ejects late ( export BT_GOTO=enemy BT_GOTO_STOP=100 BT_AUTOFIRE=1 BT_AF_MISSILE=1 BT_AF_PERIOD=4 export BT_EJECT_AT=9000 export BT_SCORE_LOG=1 BT_DEATH_LOG=1 BT_MATCHLOG=1 BT_MP_LOG=1 bt_launch sc_a.log SC.EGG 0x03 -net 1501 ) sleep 5 python ../tools/btconsole.py SC.EGG 127.0.0.1:1501 127.0.0.1:1601 > sc_r.log 2>&1 & R=$!; sleep 300; kill $R 2>/dev/null; sleep 2 bt_kill_ours; sleep 2; taskkill //F //IM btl4.exe >/dev/null 2>&1 echo RESULT echo "--- B deaths (kills A should have earned) ---" grep -ac "Mech::Reset" sc_b.log echo "--- A: kill-arm executions + score sequence (matchlog) ---" grep -ah "SCORE\|KILL\|EJECT\|DEATH" matchlog_*.txt 2>/dev/null | head -25 echo "--- A: scorepost receipts (producer side) ---" grep -a "scorepost" sc_a.log | head -10 grep -a "scorepost" sc_b.log | head -10