Made damager keyword work. Fixed Executioner's Swing in mtg.txt

This commit is contained in:
Bjørn Snoen
2013-12-21 11:05:15 +01:00
parent d4e0296d2b
commit 20e878a102
9 changed files with 32 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ CardDescriptor::CardDescriptor()
colorComparisonMode = COMPARISON_NONE;
CDopponentDamaged = 0;
CDcontrollerDamaged = 0;
CDdamager = 0;
}
int CardDescriptor::init()
@@ -226,6 +227,12 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
{
match = NULL;
}
if ((CDdamager == -1 && (card->damageToOpponent || card->damageToController || card->damageToCreature)) || (CDdamager == 1 && !(card->damageToOpponent || card->damageToController || card->damageToCreature)))
{
match = NULL;
}
if(CDopponentDamaged == -1 || CDopponentDamaged == 1)
{
Player * p = card->controller()->opponent();//controller()->opponent();