diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 76486cf6c..0e6ea304e 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -407,9 +407,12 @@ power=4 subtype=Golem toughness=4 [/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 name=Colossus of Sardia +abilities=doesnotuntap,trample +auto={9}:untap rarity=R color=Artifact type=Artifact Creature @@ -486,6 +489,17 @@ type=Sorcery mana={B} [/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. id=135223 name=Deluge diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index 3a2ff743a..67fdc24c1 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -301,16 +301,6 @@ type=Sorcery mana={1}{B} [/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. id=135250 name=Denizen of the Deep diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 79f7d52b8..c2255ea9d 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -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] //Ex : the rack, ivory tower... class ALifeZoneLink:public MTGAbility{ diff --git a/projects/mtg/include/Blocker.h b/projects/mtg/include/Blocker.h index c6569844b..504341a1c 100644 --- a/projects/mtg/include/Blocker.h +++ b/projects/mtg/include/Blocker.h @@ -22,6 +22,7 @@ class Blocker : public MTGAbility { virtual int unblock(){return 1;}; Blocker(int id, MTGCardInstance * card, ManaCost * _cost); Blocker(int id, MTGCardInstance * card); + Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target); Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost); ~Blocker(); virtual void Update(float dt); diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 5d8cc3a08..e35a92bfd 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -95,8 +95,9 @@ class Constants CANTATTACK = 37, MUSTATTACK = 38, CANTBLOCK = 39, + DOESNOTUNTAP =40, - NB_BASIC_ABILITIES = 40, + NB_BASIC_ABILITIES = 41, RARITY_M = 'M', diff --git a/projects/mtg/src/Blocker.cpp b/projects/mtg/src/Blocker.cpp index 1c386c56f..b7f7b8f2b 100644 --- a/projects/mtg/src/Blocker.cpp +++ b/projects/mtg/src/Blocker.cpp @@ -8,7 +8,9 @@ Blocker::Blocker(int id, MTGCardInstance * card):MTGAbility(id, card){ Blocker::Blocker(int id, MTGCardInstance * card, ManaCost * _cost):MTGAbility(id, card){ 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){ init(_cost); } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 63da15366..77c55d4fd 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -7,6 +7,7 @@ #include "../include/TargetChooser.h" #include "../include/CardGui.h" #include "../include/MTGDeck.h" +#include "../include/Blocker.h" int AbilityFactory::countCards(TargetChooser * tc, Player * player, int option){ @@ -357,9 +358,13 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ } if (tc){ game->addObserver(NEW AUntaper(id, card, cost, tc)); - }else{ - target->tapped = 0; - } + }else{ + if (cost){ + game->addObserver(NEW AUntapManaBlocker(id, card, cost)); + }else{ + target->tapped = 0; + } + } result++; continue; } @@ -1931,10 +1936,17 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ 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 AUntapManaBlocker(_id, card, NEW ManaCost(cost,1))); + game->addObserver(NEW Blocker(_id,card,card->target)); break; } @@ -2060,6 +2072,10 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ 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 if (card->basicAbilities[Constants::FORESTHOME]){ game->addObserver(NEW AStrongLandLinkCreature(_id, card, "forest")); diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index ca7bbf008..26793cd02 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -48,6 +48,7 @@ const char* Constants::MTGBasicAbilities[] = { "cantattack", "mustattack", "cantblock", +"doesnotuntap", }; const char* Constants::MTGPhaseNames[] =