mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Fixes a bug where one could cast Green Sun Zenith with X=0 and search up any green creature.
This commit is contained in:
parent
b6f4f0082a
commit
e8c9f3c8f5
1 changed files with 4 additions and 1 deletions
|
@ -43,6 +43,7 @@ import mage.target.common.TargetCardInLibrary;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.filter.Filter.ComparisonType;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
|
@ -84,7 +85,9 @@ class GreenSunsZenithSearchEffect extends OneShotEffect<GreenSunsZenithSearchEff
|
|||
filter.getColor().setGreen(true);
|
||||
filter.setUseColor(true);
|
||||
filter.getCardType().add(CardType.CREATURE);
|
||||
filter.setConvertedManaCost(source.getManaCostsToPay().getVariableCosts().get(0).getAmount());
|
||||
//Set the mana cost one higher to 'emulate' a less than or equal to comparison.
|
||||
filter.setConvertedManaCost(source.getManaCostsToPay().getVariableCosts().get(0).getAmount() + 1);
|
||||
filter.setConvertedManaCostComparison(ComparisonType.LessThan);
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
|
|
Loading…
Reference in a new issue