Fixed/added primitives, added keyword to alter devotion count, added keyword to target cards with flashback cost, added "duplicatecounters(single)" keyword to add a counter of a specific kind already present on a permanent or a player.

This commit is contained in:
Vittorio Alfieri
2021-01-07 18:56:47 +01:00
parent 4c00dfb3b6
commit eaaa4d783b
13 changed files with 249 additions and 105 deletions
+20 -3
View File
@@ -427,7 +427,7 @@ private:
{
if (color)
{
intValue += zone->countTotalManaSymbols(tc, color);
intValue += card->controller()->devotionOffset + zone->countTotalManaSymbols(tc, color); // Increase total devotion with an offset (e.g. Altar of the Pantheon)
}
else
{
@@ -576,6 +576,10 @@ private:
{
intValue = (s == "psurveiloffset")?card->controller()->surveilOffset:card->controller()->opponent()->surveilOffset;
}
else if (s == "pdevotionoffset" || s == "odevotionoffset")
{
intValue = (s == "pdevotionoffset")?card->controller()->devotionOffset:card->controller()->opponent()->devotionOffset;
}
else if (s == "praidcount" || s == "oraidcount")
{
intValue = (s == "praidcount")?card->controller()->raidcount:card->controller()->opponent()->raidcount;
@@ -1115,7 +1119,7 @@ public:
counthybrid += zone->countDevotion(dtc, color1, color2);
}
SAFE_DELETE(dtc);
return counthybrid;
return card->controller()->devotionOffset + counthybrid; // Increase total devotion with an offset (e.g. Altar of the Pantheon)
}
int countCardNameinZone(string name, MTGGameZone * zone)
@@ -2356,7 +2360,7 @@ public:
class AADuplicateCounters: public ActivatedAbility
{
public:
bool allcounters;
bool allcounters, single;
AADuplicateCounters(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target, ManaCost * cost = NULL);
int resolve();
const string getMenuText();
@@ -5046,6 +5050,19 @@ public:
AAAlterSurveilOffset * clone() const;
~AAAlterSurveilOffset();
};
//Devotion Offset
class AAAlterDevotionOffset: public ActivatedAbilityTP
{
public:
int devotionOffset;
AAAlterDevotionOffset(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int devotionOffset, ManaCost * _cost = NULL,
int who = TargetChooser::UNSET);
int resolve();
const string getMenuText();
AAAlterDevotionOffset * clone() const;
~AAAlterDevotionOffset();
};
/* Standard Damager, can choose a NEW target each time the price is paid */
class TADamager: public TargetAbility
{