Splitting WoundResult for each card taking wound.
This commit is contained in:
@@ -136,8 +136,8 @@ public class TriggerConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isWounded(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.WOUND)
|
||||
public static boolean forEachWounded(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.FOR_EACH_WOUNDED)
|
||||
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), ((WoundResult) effectResult).getWoundedCard());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Card1_189 extends AbstractResponseOldEvent {
|
||||
if (((
|
||||
effectResult.getType() == EffectResult.Type.EXERT
|
||||
&& Filters.filter(((ExertResult) effectResult).getExertedCards(), game.getGameState(), game.getModifiersQuerying(), Keyword.RING_BEARER).size() > 0)
|
||||
|| TriggerConditions.isWounded(game, effectResult, Keyword.RING_BEARER))
|
||||
|| TriggerConditions.forEachWounded(game, effectResult, Keyword.RING_BEARER))
|
||||
&& checkPlayRequirements(playerId, game, self, 0, false, false)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card10_096 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.isWounded(game, effectResult, Culture.SAURON, CardType.MINION, Keyword.ROAMING)) {
|
||||
if (TriggerConditions.forEachWounded(game, effectResult, Culture.SAURON, CardType.MINION, Keyword.ROAMING)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddTokenEffect(self, self, Token.SAURON));
|
||||
|
||||
@@ -71,7 +71,7 @@ public class Card2_053 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.isWounded(game, effectResult, Filters.hasAttached(self))
|
||||
if (TriggerConditions.forEachWounded(game, effectResult, Filters.hasAttached(self))
|
||||
&& game.getGameState().getCurrentPhase() == Phase.ARCHERY) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card8_024 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.isWounded(game, effectResult, CardType.COMPANION)
|
||||
if (TriggerConditions.forEachWounded(game, effectResult, CardType.COMPANION)
|
||||
&& PlayConditions.canSpot(game, Culture.GOLLUM, CardType.MINION, Filters.inSkirmish)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -4,7 +4,7 @@ public abstract class EffectResult {
|
||||
public enum Type {
|
||||
ANY_NUMBER_KILLED, FOR_EACH_KILLED,
|
||||
|
||||
WOUND, HEAL, EXERT, DISCARD_FROM_PLAY, DISCARD_FROM_HAND,
|
||||
FOR_EACH_WOUNDED, HEAL, EXERT, DISCARD_FROM_PLAY, DISCARD_FROM_HAND,
|
||||
|
||||
FREE_PEOPLE_PLAYER_STARTS_ASSIGNING,
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ public class WoundResult extends EffectResult {
|
||||
private PhysicalCard _card;
|
||||
|
||||
public WoundResult(PhysicalCard card) {
|
||||
super(EffectResult.Type.WOUND);
|
||||
super(EffectResult.Type.FOR_EACH_WOUNDED);
|
||||
_card = card;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user