#Levels, by Mark Boyd
#Unlike the rest of flyhard, this file is NOT GPLed - it's in the public domain 


#Levels.txt file format:
#
#Any line beginning with # is a comment.
#
#L is for level.  Each level entry must begin with "L:START" and end with "L:END"
#
#D is for description.  This is the text which appears at the start of the level
#
#A is for arena - this is an ASCII drawing of the level, with one character for each tile.
#  There must be the same number of characters on each line or something nasty will probably happen.
# Arena legend:
# #:block  X:exit block(explodes when level is complete)
# - | p q d b 3 E M W +: pipes (horizontal, vertical, 4 corners, 4 T-intersections, 1 cross intersection)
# 7 9 1 5: diagonal half-blocks
# U D L R: turrets (pointing up, down, left or right) 
#  (strictly speaking, turrets are enemies, not part of the arena, but it's easier this way)
# B: ball source  T: ball target(3x3 object)
# S: player start position
# s: shop (2x1 object)
# ^ v < >: switches (pointing up, down, left or right)
# H, V: doors (Horizontal and vertical.  These are 5x1 and 1x5 objects, so leave space for them)
#
# The character for large objects should be at the top-left of where you want them to go
#
#
# E is for enemies. Posible enemies are:
# BOBBLERS(x, y, number, radius)
# MINER(x,y)
# GRALDOR(x,y)
# INVADER(x,y,xmin,xmax)
# ASTUFO()
# UFO(x,y,xmin,xmax)
# ASTEROID(x,y)
#
# (The INVADER, ASTUFO and UFO are kind of gimmicky... so there are only 4 sensible enemies right now)
#
#P is for physics, or possibly planet
#this is for changing certain constants, which would be different on other planets
#
# Changable constants are:
# GRAVITY  (default value is 43.75 pixels/second^2)
# AIR_RESISTANCE (default value is 1)
# it works like this:
# d^2v
# ---- = - AIR_RESISTANCE * v / mass
# dt^2
# negative air resistance is possible but not great idea:)

#A very gentle introduction
L:START

P:GRAVITY=43.75
P:AIR_RESISTANCE=1

D:Level 1: The glorious beginning
D:
D:Controls:
D:Left arrow:  Turn Left
D:Right arrow: Turn Right
D:Up arrow:    Thrust
D:Z:           Tractor beam on/off
D:Space:       Fire!
D:
D:Pick up the bogosphere (small, red, round thing) and
D:drop it on the reactor (large, green, round thing)
D:The reactor will then explode.  This will blow a hole
D:in the wall, allowing you to escape
D:
D:Try not to break the bogosphere... but replacements
D:will appear if you do.

A:####################
A:#                  #
A:#                  #
A:#                  #
A:#      S           #
A:#  B               #
A:#####              #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#       T          #
A:#                  #
A:#                  #
A:########XXX#########

L:END



L:START

D:Level 2: Buttons
D:
D:Press the buttons by shooting at them

A:####################
A:#      #############
A:#      #############
A:#      #############
A:#      #     v     #
A:#>     #           #
A:#      V           #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#      #           #
A:#      #           #
A:#      ####H    ####
A:#      #           #
A:#      #>          #
A:#      #           #
A:#   S  #    T      # 
A:#      #           # 
A:#B     #           #
A:###########XXXXX####

#The 8,15 button is not needed to complete the level - it's there to
#prevent stupid/unlucky players from getting themselves stuck in the
#bottom-right room with the door locked from the outside :p  

C:CONNECT( 1,5,   7,6)
C:CONNECT( 1,5,  11,13)
C:CONNECT(13,4,   7,6)
C:CONNECT(13,4,  11,13)
C:CONNECT( 8,15,  7,6)
C:CONNECT( 8,15, 11,13)

C:KICK(11,13)

L:END



L:START

D:Level 3:  Here be turrets
D:
D:Turrets shoot at you.  Avoid standing still near a turret!
D:This level also contains bobblers, which bobble harmlessly."
D:Bobblers are a rich source of protein, and also of money,
D:which will appear if you shoot them.

A:########################################
A:#                              #       #
A:#                              #       #
A:#                              #       #
A:#                                      #
A:#                                      #
A:#        U                            L#
A:#        #------q                      #
A:#               |                      #
A:#               |                      #
A:#               | S                T   #
A:#          B  B |               p--   -#
A:# s        #### |               |      #
A:##################################XXXXX#

E:BOBBLERS(25, 5, 30, 50);

L:END


L:START

D:Level 4: Fastball special
D:
D:This is probably not as bad as it looks.

#The right way to do this is to throw the ball.
#It's probably possible to do this by killing all the turrets.

A:####################################
A:#                 1######DDD########
A:#                  1###R    L#######
A:#                            L######
A:#                            L######
A:#                             L#####
A:#                   ###R        L###
A:#      B            1####UU       1#
A:#     p#q              1###9U   T  X
A:#     | |                1###U     X
A:#  S  bMd                   1##9   X
A:#      |                     1##XXXX
A:#      |                           X
A:#s     |                           #
A:####################################


L:END

#This is a nice demonstration of the "realistic physics"
#But mostly it's here because it's fun.   
L:START

D:level 5: Miney, miney, miney
D:
D:Mines explode when they hit stuff.  "Stuff" includes you.
D:They also drop money.  Well... "drop". is not quite the 
D:right word.

A:#################################
A:#                       |       #
A:#                       |       X 
A:#         U  B          |    T  X
A:#        L#--#----------+----   X
A:#                       |       X
A:#                       #       X
A:#                               #
A:#                               #
A:#                 S             #
A:#                               #
A:#                               #
A:#                               #
A:#                               #
A:#                               #
A:#                               #  
A:#                       #       #  
A:#                       |       #  
A:#        L#-------------W-------#  
A:#         D                     #  
A:#                               #  
A:#s                             B# 
A:#################################


#Eh, maybe some sort of loop facility would be nice
E:MINER:(23  ,7.9)
E:MINER:(24.2,7.9)
E:MINER:(25.4,7.9)
E:MINER:(26.6,7.9)
E:MINER:(27.8,7.9)
E:MINER:(29  ,7.9)
E:MINER:(30.2,7.9)

E:MINER:(23  ,9.1)
E:MINER:(24.2,9.1)
E:MINER:(25.4,9.1)
E:MINER:(26.6,9.1)
E:MINER:(27.8,9.1)
E:MINER:(29  ,9.1)
E:MINER:(30.2,9.1)

E:MINER:(23  ,10.3)
E:MINER:(24.2,10.3)
E:MINER:(25.4,10.3)
E:MINER:(26.6,10.3)
E:MINER:(27.8,10.3)
E:MINER:(29  ,10.3)
E:MINER:(30.2,10.3)

E:MINER:(23  ,11.5)
E:MINER:(24.2,11.5)
E:MINER:(25.4,11.5)
E:MINER:(26.6,11.5)
E:MINER:(27.8,11.5)
E:MINER:(29  ,11.5)
E:MINER:(30.2,11.5)

E:MINER:(23  ,12.7)
E:MINER:(24.2,12.7)
E:MINER:(25.4,12.7)
E:MINER:(26.6,12.7)
E:MINER:(27.8,12.7)
E:MINER:(29  ,12.7)
E:MINER:(30.2,12.7)

E:MINER:(23  ,13.9)
E:MINER:(24.2,13.9)
E:MINER:(25.4,13.9)
E:MINER:(26.6,13.9)
E:MINER:(27.8,13.9)
E:MINER:(29  ,13.9)
E:MINER:(30.2,13.9)

E:MINER:(23  ,15.1)
E:MINER:(24.2,15.1)
E:MINER:(25.4,15.1)
E:MINER:(26.6,15.1)
E:MINER:(27.8,15.1)
E:MINER:(29  ,15.1)
E:MINER:(30.2,15.1)

L:END


L:START

D:Level 6: Trouble and strafe

A:####################XXX#################
A:#                  |T                  #
A:#                  |                   #
A:#                  |                   #
A:#                  E-d                 #
A:#                  |                   #
A:#                  |                   #
A:#   ##             |                   #
A:#    ##            |                  B#
A:#             Bs   |                  ##
A:#         p---###--W-------#           #
A:#         |                D           #
A:#R        |                            #
A:#R        |                            #
A:#R        |                            #
A:#R        |                            #
A:#R        |           U                #
A:#R        |          L#----------------#
A:#R        |           D                #
A:#R        |                            #
A:#R        |                            #
A:#R        |                            #
A:#R        |                            #
A:#         |                 U          #
A:#         b-----------------#       S  #
A:#                                      #
A:#                                      #
A:#    ##                                #
A:#   ##                                 #
A:#                                      #
A:#                                      #
A:#                                      #
A:#                                      #
A:#                                      #
A:#                                   B  #
A:########################################

L:END


L:START

D:Level 7: Best game ever?
#(X-COM, of course!)
D:
D:Don't get ambushed, and don't hesitate to think outside the box. 
D:
D:
D:(This is not the best game ever.  This is just a tribute.)
  
#Apologies for the buzzphrase.  The best way to deal with those 2 turrets at
#the top is of course to tractor the miners into them from outside the "UFO".
#
#The intent of the other turrets is to ambush the player in exactly the same 
#places where he'd get ambushed if he were playing X-COM.
#
#The L and R turrets can be killed by rockets from the outside.
#This is an unintended solution, but it's sort of vaguely reminiscent of
#blaster bomb tricks, so I decided not to stop it from working :/

#           1    1    2    2    3
# 0    5    0    5    0    5    0
A:#################################
A:#                               #
A:#                               #
A:#            #########          #
A:#            #  D D  #          #
A:#            #       #          #
A:#           7#       #9         # 
A:#          7#R       L#9        #
A:#         7#R         L#9       #
A:#        7#5           1#9      #
A:#       7#5   ^         1#9     #
A:#  ######+>  p+H    -q   1####  #
A:#  #    vV   |v      |       #  # 
A:#  #         |       |      <#  #
A:#  #         |       E--H    #  #
A:#  #         |       |      <#  #
A:#  #         |   B   |       #  #
A:#  #>    |   |       |       #  # 
A:#  #H    W---3       |       #  # 
A:#  #>        |       |       #  # 
A:#  #         |       |       #  #
A:#  ######9   b-------d   7####  #
A:#       1#9             7#5     #
A:#        1#9           7#5      #
A:#         1#9         7#5       # 
A:#          1#9       7#5        #
A:#           1#       #5         # 
A:#            #^      #        S # 
A:#            ##H    ##          #
A:#             v                 X
A:#                            T  X
A:#                               X
A:#s                              X 
A:############################XXXXX  
#           1    1    2    2    3
# 0    5    0    5    0    5    0

C:CONNECT(14,27,  15,28);
C:CONNECT(14,29,  15,28); 
  
C:CONNECT( 4,17,   4,18); 
C:CONNECT( 4,19,   4,18);
   
C:CONNECT( 8,12,   9,12);
C:CONNECT(10,11,   9,12);
  
C:CONNECT( 8,11,   9,12);
C:CONNECT(10,15,   9,12);
  
C:CONNECT(14,10,  15, 11);
C:CONNECT(14,12,  15, 11);  
  
C:CONNECT(28,13,  24,14);
C:CONNECT(28,15,  24,14);  
  
E:BOBBLERS(17.5, 15.5, 10, 20);
E:MINER(16,5.5);
E:MINER(19,5.5);

L:END


L:START

D:Level 8: Gravity is your friend
D:
D:This level is evil.        
  
#Kill the turret and tractor the ball from above, then drop it!
#This takes like 30 seconds, if you get it right
#The maze is a big fat red herring - you can get to the ball that way
#but you can't pick it up.

A:####################
A:# D                #
A:#                  #
A:#                  #
A:#----q  p---q      #
A:#   B|  |   |      #
A:#   #3  | M |      #
A:#    |  | | b-q    #
A:#    |  | |   |    #
A:#    |  | b-q |    #
A:#    |  |   | |    #
A:#    |  E-- | |    #
A:#    |  |   | |    #
A:#    |  | p-d |    #
A:#    |    |   |    #
A:#    |    | --3    #
A:XT   b----3   |    #
A:X         b-3 |    #
A:X             |    #
A:XXXX----------d    #
A:# S                #
A:#                  #
A:#                  #
A:####################

L:END

L:START

D:Level 9: The magic mushroom


 #          1    1    2    2    3    3    4
 #0    5    0    5    0    5    0    5    0
A:###########################################
A:#5                                       1#
A:#                                         #
A:#                                         #
A:#                                         #
A:#                                         #
A:#     7#############################9     #
A:#     ##5                         1##     #
A:#     ##             S             ##     #
A:#     ##                           ##     #
A:#     ##            T              ##     #
A:#     ##                           ##     #
A:#     ##                           ##     #
A:#     ##     7####XXXXXXX####9     ##     #
A:#     ##     ######XXXXX######     ##     #
A:#     ##     #######XXX#######H    ##     #
A:#     ##     #######XXX#######     ##     #
A:#     ##     1######XXX######5     ##     #
A:#     ##      D   1#XXX#5   D      ##     #
A:#     ##           #XXX#           ##     #  
A:#     ##          <#XXX#>          ##     #
A:#     ##           #XXX#           ##     # 
A:#     ##9B        7#XXX#9        B7##     # 
A:#     ####9     7###XXX###9     7####     #     
A:#     #####H    ####XXX####H    #####     #  
A:#     #####    L####XXX####R    #####     #
A:#     1###5     ####XXX####     1###5     #
A:#               ####XXX###V      1#5      #
A:#               ####XXX###        V       #  
A:#               ####XXX##>                #    
A:#9             7####XXX###                #  
A:##9           7#####XXX###                #    
A:####################XXX####               #    
A:####################XXX####9     7#9  B  7#    
A:####################XXX####################
 #          1    1    2    2    3    3    4
 #0    5    0    5    0    5    0    5    0

C:CONNECT(18,20,  30,15)  
C:CONNECT(24,20,  30,15)
C:CONNECT(24,20,  11,24)
C:CONNECT(24,20,  27,24)  
C:CONNECT(25,29,  27,24)
C:CONNECT(25,29,  34,28)
C:CONNECT(25,29,  26,27)

C:KICK(26,27); 

L:END



#TODO: player probably shouldn't have to kill graldors the first time they appear
#(Strictly speaking, you don't have to - I've managed a pacifist run on this level)
#
#All levels up to 8 can be completed with just the basic ship 
#Although upgrades will definitely make life easier.
#

L:START
D:Level 10: Heeeere's Graldor!
D:
D:Graldor can not be damaged by puny weapons!


A:################################
A:#       V V               V    #
A:#               S              #
A:#                              #
A:#   B                         <#
A:#  7#9                         #
A:###########               ######
A:#       1#5                v   #
A:#        #                     #
A:#        #>                    #
A:#        V                     #
A:#                              #
A:######>                        #
A:#                              #
A:#                              #
A:#        #               s     #
A:#        #               ##    #
A:#       7#9              ||    #
A:###########              ||    #
A:#       V V              bW----#
A:#                              #
A:XT                             #
A:X                              #
A:X                              #
A:XXXX############################


C:CONNECT(30, 4,  8, 1)
C:CONNECT(30, 4,  8,19)

C:CONNECT( 6,12, 10, 1)
C:CONNECT( 6,12, 10,19)

C:KICK( 8,19)
C:KICK(10,19)

C:CONNECT(27, 7, 26, 1)
C:CONNECT(10, 9,  9,10)

E:GRALDOR(29.5, 2.5)

E:GRALDOR( 5, 8)
E:GRALDOR( 4,10)
E:GRALDOR( 4,15)
E:GRALDOR( 5,17)

E:BOBBLERS(18, 12, 10, 20);

L:END


L:START

D:Level 11: Fish in a barrel
D:
D:...except they are not fish, and it's not in a barrel.
D:Oh, and there's no atmosphere on this planet.

P:GRAVITY=43.75
P:AIR_RESISTANCE=0

A:#############XXXXX#############
A:#        #    T      #        #
A:#        #           #        #
A:#        #           #        #
A:#        #           #        #
A:#        #           #        #
A:#        #9         7#        #
A:#        ##9       7##        #
A:#        1##9     7##5        #
A:#         1##H    ##5         #
A:#          v   S              #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#              B            s #
A:###############################

E:ASTEROID(15.5, 6.5)
E:ASTEROID(15.5, 6.5)
E:ASTEROID(15.5, 6.5)
E:ASTEROID(15.5, 6.5)
E:ASTEROID(15.5, 6.5)

C:CONNECT(11,10, 13,9)
L:END



L:START

D:Level 12: Introducing bosses.
D:
D:Destroy the boss to escape from the level!

A:###############################
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#        #           #        #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:#        #           #        #
A:#                             #
A:#                             #
A:#                             #
A:#                             #
A:# S                         s #
A:#########XXXXXXXXXXXX##########

E:ASTUFO()
E:ASTEROID( 4, 4)
E:ASTEROID(26, 4)
E:ASTEROID( 4,16)
E:ASTEROID(26,16)

L:END


#
L:START

D:Level 13: Gravity is mostly your friend.

P:AIR_RESISTANCE=1

A:####################
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#                  #
A:#          #9     7#
A:#         <##H    ##
A:#          #5     1#
A:#          #       #
A:#          #9     7#
A:#         <##H    ##
A:#          #5     1#
A:#          #       #
A:#          #9     7#
A:#         <##H    ##
A:#          #5     1#
A:#          #       #
A:#          #9     7#
A:#         <##H    ##
A:#          #5     1#
A:#          #       #
A:#  S       X  T    #
A:#          X       #
A:#  s      BX       #
A:###########XXXXXXX##

#OK, so this is nasty...
#Each switch affects the door next to it - and one other!

C:CONNECT(10,7,   13,7)
C:CONNECT(10,11,  13,11)
C:CONNECT(10,15,  13,15)
C:CONNECT(10,19,  13,19)

C:CONNECT(10,7,   13,19)
C:CONNECT(10,11,  13,7)
C:CONNECT(10,15,  13,11)
C:CONNECT(10,19,  13,15)

C:KICK(13,15)

L:END


L:START
D:Level 14: The Internets
D:
D:...which, as we all know, is a series of tubes....

#Another attempt to mislead the player into doing the Wrong Thing...
#there's no need to flip any of the switches because you can just go round everything...
#and you must go round anyway!
#
#Unfortunately, this is unlikely to fool anyone who runs the game in a high resolution mode:(


A:################################
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#                              #
A:#              pq              #
A:#              ||              #
A:#              ||              #
A:#              ||              #
A:#        pq    ||              #
A:#     p--db----db-q            #
A:#   p-+----------q|7#9         #
A:#   | |  p-----q ||###         #
A:#   | b--+->   | ||1#5         #
A:#   |    b---q | || |          #
A:#   b--------d | || |          #
A:#              | || |          #
A:#      p-------d || |          #
A:#    <-+---------d| |          #
A:#      |          | |    #   # #
A:#    <-+---q   p--d |          #
A:#      V   V   V    |      B   #
A:#                   |    #   # #
A:#                  T      ###  #
A:#  S                           #
A:#  B                           #
A:##################XXXXX#########

C:CONNECT( 5,24,  7,27)
C:CONNECT( 5,26, 11,27)
C:CONNECT(11,19, 15,27)

L:END

L:START

D:Level 15: More Graldors.
D:
D:You will need heavy firepower to kill the graldors.

A:#########################################
A:#5   v   1#5       1#5       1#5   v   1#
A:#         #         #         #         #
A:#         #         #         #         #
A:#         V         V         V       S #
A:#                                       #
A:#                                       #
A:#                                       #
A:#                                       #
A:#         #         #         #         #
A:#         #         #         #      T  X
A:#         #         #         #         X
A:#B       7#9   ^   7#9   ^   7#s        X
A:#####################################XXXX

E:GRALDOR(25.5,6.5)
E:GRALDOR(15.5,3.5)
E:GRALDOR(15.5,9.5)
E:GRALDOR(13.5,6.5)

E:BOBBLERS(5.5, 6.5, 10, 20)

#Connect all buttons to all gates
C:CONNECT(5,1,10,4)
C:CONNECT(5,1,20,4)
C:CONNECT(5,1,30,4)

C:CONNECT(15,12,10,4)
C:CONNECT(15,12,20,4)
C:CONNECT(15,12,30,4)

C:CONNECT(25,12,10,4)
C:CONNECT(25,12,20,4)
C:CONNECT(25,12,30,4)

C:CONNECT(35,1,10,4)
C:CONNECT(35,1,20,4)
C:CONNECT(35,1,30,4)

C:KICK(20,4)

L:END




L:START

D:Level 16: Invaders from space! 
D:
D:Beware of the UFO!

A:####################################
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#                                  #
A:#   7##9    7##9    7##9    7##9   #
A:#   ####    ####    ####    ####   #
A:#   ####    ####    ####    ####   #
A:#   #  #    #  #    #S #    #  #   #
A:#                                  #
A:#                                  #
A:XXXXXXXXXXXXXXXX9s 7XXXXXXXXXXXXXXXX
A:####################################

E:INVADER( 5,8,  7,16)
E:INVADER( 7,8,  9,18)
E:INVADER( 9,8, 11,20)
E:INVADER(11,8, 13,22)
E:INVADER(13,8, 15,24)
E:INVADER(15,8, 17,26)
E:INVADER(17,8, 19,28)
E:INVADER(19,8, 21,30)
E:INVADER(21,8, 23,32)

E:INVADER( 5,10,  7,16)
E:INVADER( 7,10,  9,18)
E:INVADER( 9,10, 11,20)
E:INVADER(11,10, 13,22)
E:INVADER(13,10, 15,24)
E:INVADER(15,10, 17,26)
E:INVADER(17,10, 19,28)
E:INVADER(19,10, 21,30)
E:INVADER(21,10, 23,32)

E:INVADER( 5,12,  7,16)
E:INVADER( 7,12,  9,18)
E:INVADER( 9,12, 11,20)
E:INVADER(11,12, 13,22)
E:INVADER(13,12, 15,24)
E:INVADER(15,12, 17,26)
E:INVADER(17,12, 19,28)
E:INVADER(19,12, 21,30)
E:INVADER(21,12, 23,32)

E:INVADER( 5,14,  7,16)
E:INVADER( 7,14,  9,18)
E:INVADER( 9,14, 11,20)
E:INVADER(11,14, 13,22)
E:INVADER(13,14, 15,24)
E:INVADER(15,14, 17,26)
E:INVADER(17,14, 19,28)
E:INVADER(19,14, 21,30)
E:INVADER(21,14, 23,32)

E:INVADER( 5,16,  7,16)
E:INVADER( 7,16,  9,18)
E:INVADER( 9,16, 11,20)
E:INVADER(11,16, 13,22)
E:INVADER(13,16, 15,24)
E:INVADER(15,16, 17,26)
E:INVADER(17,16, 19,28)
E:INVADER(19,16, 21,30)
E:INVADER(21,16, 23,32)

E:UFO(3, 5, 3, 33)

L:END
