replace parameter for single parameter closure with 'it'
parent
3e7884f212
commit
971c286657
|
@ -14,10 +14,9 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicNameTargetFilter(
|
||||
MagicTargetFilterFactory.ENCHANTMENT,
|
||||
targetPermanent.getName()
|
||||
it.getName()
|
||||
);
|
||||
final Collection<MagicPermanent> targets = game.filterPermanents(event.getPlayer(),targetFilter);
|
||||
for (final MagicPermanent permanent : targets) {
|
||||
|
|
|
@ -14,10 +14,9 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicNameTargetFilter(
|
||||
MagicTargetFilterFactory.ARTIFACT,
|
||||
targetPermanent.getName()
|
||||
it.getName()
|
||||
);
|
||||
final Collection<MagicPermanent> targets = game.filterPermanents(event.getPlayer(),targetFilter);
|
||||
for (final MagicPermanent permanent : targets) {
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicNameTargetFilter(
|
||||
MagicTargetFilterFactory.NONLAND_PERMANENT,
|
||||
targetPermanent.getName()
|
||||
it.getName()
|
||||
);
|
||||
final Collection<MagicPermanent> targets = game.filterPermanents(event.getPlayer(),targetFilter);
|
||||
for (final MagicPermanent target : targets) {
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
game.doAction(new MagicChangeTurnPTAction(targetPermanent,-5,-5));
|
||||
game.doAction(new MagicChangeTurnPTAction(it,-5,-5));
|
||||
final MagicDamage damage = new MagicDamage(
|
||||
event.getSource(),
|
||||
targetPermanent.getController(),
|
||||
it.getController(),
|
||||
5
|
||||
);
|
||||
game.doAction(new MagicDealDamageAction(damage));
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
final MagicTargetFilter<MagicPermanent> targetFilter =
|
||||
new MagicNameTargetFilter(targetPermanent.getName());
|
||||
new MagicNameTargetFilter(it.getName());
|
||||
final Collection<MagicPermanent> targets =
|
||||
game.filterPermanents(event.getPlayer(),targetFilter);
|
||||
for (final MagicPermanent target : targets) {
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
game.doAction(new MagicDestroyAction(targetPermanent));
|
||||
game.doAction(new MagicDestroyAction(it));
|
||||
final MagicPlayer you = event.getPlayer();
|
||||
if (you.controlsPermanent(MagicSubType.Treefolk)){
|
||||
game.doAction(new MagicDrawAction(you));
|
||||
|
|
|
@ -13,9 +13,8 @@
|
|||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent targetPermanent ->
|
||||
game.doAction(MagicChangeStateAction.Set(targetPermanent,MagicPermanentState.CannotBeRegenerated));
|
||||
game.doAction(new MagicDestroyAction(targetPermanent));
|
||||
game.doAction(MagicChangeStateAction.Set(it,MagicPermanentState.CannotBeRegenerated));
|
||||
game.doAction(new MagicDestroyAction(it));
|
||||
game.doAction(new MagicDrawAction(event.getPlayer()));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue