mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
once canPlayAI is wrapped is has to be hidden from outside callers
This commit is contained in:
@@ -17,7 +17,7 @@ public abstract class SpellAiLogic {
|
||||
return canPlayAI(aiPlayer, params, sa);
|
||||
}
|
||||
|
||||
public abstract boolean canPlayAI(final Player aiPlayer, final Map<String, String> params, final SpellAbility sa);
|
||||
protected abstract boolean canPlayAI(final Player aiPlayer, final Map<String, String> params, final SpellAbility sa);
|
||||
|
||||
public final boolean doTriggerAI(final Player aiPlayer, final Map<String, String> params, final SpellAbility sa, final boolean mandatory){
|
||||
if (!ComputerUtil.canPayCost(sa, aiPlayer) && !mandatory) {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class AddTurnAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return doTriggerAINoCost(aiPlayer, params, sa, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class AlwaysPlayAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AnimateAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import forge.game.player.Player;
|
||||
public class AnimateAllAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
return false;
|
||||
} // end animateAllCanPlayAI()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AttachAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class BondAi extends SpellAiLogic {
|
||||
* @return a boolean.
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
return true;
|
||||
} // end bondCanPlayAI()
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class CanPlayAsDrawbackAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class CannotPlayAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ChangeZoneAllAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// Change Zone All, can be any type moving from one zone to another
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -14,7 +14,7 @@ import forge.util.MyRandom;
|
||||
public class CharmAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
final int num = Integer.parseInt(params.containsKey("CharmNum") ? params.get("CharmNum") : "1");
|
||||
|
||||
@@ -18,7 +18,7 @@ public class ChooseCardAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Card host = sa.getSourceCard();
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ChooseCardNameAi extends SpellAiLogic {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
|
||||
if (params.containsKey("AILogic")) {
|
||||
// Don't tap creatures that may be able to block
|
||||
|
||||
@@ -9,7 +9,7 @@ public class ChooseColorAi extends SpellAiLogic {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
if (!params.containsKey("AILogic")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import forge.game.player.Player;
|
||||
|
||||
public class ChooseTypeAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
if (!params.containsKey("AILogic")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ClashAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Player opp = ai.getOpponent();
|
||||
if (tgt != null) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import forge.game.player.Player;
|
||||
public class CloneAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ControlExchangeAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, final SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, final SpellAbility sa) {
|
||||
Card object1 = null;
|
||||
Card object2 = null;
|
||||
final Target tgt = sa.getTarget();
|
||||
|
||||
@@ -62,7 +62,7 @@ import forge.game.zone.ZoneType;
|
||||
*/
|
||||
public class ControlGainAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
boolean hasCreature = false;
|
||||
boolean hasArtifact = false;
|
||||
boolean hasEnchantment = false;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class CopyPermanentAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
// Card source = sa.getSourceCard();
|
||||
// TODO - I'm sure someone can do this AI better
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import forge.util.MyRandom;
|
||||
public class CounterAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
boolean toReturn = true;
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -18,7 +18,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class CountersMoveAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what
|
||||
// the expected targets could be
|
||||
|
||||
@@ -17,7 +17,7 @@ import forge.game.zone.ZoneType;
|
||||
public class CountersProliferateAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
boolean chance = true;
|
||||
|
||||
List<Card> cperms = CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), new Predicate<Card>() {
|
||||
|
||||
@@ -26,7 +26,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class CountersPutAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on
|
||||
// what the expected targets could be
|
||||
|
||||
@@ -23,8 +23,8 @@ import forge.game.zone.ZoneType;
|
||||
import forge.util.MyRandom;
|
||||
|
||||
public class CountersPutAllAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
@Override
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what
|
||||
// the expected targets could be
|
||||
|
||||
@@ -17,7 +17,7 @@ import forge.util.MyRandom;
|
||||
public class CountersRemoveAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what
|
||||
// the expected targets could be
|
||||
|
||||
@@ -26,7 +26,7 @@ public class DamageAllAi extends SpellAiLogic
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what the expected targets could be
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
@@ -44,7 +44,7 @@ public class DamageDealAi extends DamageAiBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -13,7 +13,7 @@ public class DamageEachAi extends DamageAiBase {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
|
||||
if (tgt != null && sa.canTarget(ai.getOpponent())) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class DamagePreventAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
boolean chance = false;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class DamagePreventAllAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
boolean chance = false;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class DebuffAi extends SpellAiLogic {
|
||||
// *************************************************************************
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(final Player ai, final java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
protected boolean canPlayAI(final Player ai, final java.util.Map<String,String> params, final SpellAbility sa) {
|
||||
// if there is no target and host card isn't in play, don't activate
|
||||
final Card source = sa.getSourceCard();
|
||||
if ((sa.getTarget() == null) && !source.isInPlay()) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class DebuffAllAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
String valid = "";
|
||||
final Random r = MyRandom.getRandom();
|
||||
// final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DelayedTriggerAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(forge.game.player.Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(forge.game.player.Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final String svarName = params.get("Execute");
|
||||
final SpellAbility trigsa = tempCreator.getAbility(sa.getAbilityFactory().getHostCard().getSVar(svarName), sa.getAbilityFactory().getHostCard());
|
||||
return trigsa.canPlayAI();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DestroyAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what the expected targets could be
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
@@ -79,7 +79,7 @@ public class DestroyAllAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(final Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(final Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what the expected targets could be
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
@@ -19,7 +19,7 @@ public class DigAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
double chance = .4; // 40 percent chance with instant speed stuff
|
||||
if (AbilityFactory.isSorcerySpeed(sa)) {
|
||||
chance = .667; // 66.7% chance for sorcery speed (since it will
|
||||
|
||||
@@ -14,7 +14,7 @@ public class DigUntilAi extends SpellAiLogic {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
double chance = .4; // 40 percent chance with instant speed stuff
|
||||
if (AbilityFactory.isSorcerySpeed(sa)) {
|
||||
chance = .667; // 66.7% chance for sorcery speed (since it will
|
||||
|
||||
@@ -21,7 +21,7 @@ import forge.util.MyRandom;
|
||||
public class DiscardAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String,String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
|
||||
@@ -15,7 +15,7 @@ import forge.util.MyRandom;
|
||||
public class DrainManaAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI cannot use this properly until he can use SAs during Humans turn
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class DrawAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -22,7 +22,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class EffectAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final GameState game = Singletons.getModel().getGame();
|
||||
final Random r = MyRandom.getRandom();
|
||||
boolean randomReturn = r.nextFloat() <= .6667;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class EndTurnAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FightAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
Target tgt = sa.getTarget();
|
||||
tgt.resetTargets();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class FogAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// AI should only activate this during Human's Declare Blockers phase
|
||||
if (Singletons.getModel().getGame().getPhaseHandler().isPlayerTurn(sa.getActivatingPlayer())) {
|
||||
return false;
|
||||
|
||||
@@ -7,7 +7,7 @@ import forge.game.player.Player;
|
||||
|
||||
public class GameLossAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Player opp = ai.getOpponent();
|
||||
if (opp.cantLose()) {
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ public class GameWinAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
if (ai.cantWin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class LifeExchangeAi extends SpellAiLogic {
|
||||
* forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
final int myLife = aiPlayer.getLife();
|
||||
Player opponent = aiPlayer.getOpponent();
|
||||
|
||||
@@ -29,7 +29,7 @@ public class LifeGainAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.AbilityFactoryAlterLife.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
|
||||
final Random r = MyRandom.getRandom();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
|
||||
@@ -23,7 +23,7 @@ public class LifeLoseAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.AbilityFactoryAlterLife.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
|
||||
final Random r = MyRandom.getRandom();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
|
||||
@@ -18,7 +18,7 @@ import forge.util.MyRandom;
|
||||
public class LifeSetAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
// Ability_Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -21,7 +21,7 @@ import forge.util.MyRandom;
|
||||
public class MillAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card source = sa.getSourceCard();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import forge.game.player.Player;
|
||||
public class MustAttackAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// disabled for the AI for now. Only for Gideon Jura at this time.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import forge.game.zone.ZoneType;
|
||||
public class MustBlockAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// disabled for the AI until he/she can make decisions about who to make
|
||||
// block
|
||||
return false;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PhasesAi extends SpellAiLogic
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
// This still needs to be fleshed out
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PlayAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
final Card source = sa.getAbilityFactory().getHostCard();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PoisonAi extends SpellAiLogic {
|
||||
* forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
// int humanPoison = AllZone.getHumanPlayer().getPoisonCounters();
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ProtectAi extends SpellAiLogic {
|
||||
} // getProtectCreatures()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
// if there is no target and host card isn't in play, don't activate
|
||||
if ((sa.getTarget() == null) && !hostCard.isInPlay()) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import forge.game.player.Player;
|
||||
public class ProtectAllAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
// if there is no target and host card isn't in play, don't activate
|
||||
if ((sa.getTarget() == null) && !hostCard.isInPlay()) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PumpAi extends PumpAiBase {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Cost cost = sa.getPayCosts();
|
||||
final PhaseHandler ph = Singletons.getModel().getGame().getPhaseHandler();
|
||||
final List<String> keywords = params.containsKey("KW") ? Arrays.asList(params.get("KW").split(" & ")) : new ArrayList<String>();
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PumpAllAi extends PumpAiBase {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(final Player ai, Map<String, String> params, final SpellAbility sa) {
|
||||
protected boolean canPlayAI(final Player ai, Map<String, String> params, final SpellAbility sa) {
|
||||
String valid = "";
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class RearrangeTopOfLibraryAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RegenerateAi extends SpellAiLogic {
|
||||
// **************************************************************
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
boolean chance = false;
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
|
||||
@@ -20,7 +20,7 @@ import forge.game.zone.ZoneType;
|
||||
public class RegenerateAllAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Card hostCard = sa.getAbilityFactory().getHostCard();
|
||||
boolean chance = false;
|
||||
final Cost abCost = sa.getAbilityFactory().getAbCost();
|
||||
|
||||
@@ -9,7 +9,7 @@ import forge.game.player.Player;
|
||||
public class RemoveFromCombatAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// disabled for the AI for now. Only for Gideon Jura at this time.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import forge.game.player.Player;
|
||||
public class RepeatAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Player opp = ai.getOpponent();
|
||||
if (tgt != null) {
|
||||
|
||||
@@ -16,7 +16,7 @@ public class RestartGameAi extends SpellAiLogic {
|
||||
* forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// The only card that uses this is Karn Liberated
|
||||
|
||||
// TODO Add Logic, check if AI is losing game state, or life
|
||||
|
||||
@@ -12,7 +12,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class RevealAi extends RevealAiBase {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI cannot use this properly until he can use SAs during Humans turn
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -17,7 +17,7 @@ public class RevealHandAi extends RevealAiBase {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// AI cannot use this properly until he can use SAs during Humans turn
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SacrificeAi extends SpellAiLogic {
|
||||
// **************************************************************
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
boolean chance = sacrificeTgtAI(ai, params, sa);
|
||||
|
||||
// Some additional checks based on what is being sacrificed, and who is
|
||||
|
||||
@@ -18,7 +18,7 @@ import forge.util.MyRandom;
|
||||
public class SacrificeAllAi extends SpellAiLogic
|
||||
{
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// AI needs to be expanded, since this function can be pretty complex
|
||||
// based on what the expected targets could be
|
||||
final Random r = MyRandom.getRandom();
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ScryAi extends SpellAiLogic {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// Card source = sa.getSourceCard();
|
||||
|
||||
double chance = .4; // 40 percent chance of milling with instant speed
|
||||
|
||||
@@ -8,7 +8,7 @@ import forge.game.player.Player;
|
||||
|
||||
public class SetStateAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class SetStateAllAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, Map<String, String> params, SpellAbility sa) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import forge.game.player.Player;
|
||||
|
||||
public class ShuffleAi extends SpellAiLogic {
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// not really sure when the compy would use this; maybe only after a
|
||||
// human
|
||||
// deliberately put a card on top of their library
|
||||
|
||||
@@ -11,7 +11,7 @@ import forge.game.player.Player;
|
||||
public class StoreSVarAi extends SpellAiLogic {
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
//Tree of Redemption
|
||||
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -15,7 +15,7 @@ import forge.util.MyRandom;
|
||||
|
||||
public class TapAi extends TapAiBase {
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TapAllAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(final Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(final Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
// If tapping all creatures do it either during declare attackers of AIs
|
||||
// turn
|
||||
// or during upkeep/begin combat?
|
||||
|
||||
@@ -17,7 +17,7 @@ public class TapOrUntapAi extends TapAiBase {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class TokenAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
final Cost cost = sa.getPayCosts();
|
||||
readParameters(params);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TwoPilesAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Card card = sa.getSourceCard();
|
||||
ZoneType zone = null;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class UnattachAllAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Random r = MyRandom.getRandom();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
|
||||
@@ -27,7 +27,7 @@ public class UntapAi extends SpellAiLogic {
|
||||
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player ai, Map<String, String> params, SpellAbility sa) {
|
||||
final Target tgt = sa.getTarget();
|
||||
final Card source = sa.getSourceCard();
|
||||
final Cost cost = sa.getPayCosts();
|
||||
|
||||
@@ -13,7 +13,7 @@ public class UntapAllAi extends SpellAiLogic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
protected boolean canPlayAI(Player aiPlayer, java.util.Map<String,String> params, SpellAbility sa) {
|
||||
// check SubAbilities DoTrigger?
|
||||
final AbilitySub abSub = sa.getSubAbility();
|
||||
if (abSub != null) {
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ComputerUtilAttack {
|
||||
|
||||
this.attackers = new ArrayList<Card>();
|
||||
for(Card c : computerList)
|
||||
if (CombatUtil.canAttack(c, human))
|
||||
if (CombatUtil.canAttack(c, (GameEntity)human))
|
||||
attackers.add(c);
|
||||
|
||||
this.blockers = this.getPossibleBlockers(humanList, this.attackers);
|
||||
|
||||
Reference in New Issue
Block a user