"Goblin Backstabber"
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.gempukku.lotro.cards.set1.moria;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.Skirmish;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Shadow
|
||||
* Culture: Moria
|
||||
* Twilight Cost: 1
|
||||
* Type: Minion • Orc
|
||||
* Strength: 5
|
||||
* Vitality: 1
|
||||
* Site: 4
|
||||
* Game Text: This minion is damage +2 while in the same skirmish as another [MORIA] Orc.
|
||||
*/
|
||||
public class Card1_174 extends AbstractMinion {
|
||||
public Card1_174() {
|
||||
super(1, 5, 1, 4, Keyword.ORC, Culture.MORIA, "Goblin Backstabber");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Modifier getAlwaysOnEffect(final PhysicalCard self) {
|
||||
return new KeywordModifier(self,
|
||||
Filters.and(
|
||||
Filters.sameCard(self),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
Skirmish skirmish = gameState.getSkirmish();
|
||||
if (skirmish != null) {
|
||||
List<PhysicalCard> shadowChars = skirmish.getShadowCharacters();
|
||||
if (shadowChars.contains(self)
|
||||
&& Filters.filter(shadowChars, gameState, modifiersQuerying, Filters.culture(Culture.MORIA), Filters.keyword(Keyword.ORC), Filters.not(Filters.sameCard(self))).size() > 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
Keyword.DAMAGE, 2);
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,16 @@ import com.gempukku.lotro.game.state.GameState;
|
||||
|
||||
public class KeywordModifier extends AbstractModifier {
|
||||
private Keyword _keyword;
|
||||
private int _count;
|
||||
|
||||
public KeywordModifier(PhysicalCard physicalCard, Filter affectFilter, Keyword keyword) {
|
||||
super(physicalCard, "Has " + keyword.getHumanReadable(), affectFilter, new ModifierEffect[]{ModifierEffect.KEYWORD_MODIFIER});
|
||||
this(physicalCard, affectFilter, keyword, 1);
|
||||
}
|
||||
|
||||
public KeywordModifier(PhysicalCard physicalCard, Filter affectFilter, Keyword keyword, int count) {
|
||||
super(physicalCard, "Has " + keyword.getHumanReadable() + ((count > 1) ? (" +" + count) : ""), affectFilter, new ModifierEffect[]{ModifierEffect.KEYWORD_MODIFIER});
|
||||
_keyword = keyword;
|
||||
_count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -21,7 +27,7 @@ public class KeywordModifier extends AbstractModifier {
|
||||
@Override
|
||||
public int getKeywordCount(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, Keyword keyword, int result) {
|
||||
if (keyword == _keyword)
|
||||
return result + 1;
|
||||
return result + _count;
|
||||
else
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user