"Flaming Brand"
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.gempukku.lotro.cards.set2.gondor;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.LotroGame;
|
||||
import com.gempukku.lotro.logic.modifiers.Condition;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Mines of Moria
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 0
|
||||
* Type: Possession • Hand Weapon
|
||||
* Strength: +1
|
||||
* Game Text: Bearer must be a Man. This weapon may be borne in addition to 1 other hand weapon. Bearer is strength +2
|
||||
* and damage +1 while skirmishing a Nazgul.
|
||||
*/
|
||||
public class Card2_032 extends AbstractAttachableFPPossession {
|
||||
public Card2_032() {
|
||||
super(0, 1, 0, Culture.GONDOR, Keyword.HAND_WEAPON, "Flaming Brand");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.race(Race.MAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExtraPossessionClass() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Modifier> getNonBasicStatsModifiers(final PhysicalCard self) {
|
||||
Condition condition = new Condition() {
|
||||
@Override
|
||||
public boolean isFullfilled(GameState gameState, ModifiersQuerying modifiersQuerying) {
|
||||
return gameState.getSkirmish() != null
|
||||
&& gameState.getSkirmish().getFellowshipCharacter() == self.getAttachedTo()
|
||||
&& Filters.filter(gameState.getSkirmish().getShadowCharacters(), gameState, modifiersQuerying, Filters.race(Race.NAZGUL)).size() > 0;
|
||||
}
|
||||
};
|
||||
|
||||
List<Modifier> modifiers = new LinkedList<Modifier>();
|
||||
modifiers.add(
|
||||
new StrengthModifier(self, Filters.hasAttached(self), condition, 2));
|
||||
modifiers.add(
|
||||
new KeywordModifier(self, Filters.hasAttached(self), condition, Keyword.DAMAGE, 1));
|
||||
return modifiers;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,12 @@ public class KeywordModifier extends AbstractModifier {
|
||||
_count = count;
|
||||
}
|
||||
|
||||
public KeywordModifier(PhysicalCard physicalCard, Filter affectFilter, Condition condition, Keyword keyword, int count) {
|
||||
super(physicalCard, "Has " + keyword.getHumanReadable() + ((count > 1) ? (" +" + count) : ""), affectFilter, condition, new ModifierEffect[]{ModifierEffect.KEYWORD_MODIFIER});
|
||||
_keyword = keyword;
|
||||
_count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasKeyword(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, Keyword keyword, boolean result) {
|
||||
return (result || keyword == _keyword);
|
||||
|
||||
Reference in New Issue
Block a user