diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 06679263d..bf10693c1 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -2712,6 +2712,17 @@ type=Artifact mana={5} [/card] [card] +text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. (It can attack and {T} this turn.) +id=129767 +target=creature +auto=haste +name=Threaten +rarity=U +color=Red +type=Sorcery +mana={2}{R} +[/card] +[card] text=Haste (This creature can attack and {T} as soon as it comes under your control.) abilities=haste id=130381 diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index 6bf05c518..e2922ee98 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -1172,6 +1172,8 @@ toughness=3 [card] text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. (It can attack and {T} this turn.) id=129767 +alias=1194 +auto=haste name=Threaten rarity=U color=Red diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 799e637c0..2930e5ded 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3846,5 +3846,39 @@ class AVerdantForce: public TriggeredAbility{ } }; +//Instant Steal control of a target +class AInstantControlSteal: public InstantAbility{ + public: + Player * TrueController; + Player * TheftController; + AInstantControlSteal(int _id , MTGCardInstance * _source, MTGCardInstance * _target):InstantAbility(_id, _source, _target){ + TrueController = _target->controller(); + // TrueController->game->putInZone(_target, TrueController->game->inPlay, source->controller()->game->inPlay); + TheftController = source->controller(); + MTGCardInstance * copy = _target->changeController(game->currentlyActing()); + target = copy; + source->target = copy; + + + } + int destroy(){ + MTGCardInstance * _target = (MTGCardInstance *) target; + if (TheftController && TheftController->game->inPlay->hasCard(_target)){ //if the target is still in game -> spell was destroyed + _target->changeController(TrueController); + + } + return 1; + } + + + virtual ostream& toString(ostream& out) const + { + out << "AInstantControlSteal ::: TrueController : " << TrueController + << " ("; + return InstantAbility::toString(out) << ")"; + } +}; + + #endif diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 83d7d3d96..ae666e82b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1885,7 +1885,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ MTGCardInstance * current = game->players[i]->game->inPlay->cards[j]; if (current->hasType("Artifact")){ game->players[i]->game->putInGraveyard(current); - current->controller()->life-= current->getManaCost()->getConvertedCost(); + current->controller()->life+= current->getManaCost()->getConvertedCost(); } } } @@ -1915,6 +1915,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ //-- addon 10E--- + case 129767: //Threaten + { + game->addObserver( NEW AInstantControlSteal(_id,card,card->target)); + break; + } case 130542: //Flowstone Slide { TargetChooser * lordTargets = NULL;