Fix issue 563 (double strike VS regenerate)

-- also made "blocked" variable a private.
This commit is contained in:
wagic.the.homebrew
2011-10-10 12:29:52 +00:00
parent 9b2654997e
commit f0964d9af8
8 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -458,7 +458,7 @@ public:
{
if (!notblocked->card->didattacked)
return 0;
if (notblocked->card->blocked)
if (notblocked->card->isBlocked())
return 0;
if (!tc->canTarget(notblocked->card))
return 0;
@@ -470,7 +470,7 @@ public:
{
if (!attackblocked->card->didattacked)
return 0;
if (!attackblocked->card->blocked)
if (!attackblocked->card->isBlocked())
return 0;
if (fromTc && !fromTc->canTarget(attackblocked->opponent))
return 0;
+3 -1
View File
@@ -30,6 +30,8 @@ class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable
#endif
{
private:
bool blocked; //Blocked this turn or not?
protected:
int untapping;
int nb_damages;
@@ -128,7 +130,7 @@ public:
//dangerranking is a hint to Ai which creatures are the ones it should be targetting for effects.
int DangerRanking();
//Combat
bool blocked; //Blocked this turn or not?
bool isBlocked() {return blocked;}; //Blocked this turn or not?
MTGCardInstance * defenser;
list<MTGCardInstance *>blockers;
int attacker;