Switching PT, Token Indicator
Added Switching PT like Layer 7e, Token Indicator for cloned Cards
This commit is contained in:
@@ -55,6 +55,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
||||
castMethod = Constants::NOT_CAST;
|
||||
isSettingBase = 0;
|
||||
isCDA = false;
|
||||
isSwitchedPT = false;
|
||||
}
|
||||
|
||||
MTGCardInstance * MTGCardInstance::createSnapShot()
|
||||
@@ -695,6 +696,26 @@ void MTGCardInstance::cdaPT(int p, int t)
|
||||
applyPTbonus();
|
||||
}
|
||||
|
||||
void MTGCardInstance::switchPT(bool apply)
|
||||
{
|
||||
stripPTbonus();
|
||||
swapP = power;
|
||||
swapT = toughness;
|
||||
power += origpower;
|
||||
power -= swapP;
|
||||
addToToughness(origtoughness);
|
||||
addToToughness(-swapT);
|
||||
applyPTbonus();
|
||||
if(apply)
|
||||
{
|
||||
swapP = toughness;
|
||||
swapT = power;
|
||||
addToToughness(swapT);
|
||||
addToToughness(-swapP);
|
||||
setPower(swapP);
|
||||
}
|
||||
}
|
||||
|
||||
int MTGCardInstance::canBlock()
|
||||
{
|
||||
if (tapped)
|
||||
|
||||
Reference in New Issue
Block a user