Added the todo.dat from ICE AGE
Added the Tap in the parser (works) Removed the code from MTGAbility that could be added in the cards.dat and modified cards.dat Tryed to add the shadow & landshome ability (does not work properly) Added the maxtoughness in targechooser--> added the card Aegis from ICE AGE
This commit is contained in:
@@ -1213,7 +1213,7 @@ subtype=Pyknite
|
|||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Counts as a wall {1}: +1/+0 until end of turn1: +0/+1 until end of turn3: Snow Fortress deals 1 damage to target creature without flying that is attacking you.
|
text=Counts as a wall {1}: +1/+0 until end of turn {1}: +0/+1 until end of turn3: Snow Fortress deals 1 damage to target creature without flying that is attacking you.
|
||||||
id=2423
|
id=2423
|
||||||
abilities=defender
|
abilities=defender
|
||||||
auto={1}:1/0
|
auto={1}:1/0
|
||||||
@@ -1260,8 +1260,7 @@ toughness=3
|
|||||||
[card]
|
[card]
|
||||||
text=If at any time you control no islands, bury Skeleton Ship.{T}: Put a -1/-1 counter on target creature.
|
text=If at any time you control no islands, bury Skeleton Ship.{T}: Put a -1/-1 counter on target creature.
|
||||||
id=2737
|
id=2737
|
||||||
abilities=wither
|
abilities=wither,islandhome
|
||||||
alias=1214
|
|
||||||
name=Skeleton Ship
|
name=Skeleton Ship
|
||||||
rarity=R
|
rarity=R
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -1292,6 +1291,7 @@ text=Gain 1 life. Draw a card at the beginning of the next turn's upkeep.
|
|||||||
id=2667
|
id=2667
|
||||||
name=Blessed Wine
|
name=Blessed Wine
|
||||||
auto=draw:1
|
auto=draw:1
|
||||||
|
auto=gainlife:1
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Instant
|
type=Instant
|
||||||
mana={1}{W}
|
mana={1}{W}
|
||||||
@@ -1311,6 +1311,7 @@ name=Touch of Death
|
|||||||
target=player
|
target=player
|
||||||
auto=damage:1
|
auto=damage:1
|
||||||
auto=draw:1
|
auto=draw:1
|
||||||
|
auto=gainlife:1
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Sorcery
|
type=Sorcery
|
||||||
mana={2}{B}
|
mana={2}{B}
|
||||||
@@ -1319,6 +1320,7 @@ mana={2}{B}
|
|||||||
text=Gorilla Pack cannot attack if defending player controls no forests.Bury Gorilla Pack if you control no forests.
|
text=Gorilla Pack cannot attack if defending player controls no forests.Bury Gorilla Pack if you control no forests.
|
||||||
id=2571
|
id=2571
|
||||||
name=Gorilla Pack
|
name=Gorilla Pack
|
||||||
|
abilities=foresthome
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Creature
|
type=Creature
|
||||||
mana={2}{G}
|
mana={2}{G}
|
||||||
@@ -1346,6 +1348,7 @@ mana={2}{R}{R}
|
|||||||
text={2}{G}{T}: Untap target creature.
|
text={2}{G}{T}: Untap target creature.
|
||||||
id=2566
|
id=2566
|
||||||
name=Fyndhorn Brownie
|
name=Fyndhorn Brownie
|
||||||
|
auto={2}{G}{T}:untap target(creature)
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Creature
|
type=Creature
|
||||||
mana={2}{G}
|
mana={2}{G}
|
||||||
@@ -1401,5 +1404,47 @@ power=1
|
|||||||
subtype=Knights
|
subtype=Knights
|
||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
|
[card]
|
||||||
|
text=Lhurgoyf has power equal to the total number of creatures in all graveyards and toughness equal to 1 plus the total number of creatures in all graveyards.
|
||||||
|
id=2576
|
||||||
|
name=Lhurgoyf
|
||||||
|
rarity=R
|
||||||
|
type=Creature
|
||||||
|
mana={2}{G}{G}
|
||||||
|
power=*
|
||||||
|
subtype=Lhurgoyf
|
||||||
|
toughness=1
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
|
text={T} target artifact, creature, or land. Draw a card at the beginning of the next turn's upkeep.
|
||||||
|
id=2503
|
||||||
|
target=artifact,creature,land
|
||||||
|
auto=tap
|
||||||
|
auto=draw:1
|
||||||
|
name=Enervate
|
||||||
|
rarity=C
|
||||||
|
type=Instant
|
||||||
|
mana={1}{U}
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
|
text=Target creature may untap one additional time this turn.That creature may attack or use abilities that require {T} as part of the activation cost this turn. Draw a card at the beginning of the next turn's upkeep.
|
||||||
|
id=2595
|
||||||
|
target=creature
|
||||||
|
auto=untap
|
||||||
|
alias=1252
|
||||||
|
name=Touch of Vitae
|
||||||
|
auto=draw:1
|
||||||
|
rarity=U
|
||||||
|
type=Instant
|
||||||
|
mana={2}{G}
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
|
text={1}{T}: Target 1/1 creature gets +1/+2 until end of turn.
|
||||||
|
id=2393
|
||||||
|
name=Aegis of the Meek
|
||||||
|
rarity=R
|
||||||
|
type=Artifact
|
||||||
|
mana={3}
|
||||||
|
[/card]
|
||||||
|
|
||||||
#End of file
|
#End of file
|
||||||
2313
projects/mtg/bin/Res/sets/ICE/todo.dat
Normal file
2313
projects/mtg/bin/Res/sets/ICE/todo.dat
Normal file
File diff suppressed because it is too large
Load Diff
@@ -166,7 +166,7 @@ toughness=1
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=First strike, protection from white
|
text=First strike, protection from white
|
||||||
abilities=First strike, protection from white
|
abilities=First strike,protection from white
|
||||||
id=1145
|
id=1145
|
||||||
name=Black Knight
|
name=Black Knight
|
||||||
rarity=U
|
rarity=U
|
||||||
@@ -277,6 +277,11 @@ mana={3}{W}
|
|||||||
text={2}, {T}: Add one mana of any color to your mana pool.
|
text={2}, {T}: Add one mana of any color to your mana pool.
|
||||||
id=1100
|
id=1100
|
||||||
name=Celestial Prism
|
name=Celestial Prism
|
||||||
|
auto={2}{T}: add {B}
|
||||||
|
auto={2}{T}: add {U}
|
||||||
|
auto={2}{T}: add {G}
|
||||||
|
auto={2}{T}: add {R}
|
||||||
|
auto={2}{T}: add {W}
|
||||||
rarity=U
|
rarity=U
|
||||||
type=Artifact
|
type=Artifact
|
||||||
mana={3}
|
mana={3}
|
||||||
@@ -751,6 +756,7 @@ subtype=Aura
|
|||||||
[card]
|
[card]
|
||||||
text={2}, {T}: Target creature gains flying until end of turn.
|
text={2}, {T}: Target creature gains flying until end of turn.
|
||||||
id=1109
|
id=1109
|
||||||
|
auto={2}{T}:flying target(creature)
|
||||||
name=Flying Carpet
|
name=Flying Carpet
|
||||||
rarity=R
|
rarity=R
|
||||||
type=Artifact
|
type=Artifact
|
||||||
@@ -1109,6 +1115,7 @@ mana={6}
|
|||||||
[card]
|
[card]
|
||||||
text={3}, {T}: Untap target creature.
|
text={3}, {T}: Untap target creature.
|
||||||
id=1118
|
id=1118
|
||||||
|
auto={3}{T}:untap target(creature)
|
||||||
name=Jandor's Saddlebags
|
name=Jandor's Saddlebags
|
||||||
rarity=R
|
rarity=R
|
||||||
type=Artifact
|
type=Artifact
|
||||||
@@ -1116,7 +1123,7 @@ mana={2}
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text={4}, {T}: Draw a card.
|
text={4}, {T}: Draw a card.
|
||||||
auto={4},{T}:Draw:1
|
auto={4}{T}:Draw:1
|
||||||
id=1119
|
id=1119
|
||||||
name=Jayemdae Tome
|
name=Jayemdae Tome
|
||||||
rarity=R
|
rarity=R
|
||||||
@@ -1295,7 +1302,7 @@ toughness=2
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Flying, trample (This creature can't be blocked except by creatures with flying or reach. If this creature would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) At the beginning of your upkeep, sacrifice a creature other than Lord of the Pit. If you can't, Lord of the Pit deals 7 damage to you.
|
text=Flying, trample (This creature can't be blocked except by creatures with flying or reach. If this creature would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) At the beginning of your upkeep, sacrifice a creature other than Lord of the Pit. If you can't, Lord of the Pit deals 7 damage to you.
|
||||||
abilities=Flying, trample
|
abilities=flying,trample
|
||||||
id=1166
|
id=1166
|
||||||
name=Lord of the Pit
|
name=Lord of the Pit
|
||||||
rarity=R
|
rarity=R
|
||||||
@@ -1522,6 +1529,8 @@ toughness=3
|
|||||||
text=Pirate Ship can't attack unless defending player controls an Island. {T}: Pirate Ship deals 1 damage to target creature or player. When you control no Islands, sacrifice Pirate Ship.
|
text=Pirate Ship can't attack unless defending player controls an Island. {T}: Pirate Ship deals 1 damage to target creature or player. When you control no Islands, sacrifice Pirate Ship.
|
||||||
id=1214
|
id=1214
|
||||||
name=Pirate Ship
|
name=Pirate Ship
|
||||||
|
abilities=islandhome
|
||||||
|
auto={T}:damage target(creature,player)
|
||||||
rarity=R
|
rarity=R
|
||||||
type=Creature
|
type=Creature
|
||||||
mana={4}{U}
|
mana={4}{U}
|
||||||
@@ -1601,6 +1610,7 @@ mana={R}{R}
|
|||||||
text={T}: Prodigal Sorcerer deals 1 damage to target creature or player.
|
text={T}: Prodigal Sorcerer deals 1 damage to target creature or player.
|
||||||
id=1217
|
id=1217
|
||||||
name=Prodigal Sorcerer
|
name=Prodigal Sorcerer
|
||||||
|
auto={T}:damage:1 target(creature,player)
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Creature
|
type=Creature
|
||||||
mana={2}{U}
|
mana={2}{U}
|
||||||
@@ -1639,6 +1649,7 @@ mana={B}
|
|||||||
text=Return target artifact card from your graveyard to your hand.
|
text=Return target artifact card from your graveyard to your hand.
|
||||||
target=artifact|myGraveyard
|
target=artifact|myGraveyard
|
||||||
id=1219
|
id=1219
|
||||||
|
alias=1174
|
||||||
name=Reconstruction
|
name=Reconstruction
|
||||||
rarity=C
|
rarity=C
|
||||||
type=Sorcery
|
type=Sorcery
|
||||||
@@ -1724,6 +1735,7 @@ toughness=3
|
|||||||
text={3}, {T}: Rod of Ruin deals 1 damage to target creature or player.
|
text={3}, {T}: Rod of Ruin deals 1 damage to target creature or player.
|
||||||
id=1134
|
id=1134
|
||||||
name=Rod of Ruin
|
name=Rod of Ruin
|
||||||
|
auto={3}{T}:damage:1 target(creature,player)
|
||||||
rarity=U
|
rarity=U
|
||||||
type=Artifact
|
type=Artifact
|
||||||
mana={4}
|
mana={4}
|
||||||
@@ -1838,7 +1850,7 @@ toughness=4
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Flying, vigilance (This creature can't be blocked except by creatures with flying or reach, and attacking doesn't cause this creature to tap.)
|
text=Flying, vigilance (This creature can't be blocked except by creatures with flying or reach, and attacking doesn't cause this creature to tap.)
|
||||||
abilities=Flying, vigilance
|
abilities=flying,vigilance
|
||||||
id=1366
|
id=1366
|
||||||
name=Serra Angel
|
name=Serra Angel
|
||||||
rarity=U
|
rarity=U
|
||||||
@@ -1958,6 +1970,7 @@ mana={X}{G}
|
|||||||
text={W}: Add {R} to your mana pool.
|
text={W}: Add {R} to your mana pool.
|
||||||
id=1137
|
id=1137
|
||||||
name=Sunglasses of Urza
|
name=Sunglasses of Urza
|
||||||
|
auto={W}: add {R}
|
||||||
rarity=R
|
rarity=R
|
||||||
type=Artifact
|
type=Artifact
|
||||||
mana={3}
|
mana={3}
|
||||||
@@ -2182,7 +2195,7 @@ subtype=Island Mountain
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Defender, flying (This creature can't attack, and it can block creatures with flying.)
|
text=Defender, flying (This creature can't attack, and it can block creatures with flying.)
|
||||||
abilities=Defender, flying
|
abilities=Defender,flying
|
||||||
id=1232
|
id=1232
|
||||||
name=Wall of Air
|
name=Wall of Air
|
||||||
rarity=U
|
rarity=U
|
||||||
@@ -2296,6 +2309,7 @@ toughness=3
|
|||||||
text=Enchant creature At the beginning of the upkeep of enchanted creature's controller, Wanderlust deals 1 damage to that player.
|
text=Enchant creature At the beginning of the upkeep of enchanted creature's controller, Wanderlust deals 1 damage to that player.
|
||||||
target=creature
|
target=creature
|
||||||
id=1276
|
id=1276
|
||||||
|
alias=1200
|
||||||
name=Wanderlust
|
name=Wanderlust
|
||||||
rarity=U
|
rarity=U
|
||||||
type=Enchantment
|
type=Enchantment
|
||||||
@@ -2367,7 +2381,7 @@ mana={2}{R}
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=First strike, protection from black
|
text=First strike, protection from black
|
||||||
abilities=First strike, protection from black
|
abilities=first strike,protection from black
|
||||||
id=1370
|
id=1370
|
||||||
name=White Knight
|
name=White Knight
|
||||||
rarity=U
|
rarity=U
|
||||||
|
|||||||
@@ -1543,47 +1543,6 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//1109 flying Carpet
|
|
||||||
class AFlyingCarpet:public ABasicAbilityModifierUntilEOT{
|
|
||||||
|
|
||||||
public:
|
|
||||||
AFlyingCarpet(int _id, MTGCardInstance * _source): ABasicAbilityModifierUntilEOT(_id,_source,FLYING, NEW ManaCost()){
|
|
||||||
cost->add(MTG_COLOR_ARTIFACT,2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update(float dt){
|
|
||||||
ABasicAbilityModifierUntilEOT::Update(dt);
|
|
||||||
|
|
||||||
if (nbTargets){
|
|
||||||
MTGCardInstance * mTarget = mTargets[0];
|
|
||||||
for (int i = 0; i < 2; i++){
|
|
||||||
if(game->players[i]->game->graveyard->hasCard(mTarget)){
|
|
||||||
game->players[i]->game->putInGraveyard(source);
|
|
||||||
mTarget = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int destroy(){
|
|
||||||
if (!nbTargets) return 0;
|
|
||||||
MTGCardInstance * mTarget = mTargets[0];
|
|
||||||
if (mTarget && mTarget->basicAbilities[FLYING]){
|
|
||||||
mTarget->basicAbilities[FLYING] = stateBeforeActivation[0];
|
|
||||||
mTarget = NULL;
|
|
||||||
return 1;
|
|
||||||
}else{
|
|
||||||
//BUG !!!
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//1110 Glasses of Urza
|
//1110 Glasses of Urza
|
||||||
class AGlassesOfUrza:public MTGAbility{
|
class AGlassesOfUrza:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
@@ -1644,25 +1603,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//1118 Jandors Sandlebag
|
|
||||||
class AJandorsSandlebag:public TargetAbility{
|
|
||||||
public:
|
|
||||||
AJandorsSandlebag(int _id, MTGCardInstance * card):TargetAbility(_id, card){
|
|
||||||
int _cost[] = {MTG_COLOR_ARTIFACT, 3};
|
|
||||||
cost = NEW ManaCost(_cost,1);
|
|
||||||
tc = NEW CreatureTargetChooser();
|
|
||||||
}
|
|
||||||
|
|
||||||
int resolve(){
|
|
||||||
MTGCardInstance * card = tc->getNextCardTarget();
|
|
||||||
if (card->tapped){
|
|
||||||
card->tapped = 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//1119 Jayemdae Tome
|
//1119 Jayemdae Tome
|
||||||
class AJayemdaeTome:public ActivatedAbility{
|
class AJayemdaeTome:public ActivatedAbility{
|
||||||
public:
|
public:
|
||||||
@@ -1678,36 +1618,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//1205 Lifetap
|
|
||||||
class ALifetap:public MTGAbility{
|
|
||||||
public:
|
|
||||||
int nbforeststapped;
|
|
||||||
|
|
||||||
int countForestsTapped(){
|
|
||||||
int result = 0;
|
|
||||||
MTGInPlay * inplay = source->controller()->opponent()->game->inPlay;
|
|
||||||
for (int i = 0; i < inplay->nb_cards; i++){
|
|
||||||
MTGCardInstance * card = inplay->cards[i];
|
|
||||||
if (card->tapped && card->hasType("forest")) result++;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ALifetap(int _id, MTGCardInstance * source):MTGAbility(_id, source){
|
|
||||||
nbforeststapped = countForestsTapped();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update(float dt){
|
|
||||||
int newcount = countForestsTapped();
|
|
||||||
for (int i=0; i < newcount - nbforeststapped; i++){
|
|
||||||
source->controller()->life++;
|
|
||||||
}
|
|
||||||
nbforeststapped = newcount;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//Living Artifact
|
//Living Artifact
|
||||||
class ALivingArtifact:public MTGAbility{
|
class ALivingArtifact:public MTGAbility{
|
||||||
public:
|
public:
|
||||||
@@ -2733,22 +2643,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//Sunglasses of Urza
|
|
||||||
class ASunglassesOfUrza:public ActivatedAbility{
|
|
||||||
public:
|
|
||||||
ASunglassesOfUrza(int _id, MTGCardInstance * card):ActivatedAbility(_id, card,NEW ManaCost(),0,0){
|
|
||||||
cost->add(MTG_COLOR_WHITE, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int resolve(){
|
|
||||||
source->controller()->getManaPool()->add(MTG_COLOR_RED, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------Addon Abra------------------
|
//--------------Addon Abra------------------
|
||||||
//ShieldOfTheAge
|
//ShieldOfTheAge
|
||||||
class AShieldOfTheAge: public TargetAbility{
|
class AShieldOfTheAge: public TargetAbility{
|
||||||
@@ -2765,33 +2659,36 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//2593 Thoughtleech
|
// GiveLifeForTappedType
|
||||||
class AThoughtleech:public MTGAbility{
|
|
||||||
public:
|
|
||||||
int nbIslandstapped;
|
|
||||||
|
|
||||||
int countIslandsTapped(){
|
class AGiveLifeForTappedType:public MTGAbility{
|
||||||
|
public:
|
||||||
|
char type[20];
|
||||||
|
int nbtypestapped;
|
||||||
|
|
||||||
|
int counttypesTapped(){
|
||||||
int result = 0;
|
int result = 0;
|
||||||
MTGInPlay * inplay = source->controller()->opponent()->game->inPlay;
|
MTGInPlay * inplay = source->controller()->opponent()->game->inPlay;
|
||||||
for (int i = 0; i < inplay->nb_cards; i++){
|
for (int i = 0; i < inplay->nb_cards; i++){
|
||||||
MTGCardInstance * card = inplay->cards[i];
|
MTGCardInstance * card = inplay->cards[i];
|
||||||
if (card->tapped && card->hasType("island")) result++;
|
if (card->tapped && card->hasType(type)) result++;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
AThoughtleech(int _id, MTGCardInstance * source):MTGAbility(_id, source){
|
AGiveLifeForTappedType(int _id, MTGCardInstance * source, const char * _type):MTGAbility(_id, source){
|
||||||
nbIslandstapped = countIslandsTapped();
|
sprintf(type,"%s",_type);{
|
||||||
|
nbtypestapped = counttypesTapped();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
void Update(float dt){
|
||||||
int newcount = countIslandsTapped();
|
int newcount = counttypesTapped();
|
||||||
for (int i=0; i < newcount - nbIslandstapped; i++){
|
for (int i=0; i < newcount - nbtypestapped; i++){
|
||||||
source->controller()->life++;
|
source->controller()->life++;
|
||||||
}
|
}
|
||||||
nbIslandstapped = newcount;
|
nbtypestapped = newcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Minion of Leshrac
|
//Minion of Leshrac
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ using std::map;
|
|||||||
|
|
||||||
class AbilityFactory{
|
class AbilityFactory{
|
||||||
private:
|
private:
|
||||||
int destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury = 0);
|
int destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury = 0);
|
||||||
int destroyAllFromColorInPlay(int color, MTGCardInstance * source, int bury = 0);
|
int destroyAllFromColorInPlay(int color, MTGCardInstance * source, int bury = 0);
|
||||||
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p);
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -82,8 +82,15 @@ static int _b[7] = {20, 0, 140,15, 50,255,128};
|
|||||||
#define RETRACE 26
|
#define RETRACE 26
|
||||||
#define EXALTED 27
|
#define EXALTED 27
|
||||||
#define LEGENDARY 28
|
#define LEGENDARY 28
|
||||||
|
#define SHADOW 29
|
||||||
|
#define REACHSHADOW 29
|
||||||
|
#define FORESTHOME 30
|
||||||
|
#define ISLANDHOME 31
|
||||||
|
#define MOUNTAINHOME 32
|
||||||
|
#define SWAMPHOME 33
|
||||||
|
#define PLAINSHOME 34
|
||||||
|
|
||||||
#define NB_BASIC_ABILITIES 29
|
#define NB_BASIC_ABILITIES 35
|
||||||
|
|
||||||
static const char * MTGBasicAbilities[] = {
|
static const char * MTGBasicAbilities[] = {
|
||||||
"trample",
|
"trample",
|
||||||
@@ -114,7 +121,14 @@ static const char * MTGBasicAbilities[] = {
|
|||||||
"persist",
|
"persist",
|
||||||
"retrace",
|
"retrace",
|
||||||
"exalted",
|
"exalted",
|
||||||
"legendary"
|
"legendary",
|
||||||
|
"shadow",
|
||||||
|
"reachshadow",
|
||||||
|
"foresthome",
|
||||||
|
"islandhome",
|
||||||
|
"moutainhome",
|
||||||
|
"swamphome",
|
||||||
|
"plainshome"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public:
|
|||||||
class CreatureTargetChooser:public TargetZoneChooser{
|
class CreatureTargetChooser:public TargetZoneChooser{
|
||||||
public:
|
public:
|
||||||
int maxpower;
|
int maxpower;
|
||||||
|
int maxtoughness;
|
||||||
CreatureTargetChooser(MTGGameZone ** _zones, int _nbzones,MTGCardInstance * card = NULL, int _maxtargets = 1);
|
CreatureTargetChooser(MTGGameZone ** _zones, int _nbzones,MTGCardInstance * card = NULL, int _maxtargets = 1);
|
||||||
CreatureTargetChooser(MTGCardInstance * card = NULL, int _maxtargets = 1);
|
CreatureTargetChooser(MTGCardInstance * card = NULL, int _maxtargets = 1);
|
||||||
virtual int canTarget(Targetable * _card);
|
virtual int canTarget(Targetable * _card);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "../include/CardGui.h"
|
#include "../include/CardGui.h"
|
||||||
#include "../include/MTGDeck.h"
|
#include "../include/MTGDeck.h"
|
||||||
|
|
||||||
int AbilityFactory::destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury){
|
int AbilityFactory::destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury){
|
||||||
GameObserver * game = GameObserver::GetInstance();
|
GameObserver * game = GameObserver::GetInstance();
|
||||||
for (int i = 0; i < 2 ; i++){
|
for (int i = 0; i < 2 ; i++){
|
||||||
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
||||||
@@ -140,6 +140,20 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Tapper (icy manipulator)
|
||||||
|
found = s.find("tap");
|
||||||
|
if (found != string::npos){
|
||||||
|
if (dryMode) return BAKA_EFFECT_GOOD;
|
||||||
|
ManaCost * cost = ManaCost::parseManaCost(s);
|
||||||
|
if (tc){
|
||||||
|
game->addObserver(NEW ATapper(id, card, cost, tc));
|
||||||
|
}else{
|
||||||
|
target->tapped = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
result++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//Regeneration
|
//Regeneration
|
||||||
found = s.find("}:regenerate");
|
found = s.find("}:regenerate");
|
||||||
@@ -458,15 +472,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
game->addObserver(NEW AUntapManaBlocker(_id, card, NEW ManaCost(cost,1)));
|
game->addObserver(NEW AUntapManaBlocker(_id, card, NEW ManaCost(cost,1)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1100: //Celestial Prism
|
|
||||||
{
|
|
||||||
for (int i = MTG_COLOR_GREEN; i <= MTG_COLOR_WHITE; i++){
|
|
||||||
int cost[] = {MTG_COLOR_ARTIFACT, 2};
|
|
||||||
int cost2[] = {i + MTG_COLOR_GREEN,1};
|
|
||||||
game->addObserver(NEW AManaProducer(_id + i, card, NEW ManaCost(cost2, 1), NEW ManaCost(cost, 1)));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1237: //Channel
|
case 1237: //Channel
|
||||||
{
|
{
|
||||||
game->addObserver(NEW AChannel(_id, card));
|
game->addObserver(NEW AChannel(_id, card));
|
||||||
@@ -584,11 +589,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
int x = spell->cost->getConvertedCost() - 1; //TODO BETTER
|
int x = spell->cost->getConvertedCost() - 1; //TODO BETTER
|
||||||
game->addObserver(NEW AFireball(_id, card,spell, x));
|
game->addObserver(NEW AFireball(_id, card,spell, x));
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1109: //Flying Carpet
|
|
||||||
{
|
|
||||||
game->addObserver(NEW AFlyingCarpet(_id,card));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 1245: //Force of Nature
|
case 1245: //Force of Nature
|
||||||
{
|
{
|
||||||
@@ -640,11 +640,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
game->addObserver(NEW AJandorsRing( _id, card));
|
game->addObserver(NEW AJandorsRing( _id, card));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1118: //Jandors Sandlebag
|
|
||||||
{
|
|
||||||
game->addObserver(NEW AJandorsSandlebag( _id, card));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1121: //Kormus Bell
|
case 1121: //Kormus Bell
|
||||||
{
|
{
|
||||||
game->addObserver(NEW AConvertLandToCreatures(id, card, "swamp"));
|
game->addObserver(NEW AConvertLandToCreatures(id, card, "swamp"));
|
||||||
@@ -673,7 +668,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
case 1205: //Lifetap
|
case 1205: //Lifetap
|
||||||
{
|
{
|
||||||
game->addObserver(NEW ALifetap(_id, card));
|
game->addObserver(NEW AGiveLifeForTappedType(_id, card, "forest"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1259: //Living lands
|
case 1259: //Living lands
|
||||||
@@ -725,13 +720,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1134: //Rod of Ruin
|
|
||||||
{
|
|
||||||
int cost[] = {MTG_COLOR_ARTIFACT, 3};
|
|
||||||
ADamager * ability = NEW ADamager(_id, card, NEW ManaCost(cost,1), 1);
|
|
||||||
game->addObserver(ability);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1136: //Soul Net
|
case 1136: //Soul Net
|
||||||
{
|
{
|
||||||
game->addObserver( NEW ASoulNet(_id ,card));
|
game->addObserver( NEW ASoulNet(_id ,card));
|
||||||
@@ -941,23 +929,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
game->addObserver(NEW ADamager(_id+1, card, NEW ManaCost(), 1));
|
game->addObserver(NEW ADamager(_id+1, card, NEW ManaCost(), 1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1217: // Prodigal sorcerer
|
|
||||||
{
|
|
||||||
ADamager * ability = NEW ADamager(_id, card, NEW ManaCost(), 1);
|
|
||||||
game->addObserver(ability);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1218: //Psychic Venom
|
case 1218: //Psychic Venom
|
||||||
{
|
{
|
||||||
game->addObserver(NEW APsychicVenom(_id, card, card->target));
|
game->addObserver(NEW APsychicVenom(_id, card, card->target));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1219: //Reconstruction
|
|
||||||
{
|
|
||||||
MTGPlayerCards * zones = game->currentlyActing()->game;
|
|
||||||
zones->putInZone(card->target,zones->graveyard,zones->hand);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1220: //Sea Serpent
|
case 1220: //Sea Serpent
|
||||||
{
|
{
|
||||||
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "island"));
|
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "island"));
|
||||||
@@ -1074,11 +1050,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1276: //Wanderlust
|
|
||||||
{
|
|
||||||
game->addObserver(NEW AWanderlust(_id, card, card->target));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1278: //Web
|
case 1278: //Web
|
||||||
{
|
{
|
||||||
game->addObserver(NEW APowerToughnessModifier(_id, card, card->target, 0,2));
|
game->addObserver(NEW APowerToughnessModifier(_id, card, card->target, 0,2));
|
||||||
@@ -1244,11 +1215,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1137: //Sunglasses of Urza
|
|
||||||
{
|
|
||||||
game->addObserver(NEW ASunglassesOfUrza(_id, card));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1367: //Sword to Plowshares
|
case 1367: //Sword to Plowshares
|
||||||
{
|
{
|
||||||
card->target->controller()->life+= card->target->power;
|
card->target->controller()->life+= card->target->power;
|
||||||
@@ -1289,7 +1255,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Addons Abra
|
//Addons ICE-AGE Cards
|
||||||
case 2631: //Jokulhaups
|
case 2631: //Jokulhaups
|
||||||
{
|
{
|
||||||
destroyAllFromTypeInPlay("artifact", card);
|
destroyAllFromTypeInPlay("artifact", card);
|
||||||
@@ -1298,16 +1264,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2491: //Touch of Death
|
case 2650: //Pyroclasm Need to be improved copied from hurricane with does 0 dammage to player and does 2 dammage to each creature
|
||||||
{
|
|
||||||
game->currentlyActing()->life+=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2650: //Pyroclasm
|
|
||||||
{
|
{
|
||||||
int x = 2;
|
int x = 2;
|
||||||
for (int i = 0; i < 2 ; i++){
|
for (int i = 0; i < 2 ; i++){
|
||||||
game->mLayers->stackLayer()->addDamage(card, game->players[i], 0);
|
game->mLayers->stackLayer()->addDamage(card, game->players[i], 0);// To be removed ?
|
||||||
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
||||||
MTGCardInstance * current = game->players[i]->game->inPlay->cards[j];
|
MTGCardInstance * current = game->players[i]->game->inPlay->cards[j];
|
||||||
if (current->isACreature()){
|
if (current->isACreature()){
|
||||||
@@ -1333,17 +1294,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
case 2593: //Thoughtleech
|
case 2593: //Thoughtleech
|
||||||
{
|
{
|
||||||
game->addObserver(NEW AThoughtleech(_id, card));
|
game->addObserver(NEW AGiveLifeForTappedType (_id, card, "island"));
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2667: //Blessed Wine
|
|
||||||
{
|
|
||||||
game->currentlyActing()->life+=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2571: //Gorilla Pack
|
|
||||||
{
|
|
||||||
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2484: //Songs of the Damned
|
case 2484: //Songs of the Damned
|
||||||
@@ -1384,6 +1335,15 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
game->addObserver(NEW ABasicAbilityModifierUntilEOT(_id, card, FLYING, NEW ManaCost(cost,1),tc));
|
game->addObserver(NEW ABasicAbilityModifierUntilEOT(_id, card, FLYING, NEW ManaCost(cost,1),tc));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 2393: //Aegis of the Meek work but work also for 0/1 creatures... :D
|
||||||
|
{
|
||||||
|
int cost[] = {MTG_COLOR_ARTIFACT,1};
|
||||||
|
CreatureTargetChooser * tc = NEW CreatureTargetChooser(card);
|
||||||
|
tc->maxpower = 1;
|
||||||
|
tc->maxtoughness =1;
|
||||||
|
game->addObserver(NEW ATargetterPowerToughnessModifierUntilEOT(id, card, 1,2, NEW ManaCost(cost,1),tc));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 2703: // Lost Order of Jarkeld
|
case 2703: // Lost Order of Jarkeld
|
||||||
{
|
{
|
||||||
game->addObserver(NEW ALostOrderofJarkeld(_id, card));
|
game->addObserver(NEW ALostOrderofJarkeld(_id, card));
|
||||||
@@ -1407,7 +1367,27 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
if (card->basicAbilities[EXALTED]){
|
if (card->basicAbilities[EXALTED]){
|
||||||
game->addObserver(NEW AExalted(_id, card));
|
game->addObserver(NEW AExalted(_id, card));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tested the two variant none is working properly I don't know why ??
|
||||||
|
if (card->basicAbilities[FORESTHOME]){
|
||||||
|
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest"));
|
||||||
|
}
|
||||||
|
if (card->basicAbilities[ISLANDHOME]){
|
||||||
|
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"island");
|
||||||
|
game->addObserver(ability);
|
||||||
|
}
|
||||||
|
if (card->basicAbilities[MOUNTAINHOME]){
|
||||||
|
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"moutain");
|
||||||
|
game->addObserver(ability);
|
||||||
|
}
|
||||||
|
if (card->basicAbilities[SWAMPHOME]){
|
||||||
|
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"swamp");
|
||||||
|
game->addObserver(ability);
|
||||||
|
}
|
||||||
|
if (card->basicAbilities[PLAINSHOME]){
|
||||||
|
AStrongLandLinkCreature * ability = NEW AStrongLandLinkCreature(_id, card,"plains");
|
||||||
|
game->addObserver(ability);
|
||||||
|
}
|
||||||
//Instants are put in the graveyard automatically if that's not already done
|
//Instants are put in the graveyard automatically if that's not already done
|
||||||
if (!putSourceInGraveyard){
|
if (!putSourceInGraveyard){
|
||||||
if (card->hasType("instant") || card->hasType("sorcery")){
|
if (card->hasType("instant") || card->hasType("sorcery")){
|
||||||
|
|||||||
@@ -232,8 +232,8 @@ int MTGCardInstance::setToughness(int value){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int MTGCardInstance::canBlock(){
|
int MTGCardInstance::canBlock(){
|
||||||
if (!tapped && isACreature())
|
if (!tapped && isACreature())return 1;
|
||||||
return 1;
|
if (!basicAbilities[SHADOW]&& isACreature()) return 1; // Try to add shadow
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,6 +249,7 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent){
|
|||||||
if (opponent->basicAbilities[UNBLOCKABLE]) return 0;
|
if (opponent->basicAbilities[UNBLOCKABLE]) return 0;
|
||||||
if (opponent->basicAbilities[FEAR] && !(hasColor(MTG_COLOR_ARTIFACT) || hasColor(MTG_COLOR_BLACK))) return 0;
|
if (opponent->basicAbilities[FEAR] && !(hasColor(MTG_COLOR_ARTIFACT) || hasColor(MTG_COLOR_BLACK))) return 0;
|
||||||
if (opponent->basicAbilities[FLYING] && !( basicAbilities[FLYING] || basicAbilities[REACH])) return 0;
|
if (opponent->basicAbilities[FLYING] && !( basicAbilities[FLYING] || basicAbilities[REACH])) return 0;
|
||||||
|
if (opponent->basicAbilities[SHADOW] && !( basicAbilities[SHADOW] || basicAbilities[REACHSHADOW])) return 0;
|
||||||
if (opponent->basicAbilities[SWAMPWALK] && controller()->game->inPlay->hasType("swamp")) return 0;
|
if (opponent->basicAbilities[SWAMPWALK] && controller()->game->inPlay->hasType("swamp")) return 0;
|
||||||
if (opponent->basicAbilities[FORESTWALK] && controller()->game->inPlay->hasType("forest")) return 0;
|
if (opponent->basicAbilities[FORESTWALK] && controller()->game->inPlay->hasType("forest")) return 0;
|
||||||
if (opponent->basicAbilities[ISLANDWALK] && controller()->game->inPlay->hasType("island")) return 0;
|
if (opponent->basicAbilities[ISLANDWALK] && controller()->game->inPlay->hasType("island")) return 0;
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ CreatureTargetChooser::CreatureTargetChooser( MTGCardInstance * card, int _maxta
|
|||||||
MTGGameZone * default_zones[] = {game->players[0]->game->inPlay, game->players[1]->game->inPlay};
|
MTGGameZone * default_zones[] = {game->players[0]->game->inPlay, game->players[1]->game->inPlay};
|
||||||
init(default_zones,2);
|
init(default_zones,2);
|
||||||
maxpower= -1;
|
maxpower= -1;
|
||||||
|
maxtoughness= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureTargetChooser::CreatureTargetChooser(MTGGameZone ** _zones, int nbzones, MTGCardInstance * card, int _maxtargets):TargetZoneChooser(card, _maxtargets){
|
CreatureTargetChooser::CreatureTargetChooser(MTGGameZone ** _zones, int nbzones, MTGCardInstance * card, int _maxtargets):TargetZoneChooser(card, _maxtargets){
|
||||||
@@ -295,6 +296,7 @@ CreatureTargetChooser::CreatureTargetChooser(MTGGameZone ** _zones, int nbzones,
|
|||||||
init(_zones, nbzones);
|
init(_zones, nbzones);
|
||||||
}
|
}
|
||||||
maxpower = -1;
|
maxpower = -1;
|
||||||
|
maxtoughness= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -303,6 +305,7 @@ int CreatureTargetChooser::canTarget(Targetable * target){
|
|||||||
if (target->typeAsTarget() == TARGET_CARD){
|
if (target->typeAsTarget() == TARGET_CARD){
|
||||||
MTGCardInstance * card = (MTGCardInstance *) target;
|
MTGCardInstance * card = (MTGCardInstance *) target;
|
||||||
if (maxpower != -1 && card->power > maxpower) return 0;
|
if (maxpower != -1 && card->power > maxpower) return 0;
|
||||||
|
if (maxtoughness != -1 && card->toughness > maxtoughness) return 0;
|
||||||
return card->isACreature();
|
return card->isACreature();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user