def immune(self):
        """ Test an effect that is immune will result in a miss """
        status, message = StatusFactory.buildStatusFromAbbr("PAR")
        self.pkmn.setStatus(status)

        effect = ApplyStatusDelegate(self.parent, "PAR", 1)
        self.buildDelegate(effect)
        assert self.delegate.immune(self.pkmn, None), "Should be immune"
Example #2
0
 def immune(self):
     """ Test an effect that is immune will result in a miss """
     status, message = StatusFactory.buildStatusFromAbbr("PAR")
     self.pkmn.setStatus(status)
     
     effect = ApplyStatusDelegate(self.parent, "PAR", 1)
     self.buildDelegate(effect)
     assert self.delegate.immune(self.pkmn, None), "Should be immune"
 def faint(self):
     """ Makes the Pkmn faint """
     messages = []
     
     self.setCurrHP(0)
     status, msg = StatusFactory.buildStatusFromAbbr("FNT")
     self.setStatus(status)
     
     messages.append(self.getHeader() + msg)
     return messages
Example #4
0
    def applyStatus(self, pkmn):
        """ Applies the given status to the given Pokemon """
        status, message = StatusFactory.buildStatusFromAbbr(self.status)

        if self.checkImmune(status, pkmn):
            return []
        if self.checkStatusAlready(pkmn):
            return []

        pkmn.setStatus(status)
        messages = [pkmn.getHeader() + message]

        message = pkmn.getAbility().onStatus(pkmn, status)
        messages = messages + message

        return messages
    def applyStatus(self, pkmn):
        """ Applies the given status to the given Pokemon """
        status, message = StatusFactory.buildStatusFromAbbr(self.status)

        if self.checkImmune(status, pkmn):
            return []
        if self.checkStatusAlready(pkmn):
            return []

        pkmn.setStatus(status)
        messages = [pkmn.getHeader() + message]

        message = pkmn.getAbility().onStatus(pkmn, status)
        messages = messages + message

        return messages
Example #6
0
    def immune(self, user, target):
        """ Checks if the target is immune to the status effect """
        status, message = StatusFactory.buildStatusFromAbbr(self.status)
        pkmn = self.getEffectedPokemon(user, target)

        return self.checkImmune(status, pkmn) or self.checkStatusAlready(pkmn)
    def immune(self, user, target):
        """ Checks if the target is immune to the status effect """
        status, message = StatusFactory.buildStatusFromAbbr(self.status)
        pkmn = self.getEffectedPokemon(user, target)

        return self.checkImmune(status, pkmn) or self.checkStatusAlready(pkmn)