Laurent -

Added ability DOESNOTUNTAP , see _cards.dat from 10E (Colossus of sardia, dehydratation). Test suite OK. The ability does not work with enchant creature (as for protection from...) So Dehydratation is hardcoded (can be aliased if necessary) Small bug with dehydratation, will untap creature when cast... WHY ? Any Idea/Solution welcome...
This commit is contained in:
wagic.laurent
2009-06-17 23:54:05 +00:00
parent ba83a42fa4
commit cf35acd3f3
8 changed files with 44 additions and 20 deletions
+15 -1
View File
@@ -407,9 +407,12 @@ power=4
subtype=Golem subtype=Golem
toughness=4 toughness=4
[/card] [/card]
[card]text=Trample (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.) Colossus of Sardia doesn't untap during your untap step. {9}: Untap Colossus of Sardia. Play this ability only during your upkeep. [card]
text=Trample (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.) Colossus of Sardia doesn't untap during your untap step. {9}: Untap Colossus of Sardia. Play this ability only during your upkeep.
id=135268 id=135268
name=Colossus of Sardia name=Colossus of Sardia
abilities=doesnotuntap,trample
auto={9}:untap
rarity=R rarity=R
color=Artifact color=Artifact
type=Artifact Creature type=Artifact Creature
@@ -486,6 +489,17 @@ type=Sorcery
mana={B} mana={B}
[/card] [/card]
[card] [card]
text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature doesn't untap during its controller's untap step.
id=129521
target=creature
name=Dehydration
rarity=C
color=Blue
type=Enchantment
mana={3}{U}
subtype=Aura
[/card]
[card]
text=Tap all creatures without flying. text=Tap all creatures without flying.
id=135223 id=135223
name=Deluge name=Deluge
-10
View File
@@ -301,16 +301,6 @@ type=Sorcery
mana={1}{B} mana={1}{B}
[/card] [/card]
[card] [card]
text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature doesn't untap during its controller's untap step.
id=129521
name=Dehydration
rarity=C
color=Blue
type=Enchantment
mana={3}{U}
subtype=Aura
[/card]
[card]
text=When Denizen of the Deep comes into play, return each other creature you control to its owner's hand. text=When Denizen of the Deep comes into play, return each other creature you control to its owner's hand.
id=135250 id=135250
name=Denizen of the Deep name=Denizen of the Deep
-1
View File
@@ -1458,7 +1458,6 @@ class AUntaper:public TargetAbility{
} }
}; };
// Add life of gives damage if a given zone has more or less than [condition] cards at the beginning of [phase] // Add life of gives damage if a given zone has more or less than [condition] cards at the beginning of [phase]
//Ex : the rack, ivory tower... //Ex : the rack, ivory tower...
class ALifeZoneLink:public MTGAbility{ class ALifeZoneLink:public MTGAbility{
+1
View File
@@ -22,6 +22,7 @@ class Blocker : public MTGAbility {
virtual int unblock(){return 1;}; virtual int unblock(){return 1;};
Blocker(int id, MTGCardInstance * card, ManaCost * _cost); Blocker(int id, MTGCardInstance * card, ManaCost * _cost);
Blocker(int id, MTGCardInstance * card); Blocker(int id, MTGCardInstance * card);
Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target);
Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost); Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost);
~Blocker(); ~Blocker();
virtual void Update(float dt); virtual void Update(float dt);
+2 -1
View File
@@ -95,8 +95,9 @@ class Constants
CANTATTACK = 37, CANTATTACK = 37,
MUSTATTACK = 38, MUSTATTACK = 38,
CANTBLOCK = 39, CANTBLOCK = 39,
DOESNOTUNTAP =40,
NB_BASIC_ABILITIES = 40, NB_BASIC_ABILITIES = 41,
RARITY_M = 'M', RARITY_M = 'M',
+3 -1
View File
@@ -8,7 +8,9 @@ Blocker::Blocker(int id, MTGCardInstance * card):MTGAbility(id, card){
Blocker::Blocker(int id, MTGCardInstance * card, ManaCost * _cost):MTGAbility(id, card){ Blocker::Blocker(int id, MTGCardInstance * card, ManaCost * _cost):MTGAbility(id, card){
init(_cost); init(_cost);
} }
Blocker::Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target):MTGAbility(id, card,_target){
init ( NEW ManaCost());
}
Blocker::Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost):MTGAbility(id, card,_target){ Blocker::Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost):MTGAbility(id, card,_target){
init(_cost); init(_cost);
} }
+22 -6
View File
@@ -7,6 +7,7 @@
#include "../include/TargetChooser.h" #include "../include/TargetChooser.h"
#include "../include/CardGui.h" #include "../include/CardGui.h"
#include "../include/MTGDeck.h" #include "../include/MTGDeck.h"
#include "../include/Blocker.h"
int AbilityFactory::countCards(TargetChooser * tc, Player * player, int option){ int AbilityFactory::countCards(TargetChooser * tc, Player * player, int option){
@@ -357,9 +358,13 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
} }
if (tc){ if (tc){
game->addObserver(NEW AUntaper(id, card, cost, tc)); game->addObserver(NEW AUntaper(id, card, cost, tc));
}else{ }else{
target->tapped = 0; if (cost){
} game->addObserver(NEW AUntapManaBlocker(id, card, cost));
}else{
target->tapped = 0;
}
}
result++; result++;
continue; continue;
} }
@@ -1931,10 +1936,17 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
break; break;
} }
case 135268: //Colossus of Sardia // case 135268: //Colossus of Sardia
// {
// int cost[] = {Constants::MTG_COLOR_ARTIFACT, 9};
// game->addObserver(NEW AUntapManaBlocker(_id, card, NEW ManaCost(cost,1)));
// break;
// }
case 129521: //Dehydratation
// Don't understand why but target automatically untap when cast...
{ {
int cost[] = {Constants::MTG_COLOR_ARTIFACT, 9}; game->addObserver(NEW Blocker(_id,card,card->target));
game->addObserver(NEW AUntapManaBlocker(_id, card, NEW ManaCost(cost,1)));
break; break;
} }
@@ -2060,6 +2072,10 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
game->addObserver(NEW AExalted(_id, card)); game->addObserver(NEW AExalted(_id, card));
} }
if (card->basicAbilities[Constants::DOESNOTUNTAP]){
game->addObserver(NEW Blocker(_id, card));
}
// Tested works the first r10 did not function because of the mistake in the array of the definition // Tested works the first r10 did not function because of the mistake in the array of the definition
if (card->basicAbilities[Constants::FORESTHOME]){ if (card->basicAbilities[Constants::FORESTHOME]){
game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest")); game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest"));
+1
View File
@@ -48,6 +48,7 @@ const char* Constants::MTGBasicAbilities[] = {
"cantattack", "cantattack",
"mustattack", "mustattack",
"cantblock", "cantblock",
"doesnotuntap",
}; };
const char* Constants::MTGPhaseNames[] = const char* Constants::MTGPhaseNames[] =