- "Rabbit Stew" can now be transferred to non-SHIRE companion.
This commit is contained in:
@@ -24,10 +24,16 @@ public class ChooseAndTransferAttachableEffect extends AbstractEffect {
|
||||
private Filterable _attachedTo;
|
||||
private Filterable _attachedCard;
|
||||
private Filterable _transferTo;
|
||||
private boolean _skipOriginalTargetCheck;
|
||||
|
||||
public ChooseAndTransferAttachableEffect(Action action, String playerId, Filterable attachedCard, Filterable attachedTo, Filterable transferTo) {
|
||||
this(action, playerId, false, attachedCard, attachedTo, transferTo);
|
||||
}
|
||||
|
||||
public ChooseAndTransferAttachableEffect(Action action, String playerId, boolean skipOriginalTargetCheck, Filterable attachedCard, Filterable attachedTo, Filterable transferTo) {
|
||||
_action = action;
|
||||
_playerId = playerId;
|
||||
_skipOriginalTargetCheck = skipOriginalTargetCheck;
|
||||
_attachedCard = attachedCard;
|
||||
_attachedTo = attachedTo;
|
||||
_transferTo = transferTo;
|
||||
@@ -44,16 +50,28 @@ public class ChooseAndTransferAttachableEffect extends AbstractEffect {
|
||||
}
|
||||
|
||||
protected Filterable getValidTargetFilter(LotroGame game, final PhysicalCard attachment, AbstractAttachable attachable) {
|
||||
return Filters.and(
|
||||
_transferTo,
|
||||
attachable.getFullValidTargetFilter(attachment.getOwner(), game, attachment),
|
||||
Filters.not(attachment.getAttachedTo()),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard target) {
|
||||
return modifiersQuerying.canHaveTransferredOn(gameState, attachment, target);
|
||||
}
|
||||
});
|
||||
if (_skipOriginalTargetCheck) {
|
||||
return Filters.and(
|
||||
_transferTo,
|
||||
Filters.not(attachment.getAttachedTo()),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard target) {
|
||||
return modifiersQuerying.canHaveTransferredOn(gameState, attachment, target);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return Filters.and(
|
||||
_transferTo,
|
||||
attachable.getFullValidTargetFilter(attachment.getOwner(), game, attachment),
|
||||
Filters.not(attachment.getAttachedTo()),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard target) {
|
||||
return modifiersQuerying.canHaveTransferredOn(gameState, attachment, target);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected Collection<PhysicalCard> getPossibleAttachmentsToTransfer(final LotroGame game) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card19_031 extends AbstractAttachable {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndTransferAttachableEffect(action, playerId, self, Filters.any, Filters.and(Keyword.FELLOWSHIP, CardType.COMPANION)));
|
||||
new ChooseAndTransferAttachableEffect(action, playerId, true, self, Filters.any, Filters.and(Keyword.FELLOWSHIP, CardType.COMPANION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<b>23 Apr. 2012</b>
|
||||
- Adding 0 threats is now possible and legal, hence playing "Plotting" will not fail now, if you can't add any threats
|
||||
anymore (number of threats is equal to or greater than number of companions).
|
||||
- "Rabbit Stew" can now be transferred to non-SHIRE companion.
|
||||
|
||||
<b>19 Apr. 2012</b>
|
||||
- "Rope and Winch" now adds +2 Strength, instead of +1 for each extra card discarded.
|
||||
|
||||
Reference in New Issue
Block a user