mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Turns out the spells Evacuation and Rebuild did not have a canPlayAI() method. I borrowed the canPlayAI() method from wrath of God and made a couple of minor adjustments. It may or may not need additional adjustments.
This commit is contained in:
@@ -11887,6 +11887,24 @@ public class CardFactory implements NewConstants {
|
|||||||
SpellAbility spell = new Spell(card) {
|
SpellAbility spell = new Spell(card) {
|
||||||
private static final long serialVersionUID = -6305494177352031326L;
|
private static final long serialVersionUID = -6305494177352031326L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayAI() {
|
||||||
|
CardList human = new CardList(AllZone.Human_Play.getCards());
|
||||||
|
CardList computer = new CardList(AllZone.Computer_Play.getCards());
|
||||||
|
|
||||||
|
String bounceType;
|
||||||
|
if (cardName.equals("Rebuild")) bounceType = "Artifact";
|
||||||
|
else bounceType = "Creature";
|
||||||
|
|
||||||
|
human = human.getType(bounceType);
|
||||||
|
computer = computer.getType(bounceType);
|
||||||
|
|
||||||
|
// the computer will at least bounce 2 more human creatures/artifacts
|
||||||
|
return AllZone.Phase.getPhase().equals(Constant.Phase.Main2) &&
|
||||||
|
(computer.size() < human.size() - 1
|
||||||
|
|| (AllZone.Computer_Life.getLife() < 7 && !human.isEmpty()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
CardList all = new CardList();
|
CardList all = new CardList();
|
||||||
|
|||||||
Reference in New Issue
Block a user