- Created a new AI SVar "NonStackingEffect" for cards like Blood Moon or Crucible of Worlds.

This commit is contained in:
Sloth
2013-04-09 21:43:38 +00:00
parent b205de91c6
commit 8b0c0481a9
45 changed files with 51 additions and 3 deletions

View File

@@ -502,12 +502,17 @@ public class AiController {
private int getSpellAbilityPriority(SpellAbility sa) {
int p = 0;
Card source = sa.getSourceCard();
// puts creatures in front of spells
if (sa.getSourceCard().isCreature()) {
if (source.isCreature()) {
p += 1;
}
// don't play equipments before having any creatures
if (sa.getSourceCard().isEquipment() && sa.getSourceCard().getController().getCreaturesInPlay().isEmpty()) {
if (source.isEquipment() && sa.getSourceCard().getController().getCreaturesInPlay().isEmpty()) {
p -= 9;
}
// artifacts and enchantments with effects that do not stack
if ("True".equals(source.getSVar("NonStackingEffect")) && source.getController().isCardInPlay(source.getName())) {
p -= 9;
}
// sort planeswalker abilities for ultimate