diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 91c4552..89962ca 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -759,6 +759,10 @@ class Citizen(classes.CitizenAPI): return hits, err, damage + def deploy_bomb(self, battle_id: int, bomb_id: int): + r = self._post_military_deploy_bomb(battle_id, bomb_id).json() + return not r.get('error') + def work_ot(self): # I"m not checking for 1h cooldown. Beware of nightshift work, if calling more than once every 60min self.update_job_info() diff --git a/erepublik/classes.py b/erepublik/classes.py index 302e0e0..0f3bae2 100644 --- a/erepublik/classes.py +++ b/erepublik/classes.py @@ -752,6 +752,10 @@ Class for unifying eRepublik known endpoints and their required/optional paramet type="damage", leftPage=1, rightPage=1, _token=self.token) return self.post("{}/military/battle-console".format(self.url, battle_id), data=data) + def _post_military_deploy_bomb(self, battle_id: int, bomb_id: int) -> Response: + data = dict(battleId=battle_id, bombId=bomb_id, _token=self.token) + return self.post("{}/military/deploy-bomb".format(self.url), data=data) + def _post_military_fight_air(self, battle_id: int, side_id: int) -> Response: data = dict(sideId=side_id, battleId=battle_id, _token=self.token) return self.post("{}/military/fight-shoooot/{}".format(self.url, battle_id), data=data)