mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed a bug with Echoing Truth and face down creatures.
- Fixed the (annoying) "Pay Mana: " bug of Chandra Nalaar. - Fixed a bug with Guardian of Cloverdell sacrificing kithkin it does not have.
This commit is contained in:
@@ -8798,6 +8798,13 @@ public class CardFactory implements NewConstants {
|
||||
all.addAll(AllZone.Computer_Play.getCards());
|
||||
|
||||
CardList sameName = all.getName(getTargetCard().getName());
|
||||
sameName = sameName.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return !c.isFaceDown();
|
||||
}
|
||||
});
|
||||
|
||||
if(!getTargetCard().isFaceDown()) {
|
||||
//bounce all permanents with the same name
|
||||
|
||||
@@ -1777,22 +1777,6 @@ public class CardFactory_Creatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
final SpellAbility a2 = new Ability(card, "G") {
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||
CardList kiths = new CardList(play.getCards());
|
||||
kiths = kiths.filter(new CardListFilter() {
|
||||
|
||||
public boolean addCard(Card c) {
|
||||
if(c.getType().contains("Kithkin") || c.getKeyword().contains("Changeling")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(kiths.size() != 0) setTargetCard(kiths.getCard(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
//get all Kithkin:
|
||||
@@ -1809,7 +1793,18 @@ public class CardFactory_Creatures {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
if(AllZone.Computer_Life.getLife() < 4) return true;
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||
CardList kiths = new CardList(play.getCards());
|
||||
kiths = kiths.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
if(c.getType().contains("Kithkin") || c.getKeyword().contains("Changeling")) return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(kiths.size() != 0) setTargetCard(kiths.getCard(0));
|
||||
|
||||
if(AllZone.Computer_Life.getLife() < 4 && kiths.size() > 0) return true;
|
||||
else return false;
|
||||
}
|
||||
};//SpellAbility
|
||||
|
||||
@@ -1348,16 +1348,21 @@ class CardFactory_Planeswalkers {
|
||||
|
||||
@Override
|
||||
public void selectCard(Card card, PlayerZone zone) {
|
||||
if(card.isPlaneswalker() && zone.is(Constant.Zone.Play)) {
|
||||
if(card.isPlaneswalker() && zone.is(Constant.Zone.Play) &&
|
||||
CardFactoryUtil.canTarget(card2, card)) {
|
||||
ability1.setTargetCard(card);
|
||||
stopSetNext(new Input_PayManaCost(ability1));
|
||||
//stopSetNext(new Input_PayManaCost(ability1));
|
||||
AllZone.Stack.add(ability1);
|
||||
stop();
|
||||
}
|
||||
}//selectCard()
|
||||
|
||||
@Override
|
||||
public void selectPlayer(String player) {
|
||||
ability1.setTargetPlayer(player);
|
||||
stopSetNext(new Input_PayManaCost(ability1));
|
||||
//stopSetNext(new Input_PayManaCost(ability1));
|
||||
AllZone.Stack.add(ability1);
|
||||
stop();
|
||||
}
|
||||
};
|
||||
ability1.setBeforePayMana(target1);
|
||||
|
||||
Reference in New Issue
Block a user