replaced null with MagicPermanent.NONE, replaced if with ?: operator

master
melvin 2011-09-04 15:48:06 +08:00
parent 67e8cc21a4
commit b058c549ca
1 changed files with 9 additions and 12 deletions

View File

@ -11,18 +11,15 @@ public class Wall_of_Frost {
public static final MagicWhenBlocksTrigger T = new MagicWhenBlocksTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) {
if (permanent==data) {
final MagicPermanent blocked=permanent.getBlockedCreature();
if (blocked!=null) {
return new MagicEvent(
return (permanent==data && blocked!=MagicPermanent.NONE) ?
new MagicEvent(
permanent,
permanent.getController(),
new Object[]{blocked},
this,
blocked+" doesn't untap during its controller's next untap step.");
}
}
return null;
blocked+" doesn't untap during its controller's next untap step."):
null;
}
@Override
public void executeEvent(