-convert Ashen Firebeast, Bloodfire Colossus and Borrowing the East Wind to AB/SP$DamageAll

-add Blockbuster and Bloodfire Dwarf
This commit is contained in:
jendave
2011-08-06 14:06:35 +00:00
parent 3c4676fe5b
commit 68c53e17ba
10 changed files with 446 additions and 523 deletions

2
.gitattributes vendored
View File

@@ -534,6 +534,7 @@ res/cardsfolder/blistering_firecat.txt -text svneol=native#text/plain
res/cardsfolder/blizzard_elemental.txt -text svneol=native#text/plain
res/cardsfolder/bloated_toad.txt -text svneol=native#text/plain
res/cardsfolder/blockade_runner.txt -text svneol=native#text/plain
res/cardsfolder/blockbuster.txt -text svneol=native#text/plain
res/cardsfolder/blood_crypt.txt -text svneol=native#text/plain
res/cardsfolder/blood_cultist.txt -text svneol=native#text/plain
res/cardsfolder/blood_knight.txt -text svneol=native#text/plain
@@ -543,6 +544,7 @@ res/cardsfolder/blood_vassal.txt -text svneol=native#text/plain
res/cardsfolder/bloodbraid_elf.txt -text svneol=native#text/plain
res/cardsfolder/bloodcurdling_scream.txt -text svneol=native#text/plain
res/cardsfolder/bloodfire_colossus.txt -text svneol=native#text/plain
res/cardsfolder/bloodfire_dwarf.txt -text svneol=native#text/plain
res/cardsfolder/bloodfire_kavu.txt -text svneol=native#text/plain
res/cardsfolder/bloodghast.txt -text svneol=native#text/plain
res/cardsfolder/bloodied_ghost.txt -text svneol=native#text/plain

View File

@@ -3,6 +3,7 @@ ManaCost:6 R R
Types:Creature Beast
Text:no text
PT:6/6
A:AB$DamageAll | Cost$ 1 R |ValidCards$ Creature.withoutFlying | NumDmg$ X | ValidDescription$ each creature without flying. | SpellDescription$CARDNAME deals 1 damage to each creature without flying.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ashen_firebeast.jpg
SetInfo:ODY|Rare|http://magiccards.info/scans/en/od/174.jpg

View File

@@ -0,0 +1,9 @@
Name:Blockbuster
ManaCost:3 R R
Types:Enchantment
Text:no text
PT:6/6
A:AB$DamageAll | Cost$ 1 R Sac<1/CARDNAME> |ValidCards$ Creature.tapped |ValidPlayers$Each| NumDmg$ 3 | ValidDescription$ each tapped creature and each player. | SpellDescription$CARDNAME deals 3 damage to each tapped creature and each player.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/blockbuster.jpg
End

View File

@@ -3,6 +3,7 @@ ManaCost:6 R R
Types:Creature Giant
Text:no text
PT:6/6
A:AB$DamageAll | Cost$ R Sac<1/CARDNAME> |ValidCards$ Creature |ValidPlayers$Each| NumDmg$ 6 | ValidDescription$ each creature and each player. | SpellDescription$CARDNAME deals 6 damage to each creature and each player.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodfire_colossus.jpg
SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/55.jpg

View File

@@ -0,0 +1,12 @@
Name:Bloodfire Dwarf
ManaCost:R
Types:Creature Dwarf
Text:no text
PT:1/1
A:AB$DamageAll | Cost$ R Sac<1/CARDNAME> |ValidCards$ Creature.withoutFlying |NumDmg$ 1 | ValidDescription$ each creature without flying. | SpellDescription$CARDNAME deals 1 damage to each creature without flying.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodfire_colossus.jpg
SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/55.jpg
SetInfo:9ED|Rare|http://magiccards.info/scans/en/9e/177.jpg
SetInfo:10E|Rare|http://magiccards.info/scans/en/10e/191.jpg
End

View File

@@ -2,6 +2,8 @@ Name:Borrowing the East Wind
ManaCost:X G G
Types:Sorcery
Text:no text
A:SP$DamageAll | Cost$ X G G |ValidCards$ Creature.withHorsemanship |ValidPlayers$Each| NumDmg$ X | ValidDescription$ each creature with horsemanship and each player. | SpellDescription$CARDNAME deals X damage to each creature with horsemanship and each player.
SVar:X:Count$xPaid
SVar:Rarity:Rare
SVar:Picture:http://serv3.tcgimages.eu/img/cards/Portal_Three_Kingdoms/borrowing_the_east_wind.jpg
SetInfo:PTK|Rare|http://magiccards.info/scans/en/p3k/133.jpg

View File

@@ -524,9 +524,11 @@ public class AbilityFactory_DealDamage {
Ability_Cost abCost = sa.getPayCosts();
final Card source = sa.getSourceCard();
final HashMap<String,String> params = af.getMapParams();
String numDmg = params.get("NumDmg");
int dmg = getNumDamage(sa);
String validC = "";
String validP = "";
final int maxX = ComputerUtil.getAvailableMana().size() - CardUtil.getConvertedManaCost(source);
if(params.containsKey("ValidCards"))
validC = params.get("ValidCards");
@@ -539,8 +541,21 @@ public class AbilityFactory_DealDamage {
humanlist = humanlist.getValidCards(validC.split(","), source.getController(), source);
computerlist = computerlist.getValidCards(validC.split(","), source.getController(), source);
CardListFilter filter = new CardListFilter(){
public boolean addCard(Card c)
{
return CardFactoryUtil.canDamage(source, c) && maxX >= (c.getNetDefense() + c.getDamage());
}
};
humanlist = humanlist.getNotKeyword("Indestructible");
computerlist = computerlist.getNotKeyword("Indestructible");
if(numDmg.equals("X")) {
humanlist = humanlist.filter(filter);
computerlist = computerlist.filter(filter);
}
//abCost stuff that should probably be centralized...
if (abCost != null){
@@ -563,6 +578,10 @@ public class AbilityFactory_DealDamage {
return false;
/////
if (AllZone.HumanPlayer.getLife() <= maxX)
return true;
//if we can kill human, do it
if((validP.contains("Each") || validP.contains("EachOpponent")) && AllZone.HumanPlayer.getLife() <= dmg) {
return true;

View File

@@ -5151,38 +5151,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Ashen Firebeast")) {
final Ability ability = new Ability(card, "1 R") {
@Override
public void resolve() {
CardList all = AllZoneUtil.getCreaturesInPlay();
all = all.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return !c.getKeyword().contains("Flying") &&
CardFactoryUtil.canDamage(card, c);
}
});
for(int i = 0; i < all.size(); i++)
all.get(i).addDamage(1, card);
}//resolve()
};//SpellAbility
StringBuilder sb = new StringBuilder();
sb.append(card).append(" deals 1 damage to each creature without flying.");
ability.setStackDescription(sb.toString());
ability.setDescription("1 R: Ashen Firebeast deals 1 damage to each creature without flying.");
card.addSpellAbility(ability);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Scourge of Kher Ridges")) {
@@ -5994,35 +5962,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Bloodfire Colossus")) {
Ability_Cost abCost = new Ability_Cost("R Sac<1/CARDNAME>", cardName, true);
final Ability_Activated ability = new Ability_Activated(card, abCost, null){
private static final long serialVersionUID = 8283052965865884889L;
@Override
public void resolve() {
int damage = 6;
CardList all = AllZoneUtil.getCreaturesInPlay();
for(Card c:all) {
c.addDamage(damage, card);
}
AllZone.ComputerPlayer.addDamage(damage, card);
AllZone.HumanPlayer.addDamage(damage, card);
}//resolve()
};//SpellAbility
card.addSpellAbility(ability);
StringBuilder sb = new StringBuilder();
sb.append(abCost.toString()).append("Bloodfire Colossus deals 6 damage to each creature and each player.");
ability.setDescription(sb.toString());
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Goblin Skycutter")) {
final Ability ability = new Ability(card, "0") {

View File

@@ -4798,68 +4798,6 @@ public class CardFactory_Sorceries {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Borrowing the East Wind"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 3317055866601782361L;
public void resolve()
{
int damage = card.getXManaCostPaid();
CardList all = new CardList();
all.addAll(AllZone.Human_Battlefield.getCards());
all.addAll(AllZone.Computer_Battlefield.getCards());
all = all.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return c.isCreature() && c.getKeyword().contains("Horsemanship") &&
CardFactoryUtil.canDamage(card, c);
}
});
for(int i = 0; i < all.size(); i++)
all.get(i).addDamage(card.getXManaCostPaid(), card);
AllZone.HumanPlayer.addDamage(damage, card);
AllZone.ComputerPlayer.addDamage(damage, card);
card.setXManaCostPaid(0);
}
public boolean canPlayAI()
{
final int maxX = ComputerUtil.getAvailableMana().size() - CardUtil.getConvertedManaCost(card);
if (AllZone.HumanPlayer.getLife() <= maxX)
return true;
CardListFilter filter = new CardListFilter(){
public boolean addCard(Card c)
{
return c.isCreature() && c.getKeyword().contains("Horsemanship") &&
CardFactoryUtil.canDamage(card, c) && maxX >= (c.getNetDefense() + c.getDamage());
}
};
CardList human = new CardList(AllZone.Human_Battlefield.getCards());
human = human.filter(filter);
CardList comp = new CardList(AllZone.Computer_Battlefield.getCards());
comp = comp.filter(filter);
return human.size() > (comp.size() + 2) && AllZone.ComputerPlayer.getLife() > maxX + 3;
}
};
spell.setDescription("Borrowing the East Wind deals X damage to each creature with horsemanship and each player.");
spell.setStackDescription("Borrowing the East Wind - deals X damage to each creature with horsemanship and each player.");
card.clearSpellAbility();
card.addSpellAbility(spell);
}
//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Savage Twister"))
{