def upon_turn_end(self, entity, gamestate): chance = self.frequency / 100 go = rng.chance(chance) if rng.chance(chance) and self.combatleft <= 0: entity.position += rng.direction().to_normal_coord() self.combatleft -= 1
def upon_turn_end(self, entity, gamestate): if self.fleeleft > 0: entity.position += rng.direction().to_normal_coord() self.fleeleft -= 1