def effects(controller, source): yield cost yield NoTarget() source = source.move_to(controller.battlefield) yield source.abilities.add(haste()) # Exile at end of turn @source.delayed def ability(): def condition(source): return str(source.zone) == "battlefield" def effects(controller, source): '''Exile this from the game at end of turn''' yield NoTarget() source.move_to("exile") yield return PhaseTrigger(EndTurnStepEvent(), condition), effects # Exile if it leaves play leave_battlefield_condition = lambda self, zone, position="top": str( self.zone) == "battlefield" def move_to(self, zone, position="top"): return self.move_to("exile") until_end_of_turn( do_replace(source, "move_to", move_to, condition=leave_battlefield_condition, msg="%s - exile from game" % source.name)) yield
def effects(controller, source): yield cost yield NoTarget() source = source.move_to(controller.battlefield) yield source.abilities.add(haste()) # Exile at end of turn @source.delayed def ability(): def condition(source): return str(source.zone) == "battlefield" def effects(controller, source): '''Exile this from the game at end of turn''' yield NoTarget() source.move_to("exile") yield return PhaseTrigger(EndTurnStepEvent(), condition), effects # Exile if it leaves play leave_battlefield_condition = lambda self, zone, position="top": str(self.zone) == "battlefield" def move_to(self, zone, position="top"): return self.move_to("exile") until_end_of_turn(do_replace(source, "move_to", move_to, condition=leave_battlefield_condition, msg="%s - exile from game"%source.name)) yield
def regenerate(target, txt="Regenerate", condition=None): def canDestroy(self): if self.canBeTapped(): self.tap() if isCreature(self): self.clearDamage() self.clearCombatState() # expire it canDestroy.expire() #self.send(RegenerationEvent()) return False return until_end_of_turn(do_replace(target, "canDestroy", canDestroy, msg=txt, condition=condition))
def effects(controller, source, sender): yield NoTarget() until_end_of_turn(sender.augment_power_toughness(-1, -1)) yield
def effects(controller, source): yield NoTarget() value = int(value) until_end_of_turn(source.augment_power_toughness(value, value)) yield
def effects(controller, source, attackers): yield NoTarget() until_end_of_turn(attackers[0].augment_power_toughness(1, 1)) yield