fixing bot, Whisky & Rissa
Co-authored-by: Alberto Xamin <alberto@xamin.it>
This commit is contained in:
parent
f7a527fcaf
commit
3bb7db8e33
@ -219,7 +219,7 @@ class Player:
|
|||||||
self.draw('')
|
self.draw('')
|
||||||
elif self.pending_action == PendingAction.PLAY:
|
elif self.pending_action == PendingAction.PLAY:
|
||||||
equippables = [c for c in self.hand if (c.is_equipment or c.usable_next_turn) and not isinstance(c, cs.Prigione) and not any([type(c) == type(x) for x in self.equipment])]
|
equippables = [c for c in self.hand if (c.is_equipment or c.usable_next_turn) and not isinstance(c, cs.Prigione) and not any([type(c) == type(x) for x in self.equipment])]
|
||||||
misc = [c for c in self.hand if (isinstance(c, cs.WellsFargo) or isinstance(c, cs.Indiani) or isinstance(c, cs.Gatling) or isinstance(c, cs.Diligenza) or isinstance(c, cs.Emporio) or (isinstance(c, cs.Birra) and self.lives < self.max_lives and not self.game.check_event(ceh.IlReverendo)))
|
misc = [c for c in self.hand if (isinstance(c, cs.WellsFargo) or isinstance(c, cs.Indiani) or isinstance(c, cs.Gatling) or isinstance(c, cs.Diligenza) or isinstance(c, cs.Emporio) or (isinstance(c, cs.Birra) and self.lives < self.max_lives and not self.game.check_event(ceh.IlReverendo)) or (c.need_with and len(self.hand) > 1 and not c.need_target and not (isinstance(c, csd.Whisky) and self.lives == self.max_lives)))
|
||||||
and not (not c.can_be_used_now and self.game.check_event(ce.IlGiudice))]
|
and not (not c.can_be_used_now and self.game.check_event(ce.IlGiudice))]
|
||||||
need_target = [c for c in self.hand if c.need_target and c.can_be_used_now and not (c.need_with and len(self.hand) < 2) and not (
|
need_target = [c for c in self.hand if c.need_target and c.can_be_used_now and not (c.need_with and len(self.hand) < 2) and not (
|
||||||
(self.game.check_event(ceh.Sermone) or self.has_played_bang and not (any([isinstance(c, cs.Volcanic) for c in self.equipment]) and type(c) == type(cs.Bang)
|
(self.game.check_event(ceh.Sermone) or self.has_played_bang and not (any([isinstance(c, cs.Volcanic) for c in self.equipment]) and type(c) == type(cs.Bang)
|
||||||
@ -231,7 +231,9 @@ class Player:
|
|||||||
return
|
return
|
||||||
elif len(misc) > 0:
|
elif len(misc) > 0:
|
||||||
for c in misc:
|
for c in misc:
|
||||||
if self.play_card(self.hand.index(c)):
|
if c.need_with and self.play_card(self.hand.index(c), _with=sample([j for j in range(len(self.hand)) if j != self.hand.index(c)], 1)[0]):
|
||||||
|
return
|
||||||
|
elif self.play_card(self.hand.index(c)):
|
||||||
return
|
return
|
||||||
elif len(need_target) > 0:
|
elif len(need_target) > 0:
|
||||||
for c in need_target:
|
for c in need_target:
|
||||||
|
Loading…
Reference in New Issue
Block a user