add Lady Rosa del Texas

This commit is contained in:
Alberto Xamin 2023-03-05 18:08:01 +00:00
parent e33c2c3c48
commit 3b568c987f
No known key found for this signature in database
GPG Key ID: 5ABFCD8A22EA6F5D
3 changed files with 15 additions and 2 deletions

View File

@ -83,7 +83,7 @@ def get_all_events(rng=random):
DarlingValentine(), DarlingValentine(),
# DorothyRage(), # DorothyRage(),
HelenaZontero(), HelenaZontero(),
# LadyRosaDelTexas(), LadyRosaDelTexas(),
MissSusanna(), MissSusanna(),
RegolamentoDiConti(), RegolamentoDiConti(),
Sacagaway(), Sacagaway(),

View File

@ -525,6 +525,13 @@ class Player:
self.pending_action = PendingAction.CHOOSE self.pending_action = PendingAction.CHOOSE
self.choose_text = 'choose_play_as_bang' self.choose_text = 'choose_play_as_bang'
self.notify_self() self.notify_self()
elif self.is_my_turn and self.pending_action == PendingAction.PLAY and pile == 'event' and self.game.check_event(cew.LadyRosaDelTexas):
nextp = self.game.next_player()
i, j = self.game.players_map[self.name], self.game.players_map[nextp.name]
self.game.players[i], self.game.players[j] = nextp, self
self.game.players_map[self.name], self.game.players_map[nextp.name] = j, i
self.game.turn = j
self.game.notify_all()
elif self.is_my_turn and self.pending_action == PendingAction.PLAY and pile == 'event' and self.game.check_event(ce.Rimbalzo) and any((c.name == cs.Bang(0,0).name for c in self.hand)): elif self.is_my_turn and self.pending_action == PendingAction.PLAY and pile == 'event' and self.game.check_event(ce.Rimbalzo) and any((c.name == cs.Bang(0,0).name for c in self.hand)):
self.available_cards = [{ self.available_cards = [{
'name': p.name, 'name': p.name,

View File

@ -52,7 +52,13 @@ def test_helena_zontero():
assert roles != roles2 assert roles != roles2
# test LadyRosaDelTexas # test LadyRosaDelTexas
def test_miss_suzanna():
g = started_game(['wild_west_show'], 4)
set_events(g, [None, LadyRosaDelTexas()])
p = current_player_with_cards(g, [Card(0,'card',0)]*4)
t = g.turn
p.draw('event')
assert g.turn == t+1
# test MissSusanna # test MissSusanna
def test_miss_suzanna(): def test_miss_suzanna():