- AI for Pump -X/0 cards, targeting Human attackers

This commit is contained in:
mcrawford620
2012-07-18 00:34:53 +00:00
parent 829c8bf9b7
commit ed9cbacb43
15 changed files with 27 additions and 15 deletions

View File

@@ -4,7 +4,6 @@ Types:Instant
Text:no text
A:SP$ Pump | Cost$ 2 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -3 | IsCurse$ True | SpellDescription$ Target creature gets -3/-0 until end of turn. | SubAbility$ DBDraw
SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/bewilder.jpg
SetInfo:TSP|Common|http://magiccards.info/scans/en/ts/49.jpg

View File

@@ -4,7 +4,6 @@ Types:Instant
Text:no text
A:SP$ DealDamage | Cost$ 4 R | ValidTgts$ Player | NumDmg$ 4 | SubAbility$ DmgAll | SpellDescription$ CARDNAME deals 4 damage to target player and 1 damage to each creature that player controls.
SVar:DmgAll:DB$ DamageAll | Cost$ 0 | NumDmg$ 1 | ValidCards$ Creature.TargetedPlayerCtrl
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/chandras_fury.jpg
SetInfo:M13|Common|http://magiccards.info/scans/en/m13/124.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:3 U
Types:Instant
Text:no text
A:SP$ Pump | Cost$ 3 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -7 | IsCurse$ True | SpellDescription$ Target creature gets -7/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/disorient.jpg
SetInfo:M10|Common|http://magiccards.info/scans/en/m10/48.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:1 U
Types:Instant
Text:no text
A:SP$ Tap | Cost$ 1 U | ValidTgts$ Creature | TgtPrompt$ Select up to three target creatures | TargetMin$ 0 | TargetMax$ 3 | SpellDescription$ Tap up to three target creatures.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/downpour.jpg
SetInfo:M13|Common|http://magiccards.info/scans/en/m13/48.jpg

View File

@@ -6,7 +6,7 @@ PT:2/2
S:Mode$ Continuous | Affected$ Creature.Elf+Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | Description$ Other Elf creatures you control get +1/+1.
A:AB$ Mana | Cost$ T | Produced$ G | Amount$ X | References$ X | SpellDescription$ Add G to your mana pool for each Elf you control.
SVar:X:Count$Valid Elf.YouCtrl
SVar:RemAIDeck:True
SVar:DeckWants:Type$Elf
SVar:PlayMain1:TRUE
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/elvish_archdruid.jpg

View File

@@ -4,7 +4,6 @@ Types:Creature Spirit
Text:no text
PT:0/2
A:AB$ Pump | Cost$ T | ValidTgts$ Creature | NumAtt$ -1 | IsCurse$ True | TgtPrompt$ Select target creature | SpellDescription$ Target creature gets -1/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghosts_of_the_damned.jpg
SetInfo:LEG|Common|http://magiccards.info/scans/en/lg/12.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:U
Types:Instant
Text:no text
A:SP$ Pump | Cost$ U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | IsCurse$ True | SpellDescription$ Target creature gets -5/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/hydrosurge.jpg
SetInfo:M13|Common|http://magiccards.info/scans/en/m13/54.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:2 U
Types:Instant
Text:no text
A:SP$ PumpAll | Cost$ 2 U | ValidCards$ Creature.YouDontCtrl | NumAtt$ -4 | NumDef$ 0 | IsCurse$ True |SpellDescription$ Creatures your opponents control get -4/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/hysterical_blindness.jpg
SetInfo:ISD|Common|http://magiccards.info/scans/en/isd/59.jpg

View File

@@ -4,7 +4,6 @@ Types:Instant Trap
Text:no text
A:SP$ PumpAll | Cost$ 3 U | ValidCards$ Creature.attacking | NumAtt$ -3 | IsPresent$ Creature.attacking | PresentCompare$ LE2 | SpellDescription$ If three or more creatures are attacking, you may pay U rather than pay CARDNAME mana cost.
A:SP$ PumpAll | Cost$ U | ValidCards$ Creature.attacking | NumAtt$ -3 | IsPresent$ Creature.attacking | PresentCompare$ GE3 | SpellDescription$ Attacking creatures get -3/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/lethargy_trap.jpg
SetInfo:ZEN|Common|http://magiccards.info/scans/en/zen/51.jpg

View File

@@ -4,7 +4,6 @@ Types:Creature Human Nomad
Text:no text
PT:1/1
A:AB$ Pump | Cost$ 1 G T | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -2 | IsCurse$ True | SpellDescription$ Target creature gets -2/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/pradesh_gypsies.jpg
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/179.jpg

View File

@@ -4,7 +4,6 @@ Types:Creature Human Rebel Cleric
Text:no text
PT:1/2
A:AB$ Pump | Cost$ T | NumAtt$ -2 | IsCurse$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Target creature gets -2/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/saltfield_recluse.jpg
SetInfo:PLC|Common|http://magiccards.info/scans/en/pc/16.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:G
Types:Instant
Text:no text
A:SP$ Pump | Cost$ G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -5 | IsCurse$ True | SpellDescription$ Target creature gets -5/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/shrink.jpg
SetInfo:HML|Common|http://magiccards.info/scans/en/hl/70.jpg|2

View File

@@ -4,7 +4,6 @@ Types:Creature Human Rebel
Text:no text
PT:1/2
A:AB$ Pump | Cost$ W W | ValidTgts$ Creature.attacking | IsCurse$ True | NumAtt$ -1 | TgtPrompt$ Select target attacking creature | SpellDescription$ Target attacking creature gets -1/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/sword_dancer.jpg
SetInfo:PCY|Uncommon|http://magiccards.info/scans/en/pr/25.jpg

View File

@@ -3,7 +3,6 @@ ManaCost:1 U
Types:Instant
Text:no text
A:SP$ PumpAll | Cost$ 1 U | ValidCards$ Creature.YouDontCtrl | IsCurse$ True | NumAtt$ -2 | SpellDescription$ Creatures your opponents control get -2/-0 until end of turn.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/turn_the_tide.jpg
SetInfo:MBS|Common|http://magiccards.info/scans/en/mbs/35.jpg

View File

@@ -650,6 +650,31 @@ public class AbilityFactoryPump {
}
}); // leaves all creatures that will be destroyed
} // -X/-X end
else if ((attack < 0) && !list.isEmpty()) {
// spells that give -X/0
Player activePlayer = Singletons.getModel().getGameState().getPhaseHandler().getPlayerTurn();
if (activePlayer.isComputer()) {
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_BEGIN)) {
// TODO: Curse creatures that will block AI's creatures, if AI is going to attack.
list = new CardList();
} else {
list = new CardList();
}
} else {
// Human active, only curse attacking creatures
if (Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
list = list.filter(new CardListFilter() {
@Override
public boolean addCard(final Card c) {
return c.isAttacking();
}
});
} else {
list = new CardList();
}
}
Singletons.getModel().getGameState().getPhaseHandler().getPhase().isBefore(PhaseType.COMBAT_BEGIN);
} // -X/0 end
else if (!list.isEmpty()) {
final ArrayList<String> keywords = this.keywords;
final boolean addsKeywords = this.keywords.size() > 0;
@@ -662,7 +687,7 @@ public class AbilityFactoryPump {
}
});
} else {
return new CardList();
list = new CardList();
}
}