check for boundaries in scrap

This commit is contained in:
Alberto Xamin 2023-02-01 10:13:45 +00:00
parent c1d3eaea86
commit bfb65e3e33

View File

@ -1415,6 +1415,7 @@ class Player:
return ch_vis_mod + covers
def scrap(self, card_index):
if len(self.hand) == 0 or len(self.hand) <= card_index: return self.notify_self()
if self.is_my_turn or self.character.check(self.game, chars.SidKetchum):
self.scrapped_cards += 1
card = self.hand.pop(card_index)