def initialize(self):
     self.titletext = typefaces.prepare_title("Prepare for the Onslaught",colour=(255,255,255))
     self.scenery = chromographs.obtain("background.png")
     self.indicate_lot = True
     self.current_edge = None
     self.current_lot = None
     self.townplanner = grid.TownPlanningOffice()
     self.finished = False
     self.result = "Onslaught"
     situation = self.situation
     self.new_inventions()
     self.build_menu = BuildMenu(situation)
     self.statusbar = StatusBar()
     situation.update_status_bar(self.statusbar)
     self.statusbar.push_messages(
         "Hit Space bar or Return key to begin the Onslaught!",
         "Be sure to build cannons and deploy soldiers!",
         "Left click to repeat the previous build",
         "Right click to open build menu",
         )
     if self.situation.chapter == 0:
         self.statusbar.flash(80)
     for inst in situation.installations[:]:
         if inst.destroyed():
             situation.installations.remove(inst)
     for unit in situation.get_units():
         unit.damage = 0 # repair units automatically
         unit.attacking = 0
         unit.animation_frame = 1
         unit.image = unit.obtain_frame()
     phonographs.orchestrate("intromusic.ogg")
 def initialize(self):
     self.titletext = typefaces.prepare_title("Onslaught of Enormities",colour=(255,64,64))
     self.scenery = chromographs.obtain("background.png")
     self.cursor = chromographs.obtain("iconic/unit-cursor.png")
     self.chapter = chapters.open_chapter(self.situation.chapter)
     wave = self.situation.wave
     self.dinosaurs = self.chapter.spawn_wave(wave)
     phonographs.play(self.dinosaurs[-1].attack_phonograph)
     for name in self.chapter.beasts_in_this_chapter():
         if name not in self.situation.seen_dinosaurs:
             self.situation.seen_dinosaurs.append(name)
     self.finished = False
     self.result = "Preparation"
     self.statusbar = gui.StatusBar()
     self.statusbar.push_messages(
         "Protect your ships!",
         "Cannons need soldiers nearby to man them",
         "Click again on the field to direct a soldier",
         "Click on a soldier to select them",
         )
     if self.situation.chapter == 0:
         self.statusbar.flash(80)
     self.situation.update_status_bar(self.statusbar)
     self.selected_unit = None
     # orchestrate the battle music
     phonographs.orchestrate("onslaughtmusic.ogg")
 def initialize(self):
     self.ribbons = [chromographs.obtain("flourish/ribbon-{0}.png"
                                         .format(c))
                     for c in ("red","white","blue")]
     phonographs.orchestrate("victory.ogg", once=True)
     location = pygame.Rect(PAGEMARGIN,100,500,600)
     self.credits = gui.SelfAdvancingScroll(CREDITS, location, 20)
     self.title = typefaces.prepare_title("Victory is Yours")
     self.heading = typefaces.prepare_subtitle("Final Ledger Entries")
    def initialize(self):
        self.next_mode = "ChapterStart"
        self.defeated = not self.situation.ships_remaining()

        if not self.defeated and self.situation.chapter >= chapters.last_chapter():
            self.next_mode = "Victory"

        colour = "black" if self.defeated else "gold"
        self.ribbon = chromographs.obtain("flourish/ribbon-{0}.png".format(colour))
        phonographs.orchestrate("intromusic.ogg")
 def initialize(self):
     if self.situation.args.sheep:
         bestiary.wooly_retribution()
         self.situation.args.sheep = False
     self.header = gui.make_textbox((250,PAGEMARGIN),
                                    "BLASTOSAURUS REX",500,
                                    size="title")
     self.main_menu = gui.make_menu((300,400),
                          [("Initiation","new"),
                           ("Continuation","load"),
                           ("Information","information"),
                           ("Education","encyclopaedia"),
                           ("Termination","quit")],400)
     self.load_menu = self.prepare_load_menu()
     self.name_menu = gui.PunchCard((300,400))
     self.name_prompt = gui.make_textbox(
         (300,200),
         "Punch a card with your name, for the analytical engine:\n",
         400,
         )
     self.menu = self.main_menu
     self.ribbon = chromographs.obtain("flourish/ribbon-white.png")
     phonographs.orchestrate("intromusic.ogg")