Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
233d8d83f8 | |||
ec62d90aa2 | |||
0c433a56da | |||
ad24338f4d |
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
__author__ = """Eriks Karls"""
|
__author__ = """Eriks Karls"""
|
||||||
__email__ = 'eriks@72.lv'
|
__email__ = 'eriks@72.lv'
|
||||||
__version__ = '0.21.5.3'
|
__version__ = '0.21.5.5'
|
||||||
|
|
||||||
from erepublik import classes, utils, constants
|
from erepublik import classes, utils, constants
|
||||||
from erepublik.citizen import Citizen
|
from erepublik.citizen import Citizen
|
||||||
|
@ -683,9 +683,7 @@ 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)
|
|
||||||
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 +692,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):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.21.5.3
|
current_version = 0.21.5.5
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
||||||
|
2
setup.py
2
setup.py
@ -43,6 +43,6 @@ setup(
|
|||||||
test_suite='tests',
|
test_suite='tests',
|
||||||
tests_require=test_requirements,
|
tests_require=test_requirements,
|
||||||
url='https://github.com/eeriks/erepublik/',
|
url='https://github.com/eeriks/erepublik/',
|
||||||
version='0.21.5.3',
|
version='0.21.5.5',
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user