change enum equals to ==

This commit is contained in:
ingmargoudt 2017-03-01 15:05:44 +01:00
parent 82841c16c6
commit d01aed42ed
40 changed files with 57 additions and 57 deletions

View file

@ -75,7 +75,7 @@ public class RecoverAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getFromZone().equals(Zone.BATTLEFIELD) && zEvent.getToZone().equals(Zone.GRAVEYARD)) {
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
if (zEvent.getTarget().getOwnerId().equals(getControllerId())
&& zEvent.getTarget().getCardType().contains(CardType.CREATURE)
&& !zEvent.getTarget().getId().equals(getSourceId())) {
@ -116,7 +116,7 @@ class RecoverEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
Card sourceCard = game.getCard(source.getSourceId());
if (controller != null && sourceCard != null
&& game.getState().getZone(source.getSourceId()).equals(Zone.GRAVEYARD)) {
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
if (controller.chooseUse(Outcome.Damage, "Pay " + cost.getText() + " to recover " + sourceCard.getLogName() + "? (Otherwise the card will be exiled)", source, game)) {
cost.clearPaid();
if (cost.pay(source, game, source.getSourceId(), controller.getId(), false, null)) {