Merge branch 'master' of https://github.com/kevlahnota/wagic
This commit is contained in:
@@ -19622,8 +19622,8 @@ toughness=4
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Cranial Archive
|
name=Cranial Archive
|
||||||
auto={2}{E}:name(shuffle graveyard) target(player) donothing && moveto(ownerlibrary) and!(shuffle)! all(*|targetedpersonsgraveyard)
|
auto={2}{E}:name(shuffle graveyard) target(player) donothing && moveto(ownerlibrary) and!(shuffle && draw:1 controller)! all(*|targetedpersonsgraveyard)
|
||||||
text={2}, Exile Cranial Archive: Target player shuffles his or her graveyard into his or her library.
|
text={2}, Exile Cranial Archive: Target player shuffles his or her graveyard into his or her library. Draw a card.
|
||||||
mana={2}
|
mana={2}
|
||||||
type=Artifact
|
type=Artifact
|
||||||
[/card]
|
[/card]
|
||||||
@@ -73407,8 +73407,7 @@ toughness=*
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Plague Sliver
|
name=Plague Sliver
|
||||||
auto=@each my upkeep:life:-type:sliver:mybattlefield controller
|
auto=lord(sliver) transforms((,newabililty[@each my upkeep:damage:1 controller]))
|
||||||
auto=@each opponent upkeep:life:-type:sliver:opponentbattlefield opponent
|
|
||||||
text=All Slivers have "At the beginning of your upkeep, this permanent deals 1 damage to you."
|
text=All Slivers have "At the beginning of your upkeep, this permanent deals 1 damage to you."
|
||||||
mana={2}{B}{B}
|
mana={2}{B}{B}
|
||||||
type=Creature
|
type=Creature
|
||||||
@@ -74364,6 +74363,7 @@ type=Sorcery
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Preyseizer Dragon
|
name=Preyseizer Dragon
|
||||||
|
abilities=flying
|
||||||
auto=may target(<anyamount>other creature|mybattlefield) sacrifice && counter(1/1,2) all(this)
|
auto=may target(<anyamount>other creature|mybattlefield) sacrifice && counter(1/1,2) all(this)
|
||||||
auto=@combat(attacking) source(this)::target(creature,player) dynamicability<!chargestrike!>
|
auto=@combat(attacking) source(this)::target(creature,player) dynamicability<!chargestrike!>
|
||||||
text=Flying -- Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.) -- Whenever Preyseizer Dragon attacks, it deals damage to target creature or player equal to the number of +1/+1 counters on Preyseizer Dragon.
|
text=Flying -- Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.) -- Whenever Preyseizer Dragon attacks, it deals damage to target creature or player equal to the number of +1/+1 counters on Preyseizer Dragon.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ struct GuiAvatar;
|
|||||||
class GuiGraveyard;
|
class GuiGraveyard;
|
||||||
class GuiLibrary;
|
class GuiLibrary;
|
||||||
class GuiOpponentHand;
|
class GuiOpponentHand;
|
||||||
|
class GuiExile;
|
||||||
class GuiAvatars: public GuiLayer
|
class GuiAvatars: public GuiLayer
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@@ -14,6 +15,7 @@ protected:
|
|||||||
GuiGraveyard* selfGraveyard, *opponentGraveyard;
|
GuiGraveyard* selfGraveyard, *opponentGraveyard;
|
||||||
GuiLibrary* selfLibrary, *opponentLibrary;
|
GuiLibrary* selfLibrary, *opponentLibrary;
|
||||||
GuiOpponentHand *opponentHand;
|
GuiOpponentHand *opponentHand;
|
||||||
|
GuiExile* selfExile, *opponentExile;
|
||||||
GuiAvatar* active;
|
GuiAvatar* active;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -88,4 +88,14 @@ public:
|
|||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class GuiExile: public GuiGameZone
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Player * player;
|
||||||
|
GuiExile(float _x, float _y, bool hasFocus, Player * player, GuiAvatars* parent);
|
||||||
|
int receiveEventPlus(WEvent*);
|
||||||
|
int receiveEventMinus(WEvent*);
|
||||||
|
virtual ostream& toString(ostream& out) const;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // _GUISTATIC_H_
|
#endif // _GUISTATIC_H_
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#define GUI_GRAVEYARD 3
|
#define GUI_GRAVEYARD 3
|
||||||
#define GUI_LIBRARY 4
|
#define GUI_LIBRARY 4
|
||||||
#define GUI_OPPONENTHAND 5
|
#define GUI_OPPONENTHAND 5
|
||||||
|
#define GUI_EXILE 6
|
||||||
|
|
||||||
#include <JGui.h>
|
#include <JGui.h>
|
||||||
#include "WEvent.h"
|
#include "WEvent.h"
|
||||||
|
|||||||
@@ -279,6 +279,12 @@ struct WEventCardUnattached : public WEventCardUpdate {
|
|||||||
virtual Targetable * getTarget(int target);
|
virtual Targetable * getTarget(int target);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//event when card-equipment attached/equipped
|
||||||
|
struct WEventCardEquipped : public WEventCardUpdate {
|
||||||
|
WEventCardEquipped(MTGCardInstance * card);
|
||||||
|
virtual Targetable * getTarget(int target);
|
||||||
|
};
|
||||||
|
|
||||||
//event when card moves from player/opponent battlefield to player/opponent battlefield
|
//event when card moves from player/opponent battlefield to player/opponent battlefield
|
||||||
struct WEventCardControllerChange : public WEventCardUpdate {
|
struct WEventCardControllerChange : public WEventCardUpdate {
|
||||||
WEventCardControllerChange(MTGCardInstance * card);
|
WEventCardControllerChange(MTGCardInstance * card);
|
||||||
|
|||||||
@@ -5611,6 +5611,8 @@ int AEquip::equip(MTGCardInstance * equipped)
|
|||||||
//we equip...
|
//we equip...
|
||||||
a->addToGame();
|
a->addToGame();
|
||||||
}
|
}
|
||||||
|
WEvent * e = NEW WEventCardEquipped(source);
|
||||||
|
game->receiveEvent(e);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1134,6 +1134,8 @@ void GameObserver::ButtonPressed(PlayGuiObject * target)
|
|||||||
}
|
}
|
||||||
else if (GuiGraveyard* graveyard = dynamic_cast<GuiGraveyard*>(target))
|
else if (GuiGraveyard* graveyard = dynamic_cast<GuiGraveyard*>(target))
|
||||||
graveyard->toggleDisplay();
|
graveyard->toggleDisplay();
|
||||||
|
else if (GuiExile* exile = dynamic_cast<GuiExile*>(target))
|
||||||
|
exile->toggleDisplay();
|
||||||
//opponenthand
|
//opponenthand
|
||||||
else if (GuiOpponentHand* opponentHand = dynamic_cast<GuiOpponentHand*>(target))
|
else if (GuiOpponentHand* opponentHand = dynamic_cast<GuiOpponentHand*>(target))
|
||||||
if (opponentHand->showCards)
|
if (opponentHand->showCards)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) :
|
|||||||
self->zoom = 0.9f;
|
self->zoom = 0.9f;
|
||||||
Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 1, false, mpDuelLayers->getRenderedPlayer(), this));
|
Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 1, false, mpDuelLayers->getRenderedPlayer(), this));
|
||||||
Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this));
|
Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this));
|
||||||
|
Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 + 20, SCREEN_HEIGHT - GuiAvatar::Height, false, mpDuelLayers->getRenderedPlayer(), this));
|
||||||
|
|
||||||
Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this));
|
Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this));
|
||||||
opponent->zoom = 0.9f;
|
opponent->zoom = 0.9f;
|
||||||
@@ -28,12 +29,13 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) :
|
|||||||
|
|
||||||
observer->getCardSelector()->Add(self);
|
observer->getCardSelector()->Add(self);
|
||||||
observer->getCardSelector()->Add(selfGraveyard);
|
observer->getCardSelector()->Add(selfGraveyard);
|
||||||
|
observer->getCardSelector()->Add(selfExile);
|
||||||
observer->getCardSelector()->Add(selfLibrary);
|
observer->getCardSelector()->Add(selfLibrary);
|
||||||
observer->getCardSelector()->Add(opponent);
|
observer->getCardSelector()->Add(opponent);
|
||||||
observer->getCardSelector()->Add(opponentGraveyard);
|
observer->getCardSelector()->Add(opponentGraveyard);
|
||||||
observer->getCardSelector()->Add(opponentLibrary);
|
observer->getCardSelector()->Add(opponentLibrary);
|
||||||
observer->getCardSelector()->Add(opponentHand);
|
observer->getCardSelector()->Add(opponentHand);
|
||||||
selfGraveyard->alpha = selfLibrary->alpha = opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 0;
|
selfGraveyard->alpha = selfExile->alpha = selfLibrary->alpha = opponentGraveyard->alpha = opponentLibrary->alpha = opponentHand->alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float GuiAvatars::LeftBoundarySelf()
|
float GuiAvatars::LeftBoundarySelf()
|
||||||
@@ -56,9 +58,9 @@ void GuiAvatars::Activate(PlayGuiObject* c)
|
|||||||
active = opponent;
|
active = opponent;
|
||||||
opponent->zoom = 1.2f;
|
opponent->zoom = 1.2f;
|
||||||
}
|
}
|
||||||
else if ((selfGraveyard == c) || (selfLibrary == c) || (self == c))
|
else if ((selfGraveyard == c) || (selfExile == c) || (selfLibrary == c) || (self == c))
|
||||||
{
|
{
|
||||||
selfGraveyard->alpha = selfLibrary->alpha = 128.0f;
|
selfGraveyard->alpha = selfExile->alpha = selfLibrary->alpha = 128.0f;
|
||||||
self->zoom = 1.0f;
|
self->zoom = 1.0f;
|
||||||
active = self;
|
active = self;
|
||||||
}
|
}
|
||||||
@@ -75,9 +77,9 @@ void GuiAvatars::Deactivate(PlayGuiObject* c)
|
|||||||
opponent->zoom = 0.9f;
|
opponent->zoom = 0.9f;
|
||||||
active = NULL;
|
active = NULL;
|
||||||
}
|
}
|
||||||
else if ((selfGraveyard == c) || (selfLibrary == c) || (self == c))
|
else if ((selfGraveyard == c) || (selfExile == c) || (selfLibrary == c) || (self == c))
|
||||||
{
|
{
|
||||||
selfGraveyard->alpha = selfLibrary->alpha = 0;
|
selfGraveyard->alpha = selfExile->alpha = selfLibrary->alpha = 0;
|
||||||
self->zoom = 0.5f;
|
self->zoom = 0.5f;
|
||||||
active = NULL;
|
active = NULL;
|
||||||
}
|
}
|
||||||
@@ -85,12 +87,13 @@ void GuiAvatars::Deactivate(PlayGuiObject* c)
|
|||||||
|
|
||||||
int GuiAvatars::receiveEventPlus(WEvent* e)
|
int GuiAvatars::receiveEventPlus(WEvent* e)
|
||||||
{
|
{
|
||||||
return selfGraveyard->receiveEventPlus(e) | opponentGraveyard->receiveEventPlus(e) | opponentHand->receiveEventPlus(e);
|
return selfGraveyard->receiveEventPlus(e) | selfExile->receiveEventPlus(e) | opponentGraveyard->receiveEventPlus(e) | opponentHand->receiveEventPlus(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
int GuiAvatars::receiveEventMinus(WEvent* e)
|
int GuiAvatars::receiveEventMinus(WEvent* e)
|
||||||
{
|
{
|
||||||
selfGraveyard->receiveEventMinus(e);
|
selfGraveyard->receiveEventMinus(e);
|
||||||
|
selfExile->receiveEventMinus(e);
|
||||||
opponentGraveyard->receiveEventMinus(e);
|
opponentGraveyard->receiveEventMinus(e);
|
||||||
opponentHand->receiveEventMinus(e);
|
opponentHand->receiveEventMinus(e);
|
||||||
return 1;
|
return 1;
|
||||||
@@ -104,6 +107,8 @@ bool GuiAvatars::CheckUserInput(JButton key)
|
|||||||
return true;
|
return true;
|
||||||
if (selfGraveyard->CheckUserInput(key))
|
if (selfGraveyard->CheckUserInput(key))
|
||||||
return true;
|
return true;
|
||||||
|
if (selfExile->CheckUserInput(key))
|
||||||
|
return true;
|
||||||
if (opponentGraveyard->CheckUserInput(key))
|
if (opponentGraveyard->CheckUserInput(key))
|
||||||
return true;
|
return true;
|
||||||
if (opponentHand->CheckUserInput(key))
|
if (opponentHand->CheckUserInput(key))
|
||||||
@@ -120,6 +125,7 @@ void GuiAvatars::Update(float dt)
|
|||||||
self->Update(dt);
|
self->Update(dt);
|
||||||
opponent->Update(dt);
|
opponent->Update(dt);
|
||||||
selfGraveyard->Update(dt);
|
selfGraveyard->Update(dt);
|
||||||
|
selfExile->Update(dt);
|
||||||
opponentHand->Update(dt);
|
opponentHand->Update(dt);
|
||||||
opponentGraveyard->Update(dt);
|
opponentGraveyard->Update(dt);
|
||||||
selfLibrary->Update(dt);
|
selfLibrary->Update(dt);
|
||||||
|
|||||||
@@ -412,6 +412,8 @@ int GuiPlay::receiveEventPlus(WEvent * e)
|
|||||||
Replace();
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardUnattached*> (e))
|
else if (dynamic_cast<WEventCardUnattached*> (e))
|
||||||
Replace();
|
Replace();
|
||||||
|
else if (dynamic_cast<WEventCardEquipped*> (e))
|
||||||
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardControllerChange*> (e))
|
else if (dynamic_cast<WEventCardControllerChange*> (e))
|
||||||
Replace();
|
Replace();
|
||||||
Replace();
|
Replace();
|
||||||
|
|||||||
@@ -298,6 +298,52 @@ ostream& GuiGraveyard::toString(ostream& out) const
|
|||||||
return out << "GuiGraveyard :::";
|
return out << "GuiGraveyard :::";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GuiExile::GuiExile(float x, float y, bool hasFocus, Player * player, GuiAvatars* parent) :
|
||||||
|
GuiGameZone(x, y, hasFocus, player->game->exile, parent), player(player)
|
||||||
|
{
|
||||||
|
type = GUI_EXILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GuiExile::receiveEventPlus(WEvent* e)
|
||||||
|
{
|
||||||
|
if (WEventZoneChange* event = dynamic_cast<WEventZoneChange*>(e))
|
||||||
|
if (event->to == zone)
|
||||||
|
{
|
||||||
|
CardView* t;
|
||||||
|
if (event->card->view)
|
||||||
|
t = NEW CardView(CardView::nullZone, event->card, *(event->card->view));
|
||||||
|
else
|
||||||
|
t = NEW CardView(CardView::nullZone, event->card, x, y);
|
||||||
|
t->x = x + Width / 2;
|
||||||
|
t->y = y + Height / 2;
|
||||||
|
t->zoom = 0.6f;
|
||||||
|
t->alpha = 0;
|
||||||
|
cards.push_back(t);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GuiExile::receiveEventMinus(WEvent* e)
|
||||||
|
{
|
||||||
|
if (WEventZoneChange* event = dynamic_cast<WEventZoneChange*>(e))
|
||||||
|
if (event->from == zone)
|
||||||
|
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
|
||||||
|
if (event->card->previous == (*it)->card)
|
||||||
|
{
|
||||||
|
CardView* cv = *it;
|
||||||
|
cards.erase(it);
|
||||||
|
zone->owner->getObserver()->mTrash->trash(cv);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ostream& GuiExile::toString(ostream& out) const
|
||||||
|
{
|
||||||
|
return out << "GuiExile :::";
|
||||||
|
}
|
||||||
|
|
||||||
//opponenthand begins
|
//opponenthand begins
|
||||||
GuiOpponentHand::GuiOpponentHand(float x, float y, bool hasFocus, Player * player, GuiAvatars* parent) :
|
GuiOpponentHand::GuiOpponentHand(float x, float y, bool hasFocus, Player * player, GuiAvatars* parent) :
|
||||||
GuiGameZone(x, y, hasFocus, player->game->hand, parent), player(player)
|
GuiGameZone(x, y, hasFocus, player->game->hand, parent), player(player)
|
||||||
|
|||||||
@@ -165,6 +165,11 @@ WEventCardUnattached::WEventCardUnattached(MTGCardInstance * card) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WEventCardEquipped::WEventCardEquipped(MTGCardInstance * card) :
|
||||||
|
WEventCardUpdate(card)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) :
|
WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) :
|
||||||
WEventCardUpdate(card)
|
WEventCardUpdate(card)
|
||||||
{
|
{
|
||||||
@@ -324,6 +329,12 @@ Targetable * WEventCardUnattached::getTarget(int target)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Targetable * WEventCardEquipped::getTarget(int target)
|
||||||
|
{
|
||||||
|
if (target) return card;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Targetable * WEventCardControllerChange::getTarget(int target)
|
Targetable * WEventCardControllerChange::getTarget(int target)
|
||||||
{
|
{
|
||||||
if (target) return card;
|
if (target) return card;
|
||||||
|
|||||||
Reference in New Issue
Block a user