#########################################
# Tutorial map 2: Monsters and combat   #
#########################################

{{
crawl_require("dlua/tutorial.lua")

tutorial2 = {}

function tutorial2.msg(text)
    return tutorial_msg("tutorial2 " .. text)
end

function tutorial2.exit ()
    crawl.tutorial_msg("tutorial2 exit", true)
end

function tutorial2.win()
    crawl.mark_game_won()
    return tutorial2.exit()
end
}}

NAME:    tutorial_lesson2
TAGS:    no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_pool_fixup tutorial
DESC:    Lesson 2: Monsters and Combat
ORDER:   2
ORIENT:  encompass
KFEAT:   BFG = .
KFEAT:   AE = +
KFEAT:   n = iron_grate
COLOUR:  deBFG = lightblue
RTILE:   c = wall_vines
FTILE:   dBFG = tutorial_pad
ITEM:    quarterstaff mundane
SHUFFLE: 34
MONS:    training dummy hp:10 ; whip mundane
MONS:    rat
MONS:    wyvern
MONS:    giant cockroach
MARKER:  d = lua:tutorial2.msg("pickup_weapon")
MARKER:  A = lua:tutorial2.msg("melee")
MARKER:  B = lua:tutorial2.msg("resting")
# TODO: Pad C and pad D were for food related lessons. What could go there?
MARKER:  E = lua:tutorial2.msg("wait")
MARKER:  F = lua:tutorial2.msg("compare_monster_desc")
MARKER:  G = lua:tutorial2.msg("resting_reminder")
MARKER:  } = lua:tutorial2.msg("downstairs")
MARKER:  { = lua:one_way_stair { dst  = "tutorial_lesson2", \
                                 onclimb = "tutorial2.exit" }
epilogue{{
  if crawl.game_started() then
    crawl.tutorial_hint("HINT_NEW_LEVEL")
    crawl.clear_messages(true)
    crawl.tutorial_msg("tutorial2 start")
    tutorial_intro()
  end
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxx...xxxxxxxxxxxxx...xxx
xxxxxx.2...xxxxxxxxxxx.....xx
xxxxxx2.....E..2....+B.....xx
xxxxxx.....xxxxxxxxxxx.....xx
xxxxxxx2..xxxxxxxxxxxxx...xxx
xxxxxxxx.xxxxxxxxxxxxxxx1xxxx
xxxxxxxx.xxxxxxxxxxxxxxx.xxxx
xcccccccFcccccccxxxxxxxx.xxxx
xc3..n.....n..4cxxxxxxxxAxxxx
xc...n.....n...cxxxxxxxx.xxxx
xc...+.....+...cxxxxxxxxdxxxx
xc+nnnnnnnnnnn+cxxxxxccc.cccx
xc.............cxxxxxc.....cx
xc.............cxxxxxc..{..cx
xcccccccGcccccccxxxxxc.....cx
xxxxxc.....cxxxxxxxxxcccccccx
xxxxxc..}..cxxxxxxxxxxxxxxxxx
xxxxxc.....cxxxxxxxxxxxxxxxxx
xxxxxcccccccxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP


##########################################################
# Level 2: Ranged combat
##########################################################
NAME:    tutorial_lesson2_level2
TAGS:    no_rotate no_monster_gen no_item_gen no_hmirror no_vmirror no_trap_gen no_pool_fixup tutorial_lesson2
PLACE:   D:2
ORIENT:  encompass
RTILE:   x = wall_lair, c = wall_vines
COLOUR:  .123f = brown
FTILE:   .123f = floor_swamp, t = floor_grass
KFEAT:   ,ABCDEF = .
COLOUR:  deABCDEF = lightblue
FTILE:   deABCDEF = tutorial_pad
MONS:    training dummy hp:2 ; stone q:10
MONS:    rat always_corpse
MONS:    worm
ITEM:    boomerang mundane q:10
ITEM:    shortbow mundane
ITEM:    arrow mundane q:30
MARKER:  d = lua:tutorial2.msg("boomerangs")
MARKER:  A = lua:tutorial2.msg("throwing")
MARKER:  B = lua:tutorial2.msg("resting_reminder")
MARKER:  e = lua:tutorial2.msg("wield_bow")
MARKER:  C = lua:tutorial2.msg("travel_reminder")
MARKER:  D = lua:tutorial2.msg("firing")
MARKER:  E = lua:tutorial2.msg("explore")
# TODO Pad F was also a reminder to eat, anything else needed?
# This is just for atmosphere.
MARKER:  F = lua:fog_machine { cloud_type = "thin mist", pow_min = 10, \
             pow_max = 10, delay = 10, start_clouds = 1, size_min = 2, \
             size_max = 3, spread_rate = -1 }
MARKER:  } = lua:tutorial2.msg("tutorial_end")
MARKER:  ) = lua:tutorial2.msg("tutorial_end")
MARKER:  ] = lua:tutorial2.msg("tutorial_end")
MARKER:  } = lua:one_way_stair { dst  = "tutorial_lesson2", \
                                 desc = "exit from the tutorial", \
                                 onclimb = "tutorial2.win" }
MARKER:  ) = lua:one_way_stair { dst  = "tutorial_lesson2", \
                                 desc = "exit from the tutorial", \
                                 onclimb = "tutorial2.win" }
MARKER:  ] = lua:one_way_stair { dst  = "tutorial_lesson2", \
                                 desc = "exit from the tutorial", \
                                 onclimb = "tutorial2.win" }
epilogue{{
  if crawl.game_started() then
    crawl.clear_messages(true)
    crawl.tutorial_msg("tutorial2 newlevel")
  end
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxx..xxxxx.xx..}xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx.......x.xx.xxx.).xxxxxxxxxxxxxxxxxxxxxx
xxxx.....2..x.x..xxxxxxx]xxxxxxxxxxxxxxxxxxxxx
xxx.2..x......x....xxxxx.xxxxxxxxxxxxxxxxxxxxx
xx.........xx.......xxx.xxxxxxxxxxxxxxxxxxxxxx
xxx.F.......x...2.xxxx...xxxxxxxxxxxxxxxxxxxxx
x.......tt........xxx....xxxxxxxxxxxxxxxxxxxxx
xx....ttt..........x....xxxxxxxxxxxxxxxxxxxxxx
xxx...tt.........xx.2.xxxxxxxxxxxxxxxxxxxxxxxx
x............F......xxxxxxxxxxxxxxxxxxxxxxxxxx
xx...x..........xxxxxxcccccccccxxxxxxxxxxxxxxx
x............xxxxxxxxxc,,,,,,,cccccxxxxxxxxxxx
xxx.....xxxxxxxxxxxxxxc,,{,d,,,,A,cxxxxxxxxxxx
xxxxxExxxxxxxxxxxxxxxxc,,,,,,,ccc,cxxxxxxxxxxx
xxxxxx..xxxxxxxxxxxxxxcccccccccxc,cxxxxxxxxxxx
xxxxxxxx..B...xxxxxxxxxxxxxxxxxxc,cxxxxxxxxxxx
xxxxxxxxxxxx....xxxxxxxxxxxxxxx.....xx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