def draft(self):
     for count in range(0, 6):
         if count < self.numberLeftInRound:
             self.pokemonAvailable[str(
                 self.pokemonCoordsSouth[count])] = battle.pokemon(
                     r.choice(pokemonInDraft), r.randint(50, 60))
         elif count >= self.numberLeftInRound:
             self.pokemonAvailable[str(
                 self.pokemonCoordsSouth[count])] = None
     q = battle.serviceQueue()
     style = r.choice(self.platformMovementStyles)
     q.add([style, genFunc(self.movePlatforms, 'off', style)])
     q.add([
         self.pokemonCoordsSouth[self.numberLeftInRound - 1],
         self.processPokemonSendOut
     ])  ##so we do it after the last one to finish
     q.add([
         False,
         genFunc(
             self.runText, 'You have ' + str(self.roundsLeft) +
             ' rounds left, and ' + str(self.numberLeftInRound) +
             ' Pokemon left to pick in this round.')
     ])
     q.add(['activate-buttons', self.activateButtons])
     self.executeTurn(q)
Exemple #2
0
 def firstRoundOfDraft(self):
     for count in range(0, 6):
         self.pokemonAvailable[str(
             self.pokemonCoordsSouth[count]
         )] = battle.pokemon(
             r.choice(pokemonInDraft), r.randint(50, 60)
         )  ##generate a random pack. the stats/moves are already generated randomly within the pokemon class
     q = battle.serviceQueue()
     q.add([
         'columnSeparation',
         genFunc(self.movePlatforms, 'on', 'columnSeparation', False)
     ])
     q.add([
         self.pokemonCoordsSouth[self.numberLeftInRound - 1],
         self.processPokemonSendOut
     ])
     if self.roundsLeft > 1:  ##this is to take out the s of rounds if we aren't taking  about a plural
         q.add([
             False,
             genFunc(
                 self.runText, 'You have ' + str(self.roundsLeft) +
                 ' rounds left, and ' + str(self.numberLeftInRound) +
                 ' Pokemon left to pick in this round.')
         ])
     else:
         q.add([
             False,
             genFunc(
                 self.runText, 'You have ' + str(self.roundsLeft) +
                 ' round left, and ' + str(self.numberLeftInRound) +
                 ' Pokemon left to pick in this round.')
         ])
     q.add(['activate-buttons', self.activateButtons])
     self.executeTurn(q)
 def selectPokemon(self,coords):
     self.deactivateButtons()
     self.pokemonChosen.append(self.pokemonAvailable[str(coords)])
     q = battle.serviceQueue()
     q.add([False,genFunc(self.runText,'You selected ' + self.pokemonAvailable[str(coords)].name+'!')])
     k = genFunc(self.processPokemonRetrieval,coords)
     q.add([self.pokemonCoordsSouth[self.numberLeftInRound-1],k])
     self.numberLeftInRound -= 1
     if self.numberLeftInRound == 0:
         self.roundsLeft -= 1
         if self.roundsLeft == 0: ##need to program started battle sequence
             return
         self.numberLeftInRound = 6
     q.add([False,self.draft])
     self.executeTurn(q)
Exemple #4
0
 def selectPokemon(self, coords):
     self.deactivateButtons()
     self.pokemonChosen.append(self.pokemonAvailable[str(coords)])
     q = battle.serviceQueue()
     q.add([
         False,
         genFunc(
             self.runText, 'You selected ' +
             self.pokemonAvailable[str(coords)].name + '!')
     ])
     k = genFunc(self.switchEnemy, 0, 0, coords, True)
     q.add(
         [str(coords), k]
     )  ##we retrieve the one that was chosen so that the user can tell their choice has been registered. also looks pretty with the fade out on the next line.
     k = genFunc(self.fadeOutChoice, coords)
     q.add(['fade-out-choice',
            k])  ##this is a nice anim, idk. I might enjoy it too much.
     k = genFunc(self.processPokemonRetrieval, coords)
     if self.pokemonCoordsSouth[
             self.numberLeftInRound -
             1] == coords:  ##the list form of [funcID,func] will finish immediately if we call it on the one we've already retrieved
         if self.numberLeftInRound == 1:  ##calling self.pokemonCoordsSouth[1-2] will spit an error as we don't have a pokemon sent out for the -1th space (i.e. 6th space)
             pass
         else:
             q.add([self.pokemonCoordsSouth[self.numberLeftInRound - 2], k])
     else:
         q.add([self.pokemonCoordsSouth[self.numberLeftInRound - 1],
                k])  ##or it's not the last one so we don't need to worry
     self.numberLeftInRound -= 1  ##so we need to tick down the numnber left in round and our num of rounds if applicable
     if self.numberLeftInRound == 0:
         self.roundsLeft -= 1
         if self.roundsLeft == 0:  ##need to program started battle sequence
             return  ## and we've finished the draft if we've gotten here as we've got 0 rounds left and 1 pokemon left in the round.
         self.numberLeftInRound = 6
     q.add([False, self.draft])
     self.executeTurn(q)
Exemple #5
0
 def draft(self):
     for count in range(0, 6):
         if count < self.numberLeftInRound:
             self.pokemonAvailable[str(
                 self.pokemonCoordsSouth[count]
             )] = battle.pokemon(
                 r.choice(pokemonInDraft), r.randint(50, 60)
             )  ##generate a random pack. the stats/moves are already generated randomly within the pokemon class
         elif count >= self.numberLeftInRound:  ##packs go from 6->5->4 etc. so we need to fill the empty spaces with None (to tell program later what's going on)
             self.pokemonAvailable[str(
                 self.pokemonCoordsSouth[count])] = None
     q = battle.serviceQueue()
     style = r.choice(self.platformMovementStyles)
     q.add([style, genFunc(self.movePlatforms, 'off', style)])
     q.add([
         self.pokemonCoordsSouth[self.numberLeftInRound - 1],
         self.processPokemonSendOut
     ])  ##so we do it after the last one to finish
     if self.roundsLeft > 1:  ##this is to take out the s of rounds if we aren't taking  about a plural
         q.add([
             False,
             genFunc(
                 self.runText, 'You have ' + str(self.roundsLeft) +
                 ' rounds left, and ' + str(self.numberLeftInRound) +
                 ' Pokemon left to pick in this round.')
         ])
     else:
         q.add([
             False,
             genFunc(
                 self.runText, 'You have ' + str(self.roundsLeft) +
                 ' round left, and ' + str(self.numberLeftInRound) +
                 ' Pokemon left to pick in this round.')
         ])
     q.add(['activate-buttons', self.activateButtons])
     self.executeTurn(q)