mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Made some improvements in AI code for Oblivion Ring.
This commit is contained in:
@@ -4261,6 +4261,7 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Oblivion Ring")) {
|
||||
|
||||
final CommandReturn getPerm = new CommandReturn() {
|
||||
public Object execute() {
|
||||
//get all creatures
|
||||
@@ -4408,8 +4409,17 @@ public class CardFactory implements NewConstants {
|
||||
Object o = getPerm.execute();
|
||||
if(o == null) return false;
|
||||
|
||||
CardList cList = new CardList(AllZone.Human_Play.getCards());
|
||||
cList = cList.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card crd)
|
||||
{
|
||||
return CardFactoryUtil.canTarget(card, crd) && crd.isPermanent() && !crd.isLand();
|
||||
}
|
||||
});
|
||||
|
||||
CardList cl = (CardList) getPerm.execute();
|
||||
return (o != null) && cl.size() > 0 && AllZone.getZone(getSourceCard()).is(Constant.Zone.Hand);
|
||||
return (o != null) && cList.size() > 0 && cl.size() > 0 && AllZone.getZone(getSourceCard()).is(Constant.Zone.Hand);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user