- Added AI support for Barrage of Boulders.

This commit is contained in:
Sloth
2014-09-21 20:44:08 +00:00
parent b1c07c8f7a
commit 59949eea96
4 changed files with 8 additions and 4 deletions

View File

@@ -85,7 +85,14 @@ public class DamageAllAi extends SpellAbilityAi {
int minGain = 200; // The minimum gain in destroyed creatures
if (sa.getPayCosts() != null && sa.getPayCosts().isReusuableResource()) {
minGain = 100;
if (computerList.isEmpty()) {
minGain = 10; // nothing to lose
} else {
minGain = 100; // safety for errors in evaluate creature
}
} else if (sa.getSubAbility() != null && ai.getGame().getPhaseHandler().isPreCombatMain() && computerList.isEmpty()
&& opp.getCreaturesInPlay().size() > 1 && !ai.getCreaturesInPlay().isEmpty()) {
minGain = 126; // prepare for attack
}
// evaluate both lists and pass only if human creatures are more valuable

View File

@@ -4,7 +4,6 @@ Types:Creature Human Soldier
PT:4/4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control.
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 2 | TargetMin$ 1 | TargetMax$ 2 | DividedAsYouChoose$ 2
SVar:RemAIDeck:True
SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/armament_corps.jpg
Oracle:When Armament Corps enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control.

View File

@@ -5,6 +5,5 @@ A:SP$ DamageAll | Cost$ 2 R | NumDmg$ 1 | ValidCards$ Creature.YouDontCtrl | Val
SVar:DBPumpAll:DB$ Effect | Name$ Barrage of Boulders Effect | StaticAbilities$ KWPump | AILogic$ Evasion | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | References$ X
SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature | AddHiddenKeyword$ CARDNAME can't block. | Description$ Creatures can't block this turn.
SVar:X:Count$Valid Creature.powerGE4+YouCtrl
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/barrage_of_boulders.jpg
Oracle:Barrage of Boulders deals 1 damage to each creature you don't control.\nFerocious - If you control a creature with power 4 or greater, creatures can't block this turn.

View File

@@ -5,6 +5,5 @@ A:SP$ RepeatEach | Cost$ R B W | RepeatPlayers$ Player.Opponent | RepeatSubAbili
SVar:DBDealDamage:DB$ DealDamage | Defined$ Player.IsRemembered | NumDmg$ 2 | SubAbility$ DBChooseCard
SVar:DBChooseCard:DB$ ChooseCard | Defined$ Player.IsRemembered | Choices$ Creature.greatestPowerControlledByRemembered | Mandatory$ True | SubAbility$ DBSac
SVar:DBSac:DB$ Sacrifice | Defined$ Player.IsRemembered | SacValid$ Card.ChosenCard | SacMessage$ the creature with the highest power
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/crackling_doom.jpg
Oracle:Crackling Doom deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures he or she controls.