Removed duplicated code
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
package com.gempukku.lotro.logic.cardtype;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AbstractAlly extends AbstractPermanent {
|
||||
private SitesBlock _siteBlock;
|
||||
@@ -39,10 +34,6 @@ public class AbstractAlly extends AbstractPermanent {
|
||||
return _race;
|
||||
}
|
||||
|
||||
protected List<ActivateCardAction> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAllyHomeSiteNumbers() {
|
||||
return _siteNumbers;
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
package com.gempukku.lotro.logic.cardtype;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractCompanion extends AbstractPermanent {
|
||||
private int _strength;
|
||||
@@ -37,16 +31,6 @@ public abstract class AbstractCompanion extends AbstractPermanent {
|
||||
return _signet;
|
||||
}
|
||||
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.checkRuleOfNine(game, self)
|
||||
&& PlayConditions.checkPlayRingBearer(game, self);
|
||||
}
|
||||
|
||||
protected List<ActivateCardAction> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getStrength() {
|
||||
return _strength;
|
||||
|
||||
@@ -48,6 +48,13 @@ public abstract class AbstractLotroCardBlueprint implements LotroCardBlueprint {
|
||||
if (!game.getModifiersQuerying().canPayExtraCostsToPlay(game, self))
|
||||
return false;
|
||||
|
||||
if (!PlayConditions.checkUniqueness(game, self, ignoreCheckingDeadPile))
|
||||
return false;
|
||||
|
||||
if (self.getBlueprint().getCardType() == CardType.COMPANION
|
||||
&& !(PlayConditions.checkRuleOfNine(game, self) && PlayConditions.checkPlayRingBearer(game, self)))
|
||||
return false;
|
||||
|
||||
twilightModifier -= game.getModifiersQuerying().getPotentialDiscount(game, self);
|
||||
|
||||
return (getSide() != Side.SHADOW || PlayConditions.canPayForShadowCard(game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty));
|
||||
|
||||
@@ -46,12 +46,6 @@ public class AbstractPermanent extends AbstractLotroCardBlueprint {
|
||||
return action;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.checkUniqueness(game, self, ignoreCheckingDeadPile);
|
||||
}
|
||||
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user