Edited applies and checksEventType

This commit is contained in:
L_J 2018-04-01 12:05:31 +00:00 committed by GitHub
parent 75ff9e430a
commit 51bfbc6705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,18 +104,15 @@ class DampingSphereReplacementEffect extends ReplacementEffectImpl {
@Override
public boolean checksEventType(GameEvent event, Game game) {
if (event.getType() == EventType.TAPPED_FOR_MANA) {
ManaEvent manaEvent = (ManaEvent) event;
Mana mana = manaEvent.getMana();
return mana.count() > 1;
}
return false;
return event.getType() == EventType.TAPPED_FOR_MANA;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
MageObject mageObject = game.getObject(event.getSourceId());
return mageObject != null && mageObject.isLand();
ManaEvent manaEvent = (ManaEvent) event;
Mana mana = manaEvent.getMana();
return mageObject != null && mageObject.isLand() && mana.count() > 1;
}
}