added support for doubling cube, recoded the curses to follow the rules better, with the exception of 1 which can not quite be supported

Curse of Oblivion moved back to unsupported.
added support for targeting a zone by targeting a player...
any time you have targeted a player, you can access items in thier zones by using 
targetedpersonsZONE
targetedpersonsbattlefield for example...
added "targetedplayer" as a targetchooser and who.
added "mycurses" targetchooser.
added "targetedcurses" word variable.
This commit is contained in:
omegablast2002@yahoo.com
2012-03-15 06:18:08 +00:00
parent d7cef8398f
commit a497ef49c8
9 changed files with 144 additions and 88 deletions
+5 -58
View File
@@ -251,6 +251,11 @@ private:
intValue = card->previous->previous->sunburst;
}
}
else if (s == "targetedcurses")
{
if(card->playerTarget)
intValue = card->playerTarget->curses.size();
}
else if (s == "lifetotal")
{
intValue = target->controller()->life;
@@ -5100,64 +5105,6 @@ public:
AARandomDiscarder * clone() const;
};
//Minion of Leshrac
class AMinionofLeshrac: public TargetAbility
{
public:
int paidThisTurn;
AMinionofLeshrac(GameObserver* observer, int _id, MTGCardInstance * source) :
TargetAbility(observer, _id, source, NEW TypeTargetChooser(game, "creature"), 0, 1)
{
paidThisTurn = 1;
}
void Update(float dt)
{
if (newPhase != currentPhase && source->controller() == game->currentPlayer)
{
if (newPhase == MTG_PHASE_UNTAP)
{
paidThisTurn = 0;
}
else if (newPhase == MTG_PHASE_UPKEEP + 1 && !paidThisTurn)
{
game->mLayers->stackLayer()->addDamage(source, source->controller(), 5);
source->tap();
}
}
TargetAbility::Update(dt);
}
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL)
{
if (currentPhase != MTG_PHASE_UPKEEP || paidThisTurn) return 0;
return TargetAbility::isReactingToClick(card, mana);
}
int resolve()
{
MTGCardInstance * card = tc->getNextCardTarget();
if (card && card != source && card->controller() == source->controller())
{
card->controller()->game->putInGraveyard(card);
paidThisTurn = 1;
return 1;
}
return 0;
}
virtual ostream& toString(ostream& out) const
{
out << "AMinionofLeshrac ::: paidThisTurn : " << paidThisTurn << " (";
return TargetAbility::toString(out) << ")";
}
AMinionofLeshrac * clone() const
{
return NEW AMinionofLeshrac(*this);
}
};
//Rampage ability
class ARampageAbility: public MTGAbility
{