added new legend & pw rule, trigger & event
added new pw & legend rule (i just leave the old rules behind and disabled it), added phasesin, faceup, copiedacard event, added facedup & phasedin trigger.
This commit is contained in:
@@ -169,6 +169,11 @@ void MTGCardInstance::copy(MTGCardInstance * card)
|
||||
backupTargets = this->backupTargets;
|
||||
storedCard = oldStored;
|
||||
miracle = false;
|
||||
|
||||
|
||||
//add event here copied a card...
|
||||
WEvent * e = NEW WEventCardCopiedACard(this);
|
||||
getObserver()->receiveEvent(e);
|
||||
}
|
||||
|
||||
MTGCardInstance::~MTGCardInstance()
|
||||
@@ -849,6 +854,22 @@ int MTGCardInstance::countDuplicateCardNames()
|
||||
return count;
|
||||
}
|
||||
|
||||
int MTGCardInstance::countDuplicateCardTypes()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if(observer)
|
||||
{
|
||||
int nb_cards = controller()->game->battlefield->nb_cards;
|
||||
for(int x = 0; x < nb_cards; x++)
|
||||
{
|
||||
if(controller()->game->battlefield->cards[x] != this && controller()->game->battlefield->cards[x]->types == this->types)
|
||||
count+=1;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
//check can produce mana
|
||||
int MTGCardInstance::canproduceMana(int color)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user