- Improved the AI of more cards by converting etb AF's to DB's.

- Added more AI SVar's.
- Improved the Drawback AI of AF DealDamage.
This commit is contained in:
jendave
2011-08-07 00:26:11 +00:00
parent 425416e339
commit f7282bd318
13 changed files with 77 additions and 68 deletions

10
.gitattributes vendored
View File

@@ -2432,7 +2432,7 @@ res/cardsfolder/fire_at_will.txt svneol=native#text/plain
res/cardsfolder/fire_belly_changeling.txt -text svneol=native#text/plain res/cardsfolder/fire_belly_changeling.txt -text svneol=native#text/plain
res/cardsfolder/fire_bowman.txt -text svneol=native#text/plain res/cardsfolder/fire_bowman.txt -text svneol=native#text/plain
res/cardsfolder/fire_diamond.txt -text svneol=native#text/plain res/cardsfolder/fire_diamond.txt -text svneol=native#text/plain
res/cardsfolder/fire_dragon.txt svneol=native#text/plain res/cardsfolder/fire_dragon.txt -text svneol=native#text/plain
res/cardsfolder/fire_drake.txt -text svneol=native#text/plain res/cardsfolder/fire_drake.txt -text svneol=native#text/plain
res/cardsfolder/fire_elemental.txt -text svneol=native#text/plain res/cardsfolder/fire_elemental.txt -text svneol=native#text/plain
res/cardsfolder/fire_field_ogre.txt -text svneol=native#text/plain res/cardsfolder/fire_field_ogre.txt -text svneol=native#text/plain
@@ -2449,7 +2449,7 @@ res/cardsfolder/firebreathing.txt -text svneol=native#text/plain
res/cardsfolder/firecat_blitz.txt svneol=native#text/plain res/cardsfolder/firecat_blitz.txt svneol=native#text/plain
res/cardsfolder/firefly.txt -text svneol=native#text/plain res/cardsfolder/firefly.txt -text svneol=native#text/plain
res/cardsfolder/firemane_angel.txt -text svneol=native#text/plain res/cardsfolder/firemane_angel.txt -text svneol=native#text/plain
res/cardsfolder/firemaw_kavu.txt svneol=native#text/plain res/cardsfolder/firemaw_kavu.txt -text svneol=native#text/plain
res/cardsfolder/fires_of_yavimaya.txt -text svneol=native#text/plain res/cardsfolder/fires_of_yavimaya.txt -text svneol=native#text/plain
res/cardsfolder/firescreamer.txt -text svneol=native#text/plain res/cardsfolder/firescreamer.txt -text svneol=native#text/plain
res/cardsfolder/fireshrieker.txt -text svneol=native#text/plain res/cardsfolder/fireshrieker.txt -text svneol=native#text/plain
@@ -2874,7 +2874,7 @@ res/cardsfolder/goblin_chariot.txt -text svneol=native#text/plain
res/cardsfolder/goblin_chieftain.txt -text svneol=native#text/plain res/cardsfolder/goblin_chieftain.txt -text svneol=native#text/plain
res/cardsfolder/goblin_chirurgeon.txt svneol=native#text/plain res/cardsfolder/goblin_chirurgeon.txt svneol=native#text/plain
res/cardsfolder/goblin_clearcutter.txt svneol=native#text/plain res/cardsfolder/goblin_clearcutter.txt svneol=native#text/plain
res/cardsfolder/goblin_commando.txt svneol=native#text/plain res/cardsfolder/goblin_commando.txt -text svneol=native#text/plain
res/cardsfolder/goblin_deathraiders.txt -text svneol=native#text/plain res/cardsfolder/goblin_deathraiders.txt -text svneol=native#text/plain
res/cardsfolder/goblin_digging_team.txt -text svneol=native#text/plain res/cardsfolder/goblin_digging_team.txt -text svneol=native#text/plain
res/cardsfolder/goblin_dirigible.txt -text svneol=native#text/plain res/cardsfolder/goblin_dirigible.txt -text svneol=native#text/plain
@@ -4979,7 +4979,7 @@ res/cardsfolder/otarian_juggernaut.txt -text svneol=native#text/plain
res/cardsfolder/oubliette.txt -text svneol=native#text/plain res/cardsfolder/oubliette.txt -text svneol=native#text/plain
res/cardsfolder/oust.txt -text svneol=native#text/plain res/cardsfolder/oust.txt -text svneol=native#text/plain
res/cardsfolder/outbreak.txt svneol=native#text/plain res/cardsfolder/outbreak.txt svneol=native#text/plain
res/cardsfolder/outrage_shaman.txt svneol=native#text/plain res/cardsfolder/outrage_shaman.txt -text svneol=native#text/plain
res/cardsfolder/outrider_of_jhess.txt -text svneol=native#text/plain res/cardsfolder/outrider_of_jhess.txt -text svneol=native#text/plain
res/cardsfolder/overbeing_of_myth.txt -text svneol=native#text/plain res/cardsfolder/overbeing_of_myth.txt -text svneol=native#text/plain
res/cardsfolder/overburden.txt -text svneol=native#text/plain res/cardsfolder/overburden.txt -text svneol=native#text/plain
@@ -6086,7 +6086,7 @@ res/cardsfolder/serendib_sorcerer.txt -text svneol=native#text/plain
res/cardsfolder/serene_heart.txt -text svneol=native#text/plain res/cardsfolder/serene_heart.txt -text svneol=native#text/plain
res/cardsfolder/serene_offering.txt -text svneol=native#text/plain res/cardsfolder/serene_offering.txt -text svneol=native#text/plain
res/cardsfolder/serene_sunset.txt svneol=native#text/plain res/cardsfolder/serene_sunset.txt svneol=native#text/plain
res/cardsfolder/serenity.txt svneol=native#text/plain res/cardsfolder/serenity.txt -text svneol=native#text/plain
res/cardsfolder/serpent_assassin.txt -text svneol=native#text/plain res/cardsfolder/serpent_assassin.txt -text svneol=native#text/plain
res/cardsfolder/serpent_generator.txt -text svneol=native#text/plain res/cardsfolder/serpent_generator.txt -text svneol=native#text/plain
res/cardsfolder/serpent_of_the_endless_sea.txt -text svneol=native#text/plain res/cardsfolder/serpent_of_the_endless_sea.txt -text svneol=native#text/plain

View File

@@ -4,7 +4,8 @@ Types:Creature Human Advisor
Text:no text Text:no text
PT:2/2 PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2 SVar:TrigDealDamage:DB$DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2
SVar:PlayMain1:TRUE
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/corrupt_eunuchs.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/corrupt_eunuchs.jpg
SetInfo:PTK|Uncommon|http://magiccards.info/scans/en/p3k/106.jpg SetInfo:PTK|Uncommon|http://magiccards.info/scans/en/p3k/106.jpg

View File

@@ -1,14 +1,14 @@
Name:Fire Dragon Name:Fire Dragon
ManaCost:6 R R R ManaCost:6 R R R
Types:Creature Dragon Types:Creature Dragon
Text:no text Text:no text
PT:6/6 PT:6/6
K:Flying K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals damage equal to the number of Mountains you control to target creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals damage equal to the number of Mountains you control to target creature.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X
SVar:X:Count$TypeYouCtrl.Mountain SVar:X:Count$TypeYouCtrl.Mountain
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/fire_dragon.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/fire_dragon.jpg
SetInfo:POR|Rare|http://magiccards.info/scans/en/po/130.jpg SetInfo:POR|Rare|http://magiccards.info/scans/en/po/130.jpg
End End

View File

@@ -4,7 +4,8 @@ Types:Creature Imp
Text:no text Text:no text
PT:2/1 PT:2/1
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2 SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2
SVar:PlayMain1:TRUE
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://resources.wizards.com/magic/cards/po/en-us/card4337.jpg SVar:Picture:http://resources.wizards.com/magic/cards/po/en-us/card4337.jpg
SetInfo:POR|Uncommon|http://magiccards.info/scans/en/po/131.jpg SetInfo:POR|Uncommon|http://magiccards.info/scans/en/po/131.jpg

View File

@@ -1,14 +1,15 @@
Name:Firemaw Kavu Name:Firemaw Kavu
ManaCost:5 R ManaCost:5 R
Types:Creature Kavu Types:Creature Kavu
Text:no text Text:no text
PT:4/2 PT:4/2
K:Echo:5 R K:Echo:5 R
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage2pts | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage2pts | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigDealDamage4pts | TriggerDescription$ When CARDNAME leaves the battlefield, it deals 4 damage to target creature. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigDealDamage4pts | TriggerDescription$ When CARDNAME leaves the battlefield, it deals 4 damage to target creature.
SVar:TrigDealDamage2pts:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2 SVar:TrigDealDamage2pts:DB$ DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2
SVar:TrigDealDamage4pts:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 4 SVar:TrigDealDamage4pts:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 4
SVar:Rarity:Uncommon SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/firemaw_kavu.jpg SVar:Rarity:Uncommon
SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/153.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/firemaw_kavu.jpg
SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/153.jpg
End End

View File

@@ -6,6 +6,7 @@ PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature or player. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature or player.
K:Echo:2 R K:Echo:2 R
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 2 SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 2
SVar:PlayMain1:TRUE
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghitu_slinger.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/ghitu_slinger.jpg
SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/77.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/77.jpg

View File

@@ -1,11 +1,12 @@
Name:Goblin Commando Name:Goblin Commando
ManaCost:4 R ManaCost:4 R
Types:Creature Goblin Types:Creature Goblin
Text:no text Text:no text
PT:2/2 PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to target creature.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2 SVar:TrigDealDamage:DB$DealDamage | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2
SVar:Rarity:Uncommon SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_commando.jpg SVar:Rarity:Uncommon
SetInfo:S99|Uncommon|http://magiccards.info/scans/en/st/100.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_commando.jpg
SetInfo:S99|Uncommon|http://magiccards.info/scans/en/st/100.jpg
End End

View File

@@ -5,7 +5,7 @@ Text:no text
PT:4/4 PT:4/4
K:Haste K:Haste
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 4 damage to you. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 4 damage to you.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Defined$ You | NumDmg$ 4 SVar:TrigDealDamage:DB$DealDamage | Defined$ You | NumDmg$ 4
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/lava_hounds.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/lava_hounds.jpg
SetInfo:8ED|Rare|http://magiccards.info/scans/en/8e/198.jpg SetInfo:8ED|Rare|http://magiccards.info/scans/en/8e/198.jpg

View File

@@ -4,7 +4,7 @@ Types:Creature Giant
Text:no text Text:no text
PT:5/5 PT:5/5
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDamageAll | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to each creature and each player. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDamageAll | TriggerDescription$ When CARDNAME enters the battlefield, it deals 2 damage to each creature and each player.
SVar:TrigDamageAll:AB$DamageAll | Cost$ 0 | ValidCards$ Creature| ValidPlayers$ Each | NumDmg$ 2 | ValidDescription$ each creature and each player. SVar:TrigDamageAll:DB$DamageAll | ValidCards$ Creature | ValidPlayers$ Each | NumDmg$ 2 | ValidDescription$ each creature and each player.
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/magma_giant.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/magma_giant.jpg

View File

@@ -1,12 +1,13 @@
Name:Outrage Shaman Name:Outrage Shaman
ManaCost:3 R R ManaCost:3 R R
Types:Creature Goblin Shaman Types:Creature Goblin Shaman
Text:no text Text:no text
PT:2/2 PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ Chroma - When CARDNAME enters the battlefield, it deals damage to target creature equal to the number of red mana symbols in the mana costs of permanents you control. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ Chroma - When CARDNAME enters the battlefield, it deals damage to target creature equal to the number of red mana symbols in the mana costs of permanents you control.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtC | NumDmg$ X SVar:TrigDealDamage:DB$DealDamage | Tgt$ TgtC | NumDmg$ X
SVar:X:Count$Chroma.R SVar:X:Count$Chroma.R
SVar:Rarity:Uncommon SVar:PlayMain1:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/outrage_shaman.jpg SVar:Rarity:Uncommon
SetInfo:EVE|Uncommon|http://magiccards.info/scans/en/eve/59.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/outrage_shaman.jpg
SetInfo:EVE|Uncommon|http://magiccards.info/scans/en/eve/59.jpg
End End

View File

@@ -1,11 +1,13 @@
Name:Serenity Name:Serenity
ManaCost:1 W ManaCost:1 W
Types:Enchantment Types:Enchantment
Text:no text Text:no text
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDestroyAll | TriggerDescription$ At the beginning of your upkeep, destroy all artifacts and enchantments. They can't be regenerated. T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDestroyAll | TriggerDescription$ At the beginning of your upkeep, destroy all artifacts and enchantments. They can't be regenerated.
SVar:TrigDestroyAll:AB$DestroyAll | Cost$ 0 | ValidCards$ Artifact,Enchantment | NoRegen$ True SVar:TrigDestroyAll:AB$DestroyAll | Cost$ 0 | ValidCards$ Artifact,Enchantment | NoRegen$ True
SVar:Rarity:Rare SVar:NeedsToPlay:Artifact.YouDontCtrl,Enchantment.YouDontCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/serenity.jpg SVar:RemAIDeck:True
SetInfo:WTH|Rare|http://magiccards.info/scans/en/wl/140.jpg SVar:Rarity:Rare
SetInfo:6ED|Rare|http://magiccards.info/scans/en/6e/41.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/serenity.jpg
SetInfo:WTH|Rare|http://magiccards.info/scans/en/wl/140.jpg
SetInfo:6ED|Rare|http://magiccards.info/scans/en/6e/41.jpg
End End

View File

@@ -5,7 +5,7 @@ Text:no text
PT:6/3 PT:6/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 3 damage to target creature you control. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerDescription$ When CARDNAME enters the battlefield, it deals 3 damage to target creature you control.
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature.YouCtrl | NumDmg$ 3 | TgtPrompt$ Select target creature you control SVar:TrigDamage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature.YouCtrl | NumDmg$ 3 | TgtPrompt$ Select target creature you control
SVar:RemRandomDeck:True SVar:RemAIDeck:True
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/whiptail_moloch.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/whiptail_moloch.jpg
SetInfo:DIS|Common|http://magiccards.info/scans/en/di/79.jpg SetInfo:DIS|Common|http://magiccards.info/scans/en/di/79.jpg

View File

@@ -423,7 +423,8 @@ public class AbilityFactory_DealDamage {
} }
else if (o instanceof Player){ else if (o instanceof Player){
Player p = (Player)o; Player p = (Player)o;
if (p.isComputer() && dmg >= p.getLife()) // Damage from this spell will kill me int restDamage = p.predictDamage(dmg, AF.getHostCard(), false);
if (p.isComputer() && p.canLoseLife() && restDamage + 3 >= p.getLife() && restDamage > 0) // Damage from this spell will kill me
return false; return false;
if (p.isHuman() && !p.canLoseLife()) if (p.isHuman() && !p.canLoseLife())
return false; return false;