"No Business of Ours"

This commit is contained in:
marcins78@gmail.com
2011-09-27 23:29:05 +00:00
parent 3e8aa27784
commit 9c0a68ec46
14 changed files with 58 additions and 13 deletions

View File

@@ -64,7 +64,7 @@ public abstract class AbstractAttachableFPPossession extends AbstractAttachable
}
@Override
public final List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public final List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
if (_strength != 0)
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), _strength));

View File

@@ -84,7 +84,7 @@ public abstract class AbstractLotroCardBlueprint implements LotroCardBlueprint {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
Modifier modifier = getAlwaysOnModifier(self);
if (modifier != null)
return Collections.singletonList(modifier);

View File

@@ -14,9 +14,13 @@ public class OpponentsCantLookOrRevealCardsFromHand extends AbstractModifier {
_playerId = playerId;
}
public OpponentsCantLookOrRevealCardsFromHand(PhysicalCard source) {
this(source, null);
}
@Override
public boolean canLookOrRevealCardsInHand(GameState gameState, ModifiersQuerying modifiersQuerying, String playerId) {
if (_playerId.equals(playerId))
if (_playerId == null || _playerId.equals(playerId))
return false;
return true;
}

View File

@@ -46,7 +46,7 @@ public class Card1_001 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 1));
modifiers.add(new VitalityModifier(self, Filters.hasAttached(self), 1));

View File

@@ -45,7 +45,7 @@ public class Card1_002 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 1));
modifiers.add(new KeywordModifier(self, Filters.hasAttached(self), Keyword.RING_BEARER));

View File

@@ -36,7 +36,7 @@ public class Card1_166 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 3));
modifiers.add(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));

View File

@@ -40,7 +40,7 @@ public class Card1_190 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 2));
modifiers.add(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));

View File

@@ -47,7 +47,7 @@ public class Card1_221 extends AbstractAttachable {
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 3));
modifiers.add(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));

View File

@@ -43,7 +43,7 @@ public class Card1_225 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), 2));
modifiers.add(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));

View File

@@ -37,7 +37,7 @@ public class Card2_016 extends AbstractPermanent {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(
new StrengthModifier(self, Filters.race(Race.URUK_HAI), -2));

View File

@@ -42,7 +42,7 @@ public class Card2_043 extends AbstractAttachable {
}
@Override
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self) {
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<Modifier>();
modifiers.add(
new StrengthModifier(self, Filters.hasAttached(self), 2));

View File

@@ -0,0 +1,41 @@
package com.gempukku.lotro.cards.set2.isengard;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.modifiers.OpponentsCantLookOrRevealCardsFromHand;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.common.Zone;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.Modifier;
import java.util.Collections;
import java.util.List;
/**
* Set: Mines of Moria
* Side: Shadow
* Culture: Isengard
* Twilight Cost: 0
* Type: Condition
* Game Text: To play, spot an [ISENGARD] minion. Plays to your support area. The Free Peoples player may not look at
* or reveal cards in any Shadow player's hand.
*/
public class Card2_044 extends AbstractPermanent {
public Card2_044() {
super(Side.SHADOW, 0, CardType.CONDITION, Culture.ISENGARD, Zone.SHADOW_SUPPORT, "No Business of Ours");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION));
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
return Collections.singletonList(new OpponentsCantLookOrRevealCardsFromHand(self));
}
}

View File

@@ -38,7 +38,7 @@ public interface LotroCardBlueprint {
public int getResistance();
public List<Modifier> getAlwaysOnModifiers(PhysicalCard self);
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self);
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier);

View File

@@ -50,7 +50,7 @@ public class PhysicalCardImpl implements PhysicalCard {
}
public void startAffectingGame(ModifiersEnvironment modifiersEnvironment) {
List<Modifier> modifiers = _blueprint.getAlwaysOnModifiers(this);
List<? extends Modifier> modifiers = _blueprint.getAlwaysOnModifiers(this);
if (modifiers != null) {
_modifierHooks = new LinkedList<ModifierHook>();
for (Modifier modifier : modifiers)