wheeloffortune bugfix
This commit is contained in:
parent
6f4bc65d1b
commit
ad24338f4d
@ -683,9 +683,8 @@ class CitizenAnniversary(BaseCitizen):
|
|||||||
_write_spin_data(current_cost, r.get('account'),
|
_write_spin_data(current_cost, r.get('account'),
|
||||||
base.get('prizes').get('prizes').get(str(r.get('result'))).get('tooltip'))
|
base.get('prizes').get('prizes').get(str(r.get('result'))).get('tooltip'))
|
||||||
else:
|
else:
|
||||||
is_cost: Callable[[], bool] = lambda: (max_cost != current_cost if max_cost else True)
|
while max_cost >= current_cost if max_cost else spin_count >= current_count if spin_count else False:
|
||||||
is_count: Callable[[], bool] = lambda: (spin_count != current_count if spin_count else True)
|
return
|
||||||
while is_cost() or is_count():
|
|
||||||
r = self._spin_wheel_of_loosing(current_cost)
|
r = self._spin_wheel_of_loosing(current_cost)
|
||||||
current_count += 1
|
current_count += 1
|
||||||
current_cost = r.get('cost')
|
current_cost = r.get('cost')
|
||||||
@ -694,8 +693,8 @@ class CitizenAnniversary(BaseCitizen):
|
|||||||
|
|
||||||
def _spin_wheel_of_loosing(self, current_cost: int) -> Dict[str, Any]:
|
def _spin_wheel_of_loosing(self, current_cost: int) -> Dict[str, Any]:
|
||||||
r = self._post_main_wheel_of_fortune_spin(current_cost).json()
|
r = self._post_main_wheel_of_fortune_spin(current_cost).json()
|
||||||
self.details.cc = r.get('account')
|
self.details.cc = float(Decimal(r.get('account')))
|
||||||
return r.get('result')
|
return r
|
||||||
|
|
||||||
|
|
||||||
class CitizenTravel(BaseCitizen):
|
class CitizenTravel(BaseCitizen):
|
||||||
|
@ -451,24 +451,25 @@ class Energy:
|
|||||||
|
|
||||||
|
|
||||||
class Details:
|
class Details:
|
||||||
xp = 0
|
xp: int = 0
|
||||||
cc = 0
|
cc: float = 0
|
||||||
pp = 0
|
pp: int = 0
|
||||||
pin = None
|
pin: str = None
|
||||||
gold = 0
|
gold: float = 0
|
||||||
next_pp: List[int] = None
|
next_pp: List[int] = None
|
||||||
citizen_id = 0
|
citizen_id: int = 0
|
||||||
citizenship: constants.Country
|
citizenship: constants.Country
|
||||||
current_region = 0
|
current_region: int = 0
|
||||||
current_country: constants.Country
|
current_country: constants.Country
|
||||||
residence_region = 0
|
residence_region: int = 0
|
||||||
residence_country: constants.Country
|
residence_country: constants.Country
|
||||||
daily_task_done = False
|
daily_task_done: bool = False
|
||||||
daily_task_reward = False
|
daily_task_reward: bool = False
|
||||||
mayhem_skills = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, }
|
mayhem_skills: Dict[int, int]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.next_pp = []
|
self.next_pp = []
|
||||||
|
self.mayhem_skills = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def xp_till_level_up(self):
|
def xp_till_level_up(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user