Skip to content

Commit

Permalink
feat(#267): Made items actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Nov 13, 2024
1 parent 177b018 commit a40438b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pokete_classes/fight/items/balls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, chance:int, name: str):
self.chance = chance
self.name = name

def use(self, fightmap: FightMap, obj, enem:Provider) -> RoundContinuation:
def use(self, fightmap: FightMap, obj:Provider, enem:Provider) -> RoundContinuation:
"""Throws a ball
ARGS:
obj: The players Poke object
Expand Down
5 changes: 5 additions & 0 deletions pokete_classes/fight/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def index_conf(self):
i for i, poke in enumerate(self.pokes) if poke.hp > 0
)

def remove_item(self, name:str):
"""Removes and item from the providers inventory
Accept for the player implementation that shouldnt do anything"""
return

@abstractmethod
def get_decision(
self, ctx: Context, fightmap: "FightMap",
Expand Down
3 changes: 3 additions & 0 deletions pokete_classes/multiplayer/remote_fight/figure_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def caught_pokes(self):
def map(self):
return self.figure.map

def remove_item(self, name:str):
self.figure.remove_item(name)

def greet(self, fightmap: FightMap):
return super().greet(fightmap)

Expand Down

0 comments on commit a40438b

Please sign in to comment.