@Override public boolean apply(Game game, Ability source) { sacrificed = super.apply(game, source); if (sacrificed) { new CreateTokenEffect(new MaritLageToken()).apply(game, source); } return sacrificed; }
@Override public boolean apply(Game game, Ability source) { sacrificed = super.apply(game, source); if (sacrificed) { Permanent toDestroy; for (UUID target : getTargetPointer().getTargets(game, source)) { toDestroy = game.getPermanent(target); if (toDestroy != null) { toDestroy.destroy(source.getId(), game, false); } } } return sacrificed; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int result = controller.rollDice(game, 6); if (result == 1) { new SacrificeSourceEffect().apply(game, source); return new DamageEverythingEffect(3).apply(game, source); } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (controller != null && permanent != null) { if (controller.flipCoin(source, game, true)) { return true; } else { new SacrificeSourceEffect().apply(game, source); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int result = controller.rollDice(game, 6); if (result == 6) { new SacrificeSourceEffect().apply(game, source); return (new CreateTokenEffect(new GiantChickenToken(), 1)).apply(game, source); } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (controller != null && permanent != null) { if (controller.flipCoin(source, game, true)) { new ReturnToHandSourceEffect().apply(game, source); return true; } else { new SacrificeSourceEffect().apply(game, source); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { boolean targetChosen = false; Player player = game.getPlayer(source.getControllerId()); TargetPermanent target = new TargetPermanent(1, 1, filter, false); if (player != null && target.canChoose(player.getId(), game)) { player.choose(Outcome.Sacrifice, target, source.getSourceId(), game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if ( permanent != null ) { targetChosen = true; permanent.moveToZone(Zone.HAND, this.getId(), game, false); } } if ( !targetChosen ) { new SacrificeSourceEffect().apply(game, source); } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { boolean targetChosen = false; TargetPermanent target = new TargetPermanent(1, 1, filter, true); if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return another creature you control to its owner's hand?", source, game)) { controller.chooseTarget(Outcome.ReturnToHand, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { targetChosen = true; permanent.moveToZone(Zone.HAND, this.getId(), game, false); } } if (!targetChosen) { new SacrificeSourceEffect().apply(game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { boolean targetChosen = false; TargetPermanent target = new TargetPermanent(1, 1, StaticFilters.FILTER_ENCHANTMENT_PERMANENT, true); if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an enchantment to its owner's hand?", source, game)) { controller.chooseTarget(Outcome.Sacrifice, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { targetChosen = true; permanent.moveToZone(Zone.HAND, this.getId(), game, false); } } if (!targetChosen) { new SacrificeSourceEffect().apply(game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { boolean targetChosen = false; TargetPermanent target = new TargetPermanent(1, 1, filter, true); if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an artifact you control to its owner's hand?", source, game)) { controller.chooseTarget(Outcome.Sacrifice, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { targetChosen = true; permanent.moveToZone(Zone.HAND, this.getId(), game, false); } } if (!targetChosen) { new SacrificeSourceEffect().apply(game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { boolean targetChosen = false; TargetPermanent target = new TargetPermanent(1, 1, filter, true); if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return another creature you control to its owner's hand?", source, game)) { controller.chooseTarget(Outcome.ReturnToHand, target, source, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { targetChosen = true; permanent.moveToZone(Zone.HAND, this.getId(), game, false); } } if (!targetChosen) { new SacrificeSourceEffect().apply(game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player activePlayer = game.getPlayer(game.getActivePlayerId()); if (activePlayer == null) { return false; } if (activePlayer.chooseUse(Outcome.Sacrifice, "Sacrifice a creature?", source, game)) { Cost cost = new SacrificeTargetCost(new TargetControlledCreaturePermanent()); if (cost.canPay(source, source.getSourceId(), activePlayer.getId(), game) && cost.pay(source, game, source.getSourceId(), activePlayer.getId(), true)) { return true; } } activePlayer.loseLife(5, game, false); return new SacrificeSourceEffect().apply(game, source); } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int carnageCount = 0; int homageCount = 0; for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { if (player.chooseUse(Outcome.DestroyPermanent, "Choose carnage?", source, game)) { carnageCount++; game.informPlayers(player.getLogName() + " has voted for carnage"); } else { homageCount++; game.informPlayers(player.getLogName() + " has voted for homage"); } } } if (carnageCount > homageCount) { new SacrificeSourceEffect().apply(game, source); new DestroyAllEffect(new FilterNonlandPermanent()).apply(game, source); } else { controller.drawCards(1, game); } return true; } return false; } }