From 67e8cc21a4c4d0ae577ed6bb004414c2ee897ccb Mon Sep 17 00:00:00 2001 From: melvin Date: Sun, 4 Sep 2011 15:47:13 +0800 Subject: [PATCH] simplified code to get controller --- src/magic/card/Pillory_of_the_Sleepless.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/magic/card/Pillory_of_the_Sleepless.java b/src/magic/card/Pillory_of_the_Sleepless.java index 28c5f1983f..4f92aaca5e 100644 --- a/src/magic/card/Pillory_of_the_Sleepless.java +++ b/src/magic/card/Pillory_of_the_Sleepless.java @@ -21,8 +21,8 @@ public class Pillory_of_the_Sleepless { @Override public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer data) { final MagicPermanent enchanted = permanent.getEnchantedCreature(); - final MagicPlayer player = (enchanted != null) ? enchanted.getController() : null; - return (player != null && player == data) ? + final MagicPlayer player = enchanted.getController(); + return (player == data) ? new MagicEvent( enchanted, player,