@@ -297,14 +297,14 @@ def is_playable(self):
297
297
return False
298
298
return True
299
299
300
- def play (self , target = None , choose = None ):
300
+ def play (self , target = None , index = None , choose = None ):
301
301
"""
302
302
Queue a Play action on the card.
303
303
"""
304
304
if choose :
305
305
# This is a helper so we can do keeper.play(choose=id)
306
306
# instead of having to mess with keeper.choose_cards.filter(...)
307
- return self .choose_cards .filter (id = choose )[0 ].play (target = target )
307
+ return self .choose_cards .filter (id = choose )[0 ].play (target = target , index = index )
308
308
if self .has_target ():
309
309
if not target :
310
310
raise InvalidAction ("%r requires a target to play." % (self ))
@@ -314,7 +314,7 @@ def play(self, target=None, choose=None):
314
314
raise InvalidAction ("Do not play %r! Play one of its Choose Cards instead" % (self ))
315
315
if not self .is_playable ():
316
316
raise InvalidAction ("%r isn't playable." % (self ))
317
- self .game .queue_actions (self .controller , [Play (self , target )])
317
+ self .game .queue_actions (self .controller , [Play (self , target , index )])
318
318
return self
319
319
320
320
def shuffle_into_deck (self ):
@@ -547,6 +547,7 @@ def __init__(self, data):
547
547
self .enrage = False
548
548
self .poisonous = False
549
549
self .silenced = False
550
+ self ._summon_index = None
550
551
super ().__init__ (data )
551
552
552
553
@property
@@ -603,7 +604,10 @@ def update_scripts(self):
603
604
604
605
def _set_zone (self , value ):
605
606
if value == Zone .PLAY :
606
- self .controller .field .append (self )
607
+ if self ._summon_index is not None :
608
+ self .controller .field .insert (self ._summon_index , self )
609
+ else :
610
+ self .controller .field .append (self )
607
611
608
612
if self .zone == Zone .PLAY :
609
613
self .log ("%r is removed from the field" , self )
0 commit comments