fix johnpain, bigspencer and tests
This commit is contained in:
parent
499763ffca
commit
e4f9cfc886
@ -86,7 +86,7 @@ class Deck:
|
|||||||
card = self.cards.pop(0)
|
card = self.cards.pop(0)
|
||||||
jpain = None
|
jpain = None
|
||||||
for p in self.game.players:
|
for p in self.game.players:
|
||||||
if isinstance(p, chw.JohnPain) and len(p.hand) < 6:
|
if p.character.check(self.game, chw.JohnPain) and len(p.hand) < 6:
|
||||||
jpain = p
|
jpain = p
|
||||||
break
|
break
|
||||||
if jpain:
|
if jpain:
|
||||||
|
@ -1133,7 +1133,7 @@ class Player:
|
|||||||
self.expected_response = self.game.deck.mancato_cards.copy()
|
self.expected_response = self.game.deck.mancato_cards.copy()
|
||||||
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
||||||
self.expected_response.append(cs.Bang(0, 0).name)
|
self.expected_response.append(cs.Bang(0, 0).name)
|
||||||
if self.character.check(chw.BigSpencer):
|
if self.character.check(self.game, chw.BigSpencer):
|
||||||
self.expected_response = []
|
self.expected_response = []
|
||||||
self.on_failed_response_cb = self.take_damage_response
|
self.on_failed_response_cb = self.take_damage_response
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
@ -1165,7 +1165,7 @@ class Player:
|
|||||||
self.expected_response = self.game.deck.mancato_cards.copy()
|
self.expected_response = self.game.deck.mancato_cards.copy()
|
||||||
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
||||||
self.expected_response.append(cs.Bang(0, 0).name)
|
self.expected_response.append(cs.Bang(0, 0).name)
|
||||||
if self.character.check(chw.BigSpencer):
|
if self.character.check(self.game, chw.BigSpencer):
|
||||||
self.expected_response = []
|
self.expected_response = []
|
||||||
self.on_failed_response_cb = self.take_no_damage_response
|
self.on_failed_response_cb = self.take_no_damage_response
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
@ -1263,7 +1263,7 @@ class Player:
|
|||||||
self.expected_response = self.game.deck.mancato_cards_not_green_or_blue.copy()
|
self.expected_response = self.game.deck.mancato_cards_not_green_or_blue.copy()
|
||||||
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
||||||
self.expected_response.append(cs.Bang(0, 0).name)
|
self.expected_response.append(cs.Bang(0, 0).name)
|
||||||
if self.character.check(chw.BigSpencer):
|
if self.character.check(self.game, chw.BigSpencer):
|
||||||
self.expected_response = []
|
self.expected_response = []
|
||||||
if self.can_escape(card_name, with_mancato=False):
|
if self.can_escape(card_name, with_mancato=False):
|
||||||
self.expected_response.append(tvosc.Fuga(0, 0).name)
|
self.expected_response.append(tvosc.Fuga(0, 0).name)
|
||||||
|
@ -52,9 +52,9 @@ def test_helena_zontero():
|
|||||||
assert roles != roles2
|
assert roles != roles2
|
||||||
|
|
||||||
# test LadyRosaDelTexas
|
# test LadyRosaDelTexas
|
||||||
def test_miss_suzanna():
|
def test_LadyRosaDelTexas():
|
||||||
g = started_game(['wild_west_show'], 4)
|
g = started_game(['wild_west_show'], 4)
|
||||||
set_events(g, [None, LadyRosaDelTexas()])
|
set_events(g, [LadyRosaDelTexas()])
|
||||||
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
|
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
|
||||||
t = g.turn
|
t = g.turn
|
||||||
p.draw('event')
|
p.draw('event')
|
||||||
@ -79,9 +79,9 @@ def test_miss_suzanna():
|
|||||||
|
|
||||||
|
|
||||||
# test RegolamentoDiConti
|
# test RegolamentoDiConti
|
||||||
def test_miss_suzanna():
|
def test_RegolamentoDiConti():
|
||||||
g = started_game(['wild_west_show'], 4)
|
g = started_game(['wild_west_show'], 4)
|
||||||
set_events(g, [None, RegolamentoDiConti()])
|
set_events(g, [RegolamentoDiConti()])
|
||||||
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
|
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
|
||||||
p.draw('event')
|
p.draw('event')
|
||||||
assert p.pending_action == PendingAction.CHOOSE
|
assert p.pending_action == PendingAction.CHOOSE
|
||||||
@ -89,7 +89,7 @@ def test_miss_suzanna():
|
|||||||
|
|
||||||
|
|
||||||
# test WildWestShow
|
# test WildWestShow
|
||||||
def test_miss_suzanna():
|
def test_WildWestShow():
|
||||||
g = started_game(['wild_west_show'], 8)
|
g = started_game(['wild_west_show'], 8)
|
||||||
set_events(g, [None, WildWestShow()])
|
set_events(g, [None, WildWestShow()])
|
||||||
for i in range(len(g.players)):
|
for i in range(len(g.players)):
|
||||||
|
Loading…
Reference in New Issue
Block a user