- fixed a few bugs with the parser for subtypes
- fixed a bug for plague rats
- fixed a bug for P/T parser
- First release for the following sets: Mirrodin, Mirage, Lorwyn
This commit is contained in:
wagic.the.homebrew
2009-03-14 11:00:31 +00:00
parent bb23db4b16
commit 658ef1fb12
22 changed files with 11783 additions and 59 deletions

View File

@@ -0,0 +1,617 @@
[card]
text=
id=145976
name=Axegrinder Giant
rarity=C
type=Creature
mana={4}{R}{R}
power=6
subtype=Giant Warrior
toughness=4
[/card]
[card]
text=Enchant creature Enchanted creature has double strike.
target=creature
auto=double strike
id=145973
name=Battle Mastery
rarity=U
type=Enchantment
mana={2}{W}
subtype=Aura
[/card]
[card]
text=Return target Goblin card from your graveyard to your hand.
target=goblin(mygraveyard)
auto=moveTo(myHand)
id=142359
name=Boggart Birth Rite
rarity=C
type=Sorcery
subtype=tribal
mana={B}
subtype=Goblin
[/card]
[card]
text=Forestwalk {2}{B}, Sacrifice Boggart Loggers: Destroy target Treefolk or Forest.
abilities=forestwalk
auto={2}{B}{S}:destroy target(treefolk,forest)
id=139709
name=Boggart Loggers
rarity=C
type=Creature
mana={2}{B}
power=2
subtype=Goblin Rogue
toughness=1
[/card]
[card]
text=Reach (This can block creatures with flying.)
abilities=reach
id=139492
name=Cloudcrown Oak
rarity=C
type=Creature
mana={2}{G}{G}
power=3
subtype=Treefolk Warrior
toughness=4
[/card]
[card]
text={U}: Deeptread Merrow gains islandwalk until end of turn.
auto={U}:islandwalk
id=142352
name=Deeptread Merrow
rarity=C
type=Creature
mana={1}{U}
power=2
subtype=Merfolk Rogue
toughness=1
[/card]
[card]
text=Flash Enchant creature Enchanted creature gets +5/+5 and has trample.
abilities=flash
target=creature
auto=5/5
auto=trample
id=143732
name=Epic Proportions
rarity=R
type=Enchantment
mana={4}{G}{G}
subtype=Aura
[/card]
[card]
text=Destroy target non-Elf creature.
target=creature[-elf]
auto=destroy
id=139449
name=Eyeblight's Ending
rarity=C
type=Instant
subtype=tribal
mana={2}{B}
subtype=Elf
[/card]
[card]
text={B}, Sacrifice a Goblin: Facevaulter gets +2/+2 until end of turn.
auto={B},{S(goblin|myinplay)}:2/2
id=142361
name=Facevaulter
rarity=C
type=Creature
mana={B}
power=1
subtype=Goblin Warrior
toughness=1
[/card]
[card]
text={R}: Flamekin Brawler gets +1/+0 until end of turn.
auto={R}:1/0
id=139461
name=Flamekin Brawler
rarity=C
type=Creature
mana={R}
power=0
subtype=Elemental Warrior
toughness=2
[/card]
[card]
text={3}{R}: Flamekin Spitfire deals 1 damage to target creature or player.
auto={3}{R}:damage 1 target(creature,player)
id=139728
name=Flamekin Spitfire
rarity=U
type=Creature
mana={1}{R}
power=1
subtype=Elemental Shaman
toughness=1
[/card]
[card]
text={T}: Add {G} to your mana pool.
auto={T}:Add {G}
id=143633
name=Forest
rarity=L
type=Basic Land
subtype=Forest
[/card]
[card]
text={T}: Add {G} to your mana pool.
auto={T}:Add {G}
id=143625
name=Forest
rarity=L
type=Basic Land
subtype=Forest
[/card]
[card]
text={T}: Add {G} to your mana pool.
auto={T}:Add {G}
id=143618
name=Forest
rarity=L
type=Basic Land
subtype=Forest
[/card]
[card]
text={T}: Add {G} to your mana pool.
auto={T}:Add {G}
id=143617
name=Forest
rarity=L
type=Basic Land
subtype=Forest
[/card]
[card]
text={W}, {T}: Tap target creature.
auto={W}{T}:tap target(creature)
id=139397
name=Goldmeadow Harrier
rarity=C
type=Creature
mana={W}
power=1
subtype=Kithkin Soldier
toughness=1
[/card]
[card]
text=When Guardian of Cloverdell comes into play, put three 1/1 white Kithkin Soldier creature tokens into play. {G}, Sacrifice a Kithkin: You gain 1 life.
auto=token(Kithkin Soldier,creature Kithkin Soldier,1/1,white)*3
auto={G}{S(kithkin|myinplay)}:life 1
id=139665
name=Guardian of Cloverdell
rarity=U
type=Creature
mana={5}{G}{G}
power=4
subtype=Treefolk Shaman
toughness=5
[/card]
[card]
text=When Hearthcage Giant comes into play, put two 3/1 red Elemental Shaman creature tokens into play. Sacrifice an Elemental: Target Giant creature gets +3/+1 until end of turn.
auto=token(Elemental Shaman,creature Elemental Shaman,3/1,red)*3
auto={G}{S(elemental|myinplay)}:3/1
id=139691
name=Hearthcage Giant
rarity=U
type=Creature
mana={6}{R}{R}
power=5
subtype=Giant Warrior
toughness=5
[/card]
[card]
text=Mountainwalk
abilities=Mountainwalk
id=145971
name=Hillcomber Giant
rarity=C
type=Creature
mana={2}{W}{W}
power=3
subtype=Giant Scout
toughness=3
[/card]
[card]
text=Vigilance, trample, haste {W}{U}{B}{R}{G}: You may play target Elemental card from your graveyard without paying its mana cost.
abilities=vigilance,trample,haste
auto={W}{U}{B}{R}{G}:moveTo(myInPlay) target(elemental|mygraveyard)
id=140219
name=Horde of Notions
rarity=R
type=Legendary Creature
mana={W}{U}{B}{R}{G}
power=5
subtype=Elemental
toughness=5
[/card]
[card]
text=Other Elf creatures you control get +1/+1. {G}, {T}: Put a 1/1 green Elf Warrior creature token into play.
auto=lord(elf) 1/1
auto={G}{T}:token(Elf Warrior,creature Elf Warrior,1/1,green)
id=139683
name=Imperious Perfect
rarity=U
type=Creature
mana={2}{G}
power=2
subtype=Elf Warrior
toughness=2
[/card]
[card]
text={T}: Add {U} to your mana pool.
auto={T}:Add {U}
id=143619
name=Island
rarity=L
type=Basic Land
subtype=Island
[/card]
[card]
text={T}: Add {U} to your mana pool.
auto={T}:Add {U}
id=143632
name=Island
rarity=L
type=Basic Land
subtype=Island
[/card]
[card]
text={T}: Add {U} to your mana pool.
auto={T}:Add {U}
id=143624
name=Island
rarity=L
type=Basic Land
subtype=Island
[/card]
[card]
text={T}: Add {U} to your mana pool.
auto={T}:Add {U}
id=143628
name=Island
rarity=L
type=Basic Land
subtype=Island
[/card]
[card]
text={G}, {T}: Target attacking creature gets +2/+2 until end of turn.
auto={G}{T}:target(creature[attacking]) 2/2
id=139498
name=Kithkin Daggerdare
rarity=C
type=Creature
mana={1}{G}
power=1
subtype=Kithkin Soldier
toughness=1
[/card]
[card]
text=First strike Lifelink (Whenever this creature deals damage, you gain that much life.)
auto=first strike, lifelink
id=139715
name=Knight of Meadowgrain
rarity=U
type=Creature
mana={W}{W}
power=2
subtype=Kithkin Knight
toughness=2
[/card]
[card]
text={T}: Add {G} to your mana pool.
auto={T}:Add {G}
id=139487
name=Leaf Gilder
rarity=C
type=Creature
mana={1}{G}
power=2
subtype=Elf Druid
toughness=1
[/card]
[card]
text=Sacrifice Moonglove Extract: Moonglove Extract deals 2 damage to target creature or player.
auot={S}:damage 2 target(creature,player)
id=139506
name=Moonglove Extract
rarity=C
type=Artifact
mana={3}
[/card]
[card]
text={T}: Add {R} to your mana pool.
auto={T}: Add {R}
id=143626
name=Mountain
rarity=L
type=Basic Land
subtype=Mountain
[/card]
[card]
text={T}: Add {R} to your mana pool.
auto={T}: Add {R}
id=143627
name=Mountain
rarity=L
type=Basic Land
subtype=Mountain
[/card]
[card]
text={T}: Add {R} to your mana pool.
auto={T}: Add {R}
id=143631
name=Mountain
rarity=L
type=Basic Land
subtype=Mountain
[/card]
[card]
text={T}: Add {R} to your mana pool.
auto={T}: Add {R}
id=143623
name=Mountain
rarity=L
type=Basic Land
subtype=Mountain
[/card]
[card]
text=Destroy target attacking or blocking creature.
target=creature[attacking;blocking]
id=139693
name=Neck Snap
rarity=C
type=Instant
mana={3}{W}
[/card]
[card]
text=Vigilance, trample
abilities=vigilance,trample
id=139494
name=Oakgnarl Warrior
rarity=C
type=Creature
mana={5}{G}{G}
power=5
subtype=Treefolk Warrior
toughness=7
[/card]
[card]
text={T}: Add {W} to your mana pool.
auto={T}:add{W}
id=143630
name=Plains
rarity=L
type=Basic Land
subtype=Plains
[/card]
[card]
text={T}: Add {W} to your mana pool.
auto={T}:add{W}
id=143620
name=Plains
rarity=L
type=Basic Land
subtype=Plains
[/card]
[card]
text={T}: Add {W} to your mana pool.
auto={T}:add{W}
id=143622
name=Plains
rarity=L
type=Basic Land
subtype=Plains
[/card]
[card]
text={T}: Add {W} to your mana pool.
auto={T}:add{W}
id=143621
name=Plains
rarity=L
type=Basic Land
subtype=Plains
[/card]
[card]
text=Flying, first strike
abilities=flying,first strike
id=139396
name=Plover Knights
rarity=C
type=Creature
mana={3}{W}{W}
power=3
subtype=Kithkin Knight
toughness=3
[/card]
[card]
text=Enchant creature Enchanted creature is unblockable and has shroud. (It can't be the target of spells or abilities.)
target=creature
auto=unblockable
auto=shroud
id=139687
name=Protective Bubble
rarity=C
type=Enchantment
mana={3}{U}
subtype=Aura
[/card]
[card]
text=Flash Flying Other Faerie creatures you control get +1/+1. Other Faeries you control have shroud. (A permanent with shroud can't be the target of spells or abilities.)
abilities=flash,flying
auto=lord(faerie) 1/1
auto=lord(faerie) shroud
id=139741
name=Scion of Oona
rarity=R
type=Creature
mana={2}{U}
power=1
subtype=Faerie Soldier
toughness=1
[/card]
[card]
text=Flash Flying
abilities=flash,flying
id=139426
name=Sentinels of Glen Elendra
rarity=C
type=Creature
mana={3}{U}
power=2
subtype=Faerie Soldier
toughness=3
[/card]
[card]
text={T}: Add {1} to your mana pool. {1}, {T}: Add one mana of any color to your mana pool.
auto={T}:Add {1}
auto={1}{T}: Add {G}
auto={1}{T}: Add {R}
auto={1}{T}: Add {B}
auto={1}{T}: Add {U}
auto={1}{T}: Add {W}
id=141802
name=Shimmering Grotto
rarity=C
type=Land
[/card]
[card]
text=Enchant creature When Soaring Hope comes into play, you gain 3 life. Enchanted creature has flying. {W}: Put Soaring Hope on top of its owner's library.
target=creature
auto=life 3
auto=flying
auto={W}: moveTo(ownerlibrary)
id=139511
name=Soaring Hope
rarity=C
type=Enchantment
mana={4}{W}
subtype=Aura
[/card]
[card]
text={1}{U}, {T}: You may tap or untap target creature.
auto={1}{U}{T}:tap target(creature)
auto={1}{U}{T}:untap target(creature)
id=142358
name=Stonybrook Angler
rarity=C
type=Creature
mana={1}{U}
power=1
subtype=Merfolk Wizard
toughness=2
[/card]
[card]
text=Other Giant creatures you control get +2/+2 and have trample.
auto=lord(giant) 2/2
auto=lord(giant) trample
id=139667
name=Sunrise Sovereign
rarity=R
type=Creature
mana={5}{R}
power=5
subtype=Giant Warrior
toughness=5
[/card]
[card]
text={T}: Add {B} to your mana pool.
auto={T}: Add {B}
id=143629
name=Swamp
rarity=L
type=Basic Land
subtype=Swamp
[/card]
[card]
text={T}: Add {B} to your mana pool.
auto={T}: Add {B}
id=143636
name=Swamp
rarity=L
type=Basic Land
subtype=Swamp
[/card]
[card]
text={T}: Add {B} to your mana pool.
auto={T}: Add {B}
id=143635
name=Swamp
rarity=L
type=Basic Land
subtype=Swamp
[/card]
[card]
text={T}: Add {B} to your mana pool.
auto={T}: Add {B}
id=143634
name=Swamp
rarity=L
type=Basic Land
subtype=Swamp
[/card]
[card]
text={T}, Sacrifice a Goblin: Tar Pitcher deals 2 damage to target creature or player.
auto={T},{S(goblin|myinplay)}:damage 2 target(creature,player)
id=139470
name=Tar Pitcher
rarity=U
type=Creature
mana={3}{R}
power=2
subtype=Goblin Shaman
toughness=2
[/card]
[card]
text=Tarfire deals 2 damage to target creature or player.
target=creature,player
auto=damage 2
id=139476
name=Tarfire
rarity=C
type=Instant
mana={R}
subtype=Goblin Tribal
[/card]
[card]
text=Flash Enchant creature When Triclopean Sight comes into play, untap enchanted creature. Enchanted creature gets +1/+1 and has vigilance.
abilities=flash
target=creature
auto=untap
auto=1/1
auto=vigilance
id=146580
name=Triclopean Sight
rarity=C
type=Enchantment
mana={1}{W}
subtype=Aura
[/card]
[card]
text=Other Kithkin creatures you control get +1/+1.
auto=lord(kithkin) 1/1
id=139716
name=Wizened Cenn
rarity=U
type=Creature
mana={W}{W}
power=2
subtype=Kithkin Cleric
toughness=2
[/card]
[card]
text=Enchant creature Enchanted creature has defender and flying.
target=creature
auto=flying
auto=defender
id=142357
name=Zephyr Net
rarity=C
type=Enchantment
mana={1}{U}
subtype=Aura
[/card]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -219,6 +219,18 @@ subtype=Treefolk Shaman
toughness=6
[/card]
[card]
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
auto={S}:destroy target(land[-basic])
id=142009
name=Fulminator Mage
rarity=R
type=Creature
mana={1}{BR}{BR}
power=2
subtype=Elemental Shaman
toughness=2
[/card]
[card]
text=Flying Other blue creatures you control get +1/+1. Other black creatures you control get +1/+1.
abilities=flying
auto=lord(creature[blue]|myinplay) 1/1

View File

@@ -595,18 +595,6 @@ type=Instant
mana={2}{GW}{GW}{GW}
[/card]
[card]
text=Sacrifice Fulminator Mage: Destroy target nonbasic land.
auto={S}:destroy target(land[-plains;-mountain;-swamp;-forest;-island])
id=142009
name=Fulminator Mage
rarity=R
type=Creature
mana={1}{BR}{BR}
power=2
subtype=Elemental Shaman
toughness=2
[/card]
[card]
text=When Furystoke Giant comes into play, other creatures you control gain "{T}: This creature deals 2 damage to target creature or player" until end of turn. Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
id=152069
name=Furystoke Giant

View File

@@ -43,6 +43,7 @@ doomed_necromancer.txt
dragon_fodder.txt
drain_life.txt
flare.txt
foratog.txt
force_of_nature.txt
force_of_nature2.txt
force_of_nature3.txt
@@ -65,6 +66,7 @@ nantuko_husk.txt
orcish_lumberjack.txt
paralysis.txt
paralysis2.txt
plague_rats.txt
protomatter_powder.txt
resurrection.txt
rootwalla.txt
@@ -76,6 +78,7 @@ spark_elemental.txt
stasis.txt
sword_to_plowshares.txt
terror.txt
tranquil_domain.txt
volcanic_island.txt
white_knight1.txt
wrath_of_god.txt

View File

@@ -0,0 +1,30 @@
#text={G}, Sacrifice a Forest: Foratog gets +2/+2 until end of turn.
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:3386,3566
manapool:{G}
[PLAYER2]
[DO]
3386
3566
next
#combat begin
next
#attackers
3386
next
#blockers
next
#damages
next
#combat end
[ASSERT]
COMBATEND
[PLAYER1]
graveyard:3566
inplay:3386
manapool:{0}
[PLAYER2]
life:17
[END]

View File

@@ -0,0 +1,19 @@
#Testing Plague rats (lightning bolt on one of them)
[INIT]
FIRSTMAIN
[PLAYER1]
hand:1303
inplay:1173,1173,1173,1173
manapool:{R}
[PLAYER2]
[DO]
1303
1173
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:1303
manapool:{0}
inplay:1173,1173,1173,1173
[PLAYER2]
[END]

View File

@@ -0,0 +1,23 @@
#text=Destroy all non-Aura enchantments.
[INIT]
FIRSTMAIN
[PLAYER1]
hand:3414,3425,
inplay:1250,3566,143024
manapool:{2}{R}
[PLAYER2]
[DO]
#play aura on grizzly
3425
1250
#play tranquil domain
3566
3414
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:3414,143024
inplay:1250,3566,3425
manapool:{0}
[PLAYER2]
[END]

View File

@@ -19,6 +19,7 @@ class CardDescriptor: public MTGCardInstance{
int mode;
int init();
CardDescriptor();
void setNegativeSubtype( string value);
MTGCardInstance * match(MTGCardInstance * card);
MTGCardInstance * match(MTGGameZone * zone);
MTGCardInstance * nextmatch(MTGGameZone * zone, MTGCardInstance * previous);

View File

@@ -42,6 +42,7 @@ class MTGCard {
TexturesCache * mCache;
string text;
string name;
int colors[Constants::MTG_NB_COLORS];
int basicAbilities[Constants::NB_BASIC_ABILITIES];
vector<string> formattedText;

View File

@@ -13,13 +13,26 @@ int CardDescriptor::init(){
return result;
}
void CardDescriptor::setNegativeSubtype( string value){
int id = Subtypes::subtypesList->Add(value);
addType(-id);
}
MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){
int found = 1;
for (int i = 0; i< nb_types; i++){
found = 0;
if (card->hasSubtype(types[i]) || (card->name.compare(Subtypes::subtypesList->find(types[i])) == 0)){
found = 1;
break;
if (types[i] >= 0){
if (card->hasSubtype(types[i]) || (Subtypes::subtypesList->find(card->name) == types[i])){
found = 1;
break;
}
}else{
if (!card->hasSubtype(-types[i])){
found = 1;
break;
}
}
}
if (!found) return NULL;
@@ -47,9 +60,14 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card){
MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card){
MTGCardInstance * match = card;
for (int i = 0; i< nb_types; i++){
if (!card->hasSubtype(types[i]) && !(card->name.compare(Subtypes::subtypesList->find(types[i])) == 0)){
match = NULL;
if (types[i] >= 0){
if (!card->hasSubtype(types[i]) && !(Subtypes::subtypesList->find(card->name) == types[i])){
match = NULL;
}
}else{
if(card->hasSubtype(-types[i])){
match = NULL;
}
}
}
for (int i = 0; i< Constants::MTG_NB_COLORS; i++){

View File

@@ -284,12 +284,16 @@ void CardGui::Render(){
JRenderer * renderer = JRenderer::GetInstance();
JQuad * quad = card->getThumb();
#if defined (WIN32) || defined (LINUX)
//This shouldn't be done for the PSP. Basically it forces the system to load
// The big image if it cannot find the thumbnail. That's great for image quality on a PC,
// But it kills the performance for those who don't have thumbnails on the PSP
if (!quad || quad->mHeight * 2 < mHeight){
JQuad * quad2 = card->getQuad();
if (quad2)
quad = quad2;
}
#endif
float tap = (float)(card->isTapped());
float rotation = M_PI_2 * tap;
float mScale = mHeight / 64;

View File

@@ -67,8 +67,10 @@ Damageable * AbilityFactory::parseCollateralTarget(MTGCardInstance * card, strin
int AbilityFactory::parsePowerToughness(string s, int *power, int *toughness){
size_t found = s.find("/");
if (found != string::npos){
size_t start = s.find(":", found - 4);
if (start == string::npos) start = s.find(" ", found - 4);
int search_from = found - 4;
if (search_from < 0) search_from = 0;
size_t start = s.find(':', search_from);
if (start == string::npos) start = s.find(" ", search_from);
if (start == string::npos) start = -1;
*power = atoi(s.substr(start+1,s.size()-found).c_str());
size_t end = s.find(" ",start);

View File

@@ -178,19 +178,9 @@ void MTGCard::addType(char * _type_text){
}
void MTGCard::setSubtype( string value){
string s = value;
while (s.size()){
unsigned int found = s.find(" ");
if (found != string::npos){
int id = Subtypes::subtypesList->Add(s.substr(0,found));
int id = Subtypes::subtypesList->Add(value);
addType(id);
s = s.substr(found+1);
}else{
int id = Subtypes::subtypesList->Add(s);
addType(id);
s = "";
}
}
}
void MTGCard::addType(int id){
@@ -242,6 +232,9 @@ void MTGCard::addMagicText(string value){
void MTGCard::setName( string value){
name = value;
//This is a bug fix for plague rats and the "foreach ability"
//Right now we add names as types, so that they get recognized
if (value.at(value.length()-1) == 's') Subtypes::subtypesList->Add(value);
}
const char * MTGCard::getName(){

View File

@@ -87,6 +87,7 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
case 'B'://Basic Land
card->setColor(Constants::MTG_COLOR_LAND);
card->setType("Land");
card->setType("Basic");
break;
case 'L':
card->setColor(Constants::MTG_COLOR_LAND);
@@ -103,7 +104,16 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
}else if(key.compare("power")==0){
card->setPower (atoi(value.c_str()));
}else if(key.compare("subtype")==0){
card->setSubtype(value);
while (value.size()){
unsigned int found = value.find(" ");
if (found != string::npos){
card->setSubtype(value.substr(0,found));
value = value.substr(found+1);
}else{
card->setSubtype(value);
value = "";
}
}
}else if(key.compare("toughness")==0){
card->setToughness(atoi(value.c_str()));
}else{

View File

@@ -121,6 +121,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
#endif
minus = 1;
nbminuses++;
attribute=attribute.substr(1);
}
#ifdef WIN32
OutputDebugString(attribute.c_str());
@@ -166,21 +167,30 @@ OutputDebugString("COLOR FOUND !!!");
}
}
if (!attributefound){
//Abilities
for (int j = 0; j < Constants::NB_BASIC_ABILITIES; j++){
if (attribute.find(Constants::MTGBasicAbilities[j]) != string::npos){
attributefound = 1;
if (minus){
cd->basicAbilities[j] = -1;
}else{
cd->basicAbilities[j] = 1;
}
}
}
}
//Abilities
for (int j = 0; j < Constants::NB_BASIC_ABILITIES; j++){
if (attribute.find(Constants::MTGBasicAbilities[j]) != string::npos){
attributefound = 1;
if (minus){
cd->basicAbilities[j] = -1;
}else{
cd->basicAbilities[j] = 1;
}
}
}
}
if (!attributefound){
//Subtypes
if (minus){
cd->setNegativeSubtype(attribute);
}else{
cd->setSubtype(attribute);
}
}
}
}
if (nbminuses < 2){
if (nbminuses == 0){
#ifdef WIN32
OutputDebugString("Switching to OR\n");
#endif
@@ -196,6 +206,7 @@ OutputDebugString("COLOR FOUND !!!");
if (cd){
if (!tc){
if (typeName.compare("*")!=0) cd->setSubtype(typeName);
tc = NEW DescriptorTargetChooser(cd,zones,nbzones,card,maxtargets);
#ifdef WIN32
OutputDebugString("Advanced Attributes 2 \n");
@@ -379,11 +390,11 @@ int TypeTargetChooser::canTarget(Targetable * target ){
if (target->typeAsTarget() == TARGET_CARD){
MTGCardInstance * card = (MTGCardInstance *) target;
if (!TargetZoneChooser::canTarget(card)) return 0;
int result = 0;
for (int i= 0; i < nbtypes; i++){
result += card->hasSubtype(types[i]);
if (card->hasSubtype(types[i])) return 1;
if (Subtypes::subtypesList->find(card->name) == types[i]) return 1;
}
return result;
return 0;
}
return 0;
}

View File

@@ -19,12 +19,12 @@ import os
import os.path
from mtgCommon import *
setinfo=sets['CFX']
setinfo=sets['MIR']
stripReminderText = False
conffile = open(setinfo['dir'] + ".conf", 'w')
# FETCH_IMAGES = False
FETCH_IMAGES = True
FETCH_IMAGES = False
# FETCH_IMAGES = True
url = "http://ww2.wizards.com/gatherer/Index.aspx?setfilter=%s\\&output=Spoiler" % setinfo['gathname']
gatherer = urllib.urlopen(url)

View File

@@ -92,7 +92,14 @@ sets ={'BE':{'name':'Beta',
'gathdirs':['CFX/EN'],
'gathabbrev': 'CFX',
'gathname':'Conflux'
},
},
'LRW':{'name':'Lorwyn',
'dir':'LRW',
'abbrev':'LRW',
'gathdirs':['LRW/EN'],
'gathabbrev': 'LRW',
'gathname':'Lorwyn',
},
'UH':{'name':'Unhinged',
'dir':'UH',
'abbrev':'UH',
@@ -184,8 +191,8 @@ sets ={'BE':{'name':'Beta',
'gathabbrev': 'AL',
'gathname':'Alliances',
},
'MI':{'name':'Mirage',
'dir':'MI',
'MIR':{'name':'Mirage',
'dir':'MIR',
'abbrev':'MI',
'gathdirs':['MI/en-us'],
'gathabbrev': 'MI',
@@ -312,10 +319,11 @@ sets ={'BE':{'name':'Beta',
'gathabbrev': 'SCG',
'gathname':'Scourge',
},
'MR':{'name':'Mirrodin',
'dir':'MR',
'abbrev':'MR',
'MRD':{'name':'Mirrodin',
'dir':'MRD',
'abbrev':'MRD',
'gathabbrev': 'MRD',
'gathdirs':['MRD/en-us'],
'gathname':'Mirrodin',
},
'DS':{'name':'Darksteel',
@@ -406,6 +414,7 @@ sets ={'BE':{'name':'Beta',
'dir':'FS',
'abbrev':'FS'
},
}
def maketransU(s1, s2, todel=""):