| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Usage: test/stress/abyss game_id, where game_id must be a number. If not |
| 4 |
# provided, it defaults to the script's PID. |
| 5 |
# |
| 6 |
# After starting, it's good to customize the instance somewhat, especially |
| 7 |
# the race. Nagas and octopodes are prime choices because of constriction. |
| 8 |
# |
| 9 |
# You can learn spells via &^M (when there are no monsters on the screen, |
| 10 |
# if you adjust the spell via =s to an uppercase letter, the bot will randomly |
| 11 |
# cast it from time to time. If more than one spell uses a capital letter, |
| 12 |
# one will be picked at random. Sadly, this works only for spells that don't |
| 13 |
# require a target. |
| 14 |
|
| 15 |
# When a crash happens: |
| 16 |
# * backup the save just to be safe |
| 17 |
# * ensure you have the same terminal size |
| 18 |
# * re-run test/stress/abyss specifying the same number. If you didn't |
| 19 |
# provide one initially, it is given in the save's name. |
| 20 |
# * if all went well, you will see the exact same crash |
| 21 |
# * debug it! |
| 22 |
|
| 23 |
GAME=${1:-$$} |
| 24 |
|
| 25 |
while ./crawl -name "Abyss-$GAME" -rc test/stress/abyss.rc -seed "$GAME" -gdb |
| 26 |
do |
| 27 |
# ^Q to exit the loop, &^C to crash and retain the save |
| 28 |
if ! [ -f "saves/Abyss-$GAME.cs" ] |
| 29 |
then exit |
| 30 |
fi |
| 31 |
done |