Beispiel #1
0
 def loadZone(self):
     """ Load the marathon zone """
     self.zone = ZoneFactory.getZone(self.zoneName)
     for person in self.zone.people:
         if hasattr(person, "trainer"):
             self.trainers.append(person.trainer)
     
     return self.zone
Beispiel #2
0
    def loadZone(self):
        """ Load the marathon zone """
        self.zone = ZoneFactory.getZone(self.zoneName)
        for person in self.zone.people:
            if hasattr(person, "trainer"):
                self.trainers.append(person.trainer)

        return self.zone
def PerformEvent(event, zoneController):
    """ Perform the given event """
    if isinstance(event, BattleEvent):
        zoneController.runController(BattleController(zoneController.playerPerson.trainer, event.trainerToFight))
    elif isinstance(event, TeleportEvent):
        zone = ZoneFactory.getZone(event.newZoneName)
        zoneController.setupZone(zone, event.row, event.column)
    else:
        PerformCoreEvent(event, zoneController)
def PerformEvent(event, zoneController):
    """ Perform the given event """
    if isinstance(event, BattleEvent):
        zoneController.runController(
            BattleController(zoneController.playerPerson.trainer,
                             event.trainerToFight))
    elif isinstance(event, TeleportEvent):
        zone = ZoneFactory.getZone(event.newZoneName)
        zoneController.setupZone(zone, event.row, event.column)
    else:
        PerformCoreEvent(event, zoneController)
Beispiel #5
0
 def playStory(self, entry):
     """ Play the Story Mode """
     zone = ZoneFactory.getZone(self.currentPlayer.zone)
     self.runController(
         ZoneController(self.currentPlayer.trainer, zone,
                        self.currentPlayer.row, self.currentPlayer.column))
 def playStory(self, entry):
     """ Play the Story Mode """
     zone = ZoneFactory.getZone(self.currentPlayer.zone)
     self.runController(
         ZoneController(self.currentPlayer.trainer, zone, self.currentPlayer.row, self.currentPlayer.column)
     )