- The AI can now use Gruul Charm.

This commit is contained in:
Sloth
2013-03-02 19:24:14 +00:00
parent 04efd63554
commit c79b3d0cd2
3 changed files with 9 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ Types:Instant
A:SP$ Charm | Cost$ R G | Choices$ CantBlockEffect,DBGainCtrl,DmgAll | CharmNum$ 1 | SpellDescription$ Choose one - Creatures without flying can't block this turn; or gain control of all permanents you own; or Gruul Charm deals 3 damage to each creature with flying. A:SP$ Charm | Cost$ R G | Choices$ CantBlockEffect,DBGainCtrl,DmgAll | CharmNum$ 1 | SpellDescription$ Choose one - Creatures without flying can't block this turn; or gain control of all permanents you own; or Gruul Charm deals 3 damage to each creature with flying.
SVar:CantBlockEffect:DB$ Effect | Name$ Gruul Charm Effect | StaticAbilities$ KWPump | AILogic$ Evasion | SpellDescription$ Creatures without flying can't block this turn. SVar:CantBlockEffect:DB$ Effect | Name$ Gruul Charm Effect | StaticAbilities$ KWPump | AILogic$ Evasion | SpellDescription$ Creatures without flying can't block this turn.
SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.withoutFlying | AddHiddenKeyword$ CARDNAME can't block. | Description$ Creatures without flying can't block this turn. SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.withoutFlying | AddHiddenKeyword$ CARDNAME can't block. | Description$ Creatures without flying can't block this turn.
SVar:DBGainCtrl:DB$ GainControl | Cost$ R | AllValid$ Permanent.YouOwn | SpellDescription$ Gain control of all permanents you own. SVar:DBGainCtrl:DB$ GainControl | AllValid$ Permanent.YouOwn | SpellDescription$ Gain control of all permanents you own.
SVar:DmgAll:DB$ DamageAll | NumDmg$ 3 | ValidCards$ Creature.withFlying | ValidDescription$ each creature with flying. | SpellDescription$ CARDNAME deals 3 damage to each creature with flying. SVar:DmgAll:DB$ DamageAll | NumDmg$ 3 | ValidCards$ Creature.withFlying | ValidDescription$ each creature with flying. | SpellDescription$ CARDNAME deals 3 damage to each creature with flying.
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_charm.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gruul_charm.jpg

View File

@@ -77,6 +77,13 @@ public class ControlGainAi extends SpellAbilityAi {
// if Defined, then don't worry about targeting // if Defined, then don't worry about targeting
if (tgt == null) { if (tgt == null) {
if (sa.hasParam("AllValid")) {
List<Card> tgtCards = ai.getOpponent().getCardsIn(ZoneType.Battlefield);
tgtCards = AbilityUtils.filterListByType(tgtCards, sa.getParam("AllValid"), sa);
if (tgtCards.isEmpty()) {
return false;
}
}
return true; return true;
} else { } else {
tgt.resetTargets(); tgt.resetTargets();

View File

@@ -91,7 +91,7 @@ public class DamageAllAi extends SpellAbilityAi {
} }
int minGain = 200; // The minimum gain in destroyed creatures int minGain = 200; // The minimum gain in destroyed creatures
if (sa.getPayCosts().isReusuableResource()) { if (sa.getPayCosts() != null && sa.getPayCosts().isReusuableResource()) {
minGain = 100; minGain = 100;
} }