You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
910 B
32 lines
910 B
2 years ago
|
from datetime import datetime
|
||
2 years ago
|
from .object import Object
|
||
2 years ago
|
|
||
2 years ago
|
class Pokemon(Object):
|
||
2 years ago
|
def __init__(self, name, number, location,
|
||
|
cp, level, attack, defense, hp,
|
||
|
iv, shiny, start_time, end_time,
|
||
|
country):
|
||
|
self.name = name
|
||
|
self.number = number
|
||
|
self.location = location
|
||
|
self.cp = cp
|
||
|
self.level = level
|
||
|
self.attack = attack
|
||
|
self.defense = defense
|
||
|
self.hp = hp
|
||
|
self.iv = iv
|
||
|
self.shiny = shiny
|
||
|
self.start_time = start_time
|
||
|
self.end_time = end_time
|
||
|
self.country = country
|
||
|
|
||
|
def is_dispawned(self):
|
||
|
if datetime().now() > end_time:
|
||
|
return True
|
||
|
return False
|
||
|
|
||
2 years ago
|
def __repr__(self):
|
||
|
return f"{self.name}: {self.cp}, {self.level}, {self.attack}-{self.defense}-{self.hp}, shinable: {self.shiny}, end: {self.end_time}"
|
||
|
|
||
2 years ago
|
|
||
|
|