Simlifying code.

This commit is contained in:
marcins78@gmail.com
2012-02-10 10:26:00 +00:00
parent fcb3bfd8fa
commit beee3a5342
2 changed files with 3 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ public abstract class AbstractAttachableFPPossession extends AbstractAttachable
Filters.or(
CardType.COMPANION,
Filters.allyAtHome));
} else if (attachedTo.isAllyAtHome(gameState.getCurrentSiteNumber(), gameState.getCurrentSite().getBlueprint().getSiteBlock())) {
} else if (attachedTo.isAllyAtHome(gameState.getCurrentSiteNumber(), gameState.getCurrentSiteBlock())) {
validTransferFilter = Filters.and(validTargetFilter,
Filters.or(
CardType.COMPANION,

View File

@@ -1,6 +1,7 @@
package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.modifiers.conditions.LocationCondition;
import com.gempukku.lotro.common.*;
@@ -53,7 +54,7 @@ public class Card1_031 extends AbstractAttachableFPPossession {
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND)) {
if (PlayConditions.location(game, Keyword.UNDERGROUND)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(new SelfDiscardEffect(self));
return Collections.singletonList(action);