mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Fixed AI part for Meloku, the Clouded Mirror.
This commit is contained in:
@@ -8564,10 +8564,20 @@ public class CardFactory_Creatures {
|
|||||||
});
|
});
|
||||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
||||||
|
|
||||||
if(!land.isEmpty()) {
|
if (card.getController().equals(Constant.Player.Human))
|
||||||
Object o = AllZone.Display.getChoiceOptional("Select target Land", land.toArray());
|
{
|
||||||
Card l = (Card) o;
|
if(!land.isEmpty()) {
|
||||||
AllZone.GameAction.moveTo(hand, l);
|
Object o = AllZone.Display.getChoiceOptional("Select target Land", land.toArray());
|
||||||
|
Card l = (Card) o;
|
||||||
|
AllZone.GameAction.moveTo(hand, l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
land.shuffle();
|
||||||
|
Card crd = land.get(0);
|
||||||
|
if (crd!=null)
|
||||||
|
AllZone.GameAction.moveTo(hand, crd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}//resolve()
|
}//resolve()
|
||||||
@@ -8584,6 +8594,14 @@ public class CardFactory_Creatures {
|
|||||||
});
|
});
|
||||||
return land.size() > 0;
|
return land.size() > 0;
|
||||||
}
|
}
|
||||||
|
public boolean canPlayAI()
|
||||||
|
{
|
||||||
|
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||||
|
|
||||||
|
CardList land = new CardList(play.getCards());
|
||||||
|
land = land.getType("Land");
|
||||||
|
return land.size() > 5;
|
||||||
|
}
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
card.addSpellAbility(ability);
|
card.addSpellAbility(ability);
|
||||||
ability.setDescription("1, Return a land you control to its owner's hand: Put a 1/1 blue Illusion creature token with flying into play.");
|
ability.setDescription("1, Return a land you control to its owner's hand: Put a 1/1 blue Illusion creature token with flying into play.");
|
||||||
|
|||||||
Reference in New Issue
Block a user