# gob2native - Gobliiins walkthrough, level 6 (AVT001): the spiders' cave
# SPDX-License-Identifier: GPL-3.0-or-later
#
# The fighter climbs the rope to the top ledge and pulls one of the two
# threads there: the right one (chosen at random when the level starts,
# v[307]; the wrong one costs energy) hauls the spider in the middle up,
# closing the gap in the bridge. The picker takes the pistol, shoots the
# big spider away and shoots at the small spider by the ladder, which
# mends the ladder and frees its pillow. He lays the pillow on the bridge
# under the spider's thread; the wizard's spell on the thread then drops
# the spider onto the pillow, which uncovers a magic object for the
# picker: the exit shows. The script reads the thread from v[307].
room AVT001
goblin 1
walk 174 93     # the fighter goes to the foot of the rope
walk 174 45     # and climbs it to the top ledge
ifvar 307 1
act 150 27      # he pulls the right-hand thread if v[307] = 1...
ifvar 307 0
act 102 27      # ...the left-hand one if v[307] = 0: the spider goes up
goblin 0
walk 174 129    # the picker crosses the mended bridge
pick 288 129    # and takes the pistol
use 288 60      # he shoots at the big spider, which flees up its thread
walk 174 129    # back over the bridge
walk 54 87      # to the foot of the ladder
use 54 69       # he shoots at the small spider: the ladder is mended
pick 54 39      # he climbs up and swaps the pistol for its pillow
pick 174 135    # he lays the pillow on the bridge under the spider's thread
goblin 2
act 174 81      # the wizard's spell drops the spider onto the pillow
goblin 0
walk 150 135    # the picker steps back
walk 174 129    # and takes the magic object it uncovered: exit shows
exit
