mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
Fixed FilterCard with splitcard
This commit is contained in:
parent
61d0e7db0d
commit
da3c153a10
1 changed files with 21 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.SplitCard;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
|
|
@ -62,6 +63,26 @@ public class FilterCard extends FilterObject<Card> {
|
|||
this.extraPredicates = new ArrayList<ObjectPlayerPredicate<ObjectPlayer<Card>>>(filter.extraPredicates);
|
||||
}
|
||||
|
||||
//20130711 708.6c
|
||||
/* If anything performs a comparison involving multiple characteristics or
|
||||
* values of one or more split cards in any zone other than the stack or
|
||||
* involving multiple characteristics or values of one or more fused split
|
||||
* spells, each characteristic or value is compared separately. If each of
|
||||
* the individual comparisons would return a “yes” answer, the whole
|
||||
* comparison returns a “yes” answer. The individual comparisons may involve
|
||||
* different halves of the same split card.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean match(Card card, Game game) {
|
||||
if(card.isSplitCard()){
|
||||
return super.match(((SplitCard)card).getLeftHalfCard(), game) ||
|
||||
super.match(((SplitCard)card).getRightHalfCard(), game);
|
||||
}
|
||||
else{
|
||||
return super.match(card, game);
|
||||
}
|
||||
}
|
||||
public boolean match(Card card, UUID playerId, Game game) {
|
||||
if (!this.match(card, game)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue