# Oooh... shiny!
#
# Wizmode is needed.
#
# Usage: ./crawl -rc test/eyecandy/fireworks.rc
# ^Q yes to exit.
#
# TODO:
# * muting messages causes corruption of the HUD
# * animation is choppy, I can do better pressing keys by hand

name = Fireworks
species = mu
background = ar
restart_after_game = false
show_more = false
#message_colour = mute:.*

: bot_start = true
: function ready()
:   local esc = string.char(27)
:   local eol = string.char(13)
:   if you.turns() == 0 and bot_start then
:     bot_start = false
:     crawl.enable_more(false)
:     crawl.sendkeys("&Y" .. esc)
:     crawl.sendkeys("&_nemelex" .. eol)
:     crawl.sendkeys("&~T")
:     crawl.sendkeys("&Lcircular_temple_12" .. eol)
:     crawl.sendkeys("&" .. string.char(20) ..
:                    "require('dlua/stress.lua')" .. eol ..
:                    "stress.fill_level('floor')" .. eol ..
:                    "dgn.create_monster(40, 40, 'statue hp:10000')" .. eol ..
:                    "you.teleport_to(40, 32)" .. eol .. esc)
:     crawl.sendkeys("X" .. string.char(6) .. "y" .. esc)
:     crawl.sendkeys("&l27" .. eol .. "N")
:     crawl.sendkeys("&A27" .. eol)
:     for i = 1, 40 do
:       crawl.sendkeys("&H")
:     end
:   end
:   if (you.turns() % 7) == 1 then
:     crawl.call_dlua("require('dlua/stress.lua')" .. eol ..
:                     "stress.boost_monster_hp()" .. eol ..
:                     "you.piety(200)")
:     crawl.sendkeys("&corb" .. eol .. eol)
:   end
:   crawl.sendkeys(".")
:   crawl.delay(250)
: end
