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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -516,7 +516,8 @@ public:
|
||||
string menutext;
|
||||
ManaCost * output;
|
||||
int tap;
|
||||
AManaProducer(GameObserver* observer, int id, MTGCardInstance * card, Targetable * t, ManaCost * _output, ManaCost * _cost = NULL, int who = TargetChooser::UNSET);
|
||||
string Producing;
|
||||
AManaProducer(GameObserver* observer, int id, MTGCardInstance * card, Targetable * t, ManaCost * _output, ManaCost * _cost = NULL, int who = TargetChooser::UNSET,string producing = "");
|
||||
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL);
|
||||
int resolve();
|
||||
int reactToClick(MTGCardInstance* _card);
|
||||
|
||||
@@ -30,6 +30,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_GRAVEYARD = 14,
|
||||
GRAVEYARD = 15,
|
||||
OWNER_GRAVEYARD = 16,
|
||||
TARGETED_PLAYER_GRAVEYARD = 17,
|
||||
|
||||
MY_BATTLEFIELD = 21,
|
||||
OPPONENT_BATTLEFIELD = 22,
|
||||
@@ -37,6 +38,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_BATTLEFIELD = 24,
|
||||
BATTLEFIELD = 25,
|
||||
OWNER_BATTLEFIELD = 26,
|
||||
TARGETED_PLAYER_BATTLEFIELD = 27,
|
||||
|
||||
MY_HAND = 31,
|
||||
OPPONENT_HAND = 32,
|
||||
@@ -44,6 +46,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_HAND = 34,
|
||||
HAND = 35,
|
||||
OWNER_HAND = 36,
|
||||
TARGETED_PLAYER_HAND = 37,
|
||||
|
||||
MY_EXILE = 41,
|
||||
OPPONENT_EXILE = 42,
|
||||
@@ -51,6 +54,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_EXILE = 44,
|
||||
EXILE = 45,
|
||||
OWNER_EXILE = 46,
|
||||
TARGETED_PLAYER_EXILE = 47,
|
||||
|
||||
MY_LIBRARY = 51,
|
||||
OPPONENT_LIBRARY = 52,
|
||||
@@ -58,6 +62,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_LIBRARY = 54,
|
||||
LIBRARY = 55,
|
||||
OWNER_LIBRARY = 56,
|
||||
TARGETED_PLAYER_LIBRARY = 57,
|
||||
|
||||
MY_STACK = 61,
|
||||
OPPONENT_STACK = 62,
|
||||
@@ -65,6 +70,7 @@ class MTGGameZone {
|
||||
TARGET_CONTROLLER_STACK = 64,
|
||||
STACK = 65,
|
||||
OWNER_STACK = 66,
|
||||
TARGETED_PLAYER_STACK = 67,
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
int offerInterruptOnPhase;
|
||||
int skippingTurn;
|
||||
int extraTurn;
|
||||
vector<MTGCardInstance*>curses;
|
||||
Player(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
|
||||
virtual ~Player();
|
||||
virtual void setObserver(GameObserver*g);
|
||||
|
||||
@@ -32,7 +32,8 @@ public:
|
||||
OPPONENT = -1,
|
||||
CONTROLLER = 1,
|
||||
TARGET_CONTROLLER = 2,
|
||||
OWNER = 3
|
||||
OWNER = 3,
|
||||
TARGETED_PLAYER = 4
|
||||
};
|
||||
bool other;
|
||||
bool withoutProtections;
|
||||
@@ -259,6 +260,25 @@ public:
|
||||
virtual bool equals(TargetChooser * tc);
|
||||
};
|
||||
|
||||
class myCursesChooser: public TypeTargetChooser
|
||||
{
|
||||
public:
|
||||
bool withoutProtections;
|
||||
myCursesChooser(GameObserver *observer, int * _zones, int _nbzones, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false, bool targetMin = false) :
|
||||
TypeTargetChooser(observer, "*",_zones, _nbzones, card, _maxtargets, other, targetMin)
|
||||
{
|
||||
}
|
||||
;
|
||||
myCursesChooser(GameObserver *observer, MTGCardInstance * card = NULL, int _maxtargets = 1, bool other = false,bool targetMin = false) :
|
||||
TypeTargetChooser(observer, "*", card, _maxtargets, other,targetMin)
|
||||
{
|
||||
}
|
||||
;
|
||||
virtual bool canTarget(Targetable * target, bool withoutProtections = false);
|
||||
virtual myCursesChooser * clone() const;
|
||||
virtual bool equals(TargetChooser * tc);
|
||||
};
|
||||
|
||||
class ParentChildChooser: public TypeTargetChooser
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user