Added/fixed primitives, updated the "missing_cards_by_sets" folder, added new ability "hasstrive" to implement Strive cost with multikicker and refactored all cards with Strive cost (now they use a special version of multikicker but they don't count as kicked spell), improved "targeted" and "vampired" trigger to allow the "turnlimited" option, improved Android gesture to emulate "option menu" button pressure (slide down) and emulate "back" button pressure (slide up).

This commit is contained in:
Vittorio Alfieri
2021-09-07 21:41:24 +02:00
parent 9dabf121d3
commit 9aa15766d4
21 changed files with 424 additions and 512 deletions
+12 -5
View File
@@ -1105,7 +1105,9 @@ class TrVampired: public Trigger
{
public:
TargetChooser * fromTc;
TrVampired(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, bool once = false) :
bool limitOnceATurn;
int triggeredTurn;
TrVampired(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, bool once = false, bool limitOnceATurn = false) :
Trigger(observer, id, source, once, tc), fromTc(fromTc)
{
}
@@ -1115,7 +1117,8 @@ public:
WEventVampire * vamp = dynamic_cast<WEventVampire*>(event);
if (!vamp)
return 0;
if (limitOnceATurn && triggeredTurn == game->turn)
return 0;
if(fromTc && !fromTc->canTarget(vamp->source))
return 0;
tc->setAllZones();
@@ -1123,8 +1126,8 @@ public:
//setting allzones, as we don't care since we know the preexisting condiations cover the zones.
if(!tc->canTarget(vamp->victem))
return 0;
triggeredTurn = game->turn;
return 1;
}
~TrVampired()
@@ -1144,7 +1147,9 @@ class TrTargeted: public Trigger
public:
TargetChooser * fromTc;
int type;
TrTargeted(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0, bool once = false) :
bool limitOnceATurn;
int triggeredTurn;
TrTargeted(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, TargetChooser * fromTc = NULL, int type = 0, bool once = false, bool limitOnceATurn = false) :
Trigger(observer, id, source, once, tc), fromTc(fromTc), type(type)
{
}
@@ -1153,9 +1158,11 @@ public:
{
WEventTarget * e = dynamic_cast<WEventTarget *> (event);
if (!e) return 0;
if (limitOnceATurn && triggeredTurn == game->turn)
return 0;
if (!tc->canTarget(e->card)) return 0;
if (fromTc && !fromTc->canTarget(e->source)) return 0;
triggeredTurn = game->turn;
return 1;
}
+2 -1
View File
@@ -327,7 +327,8 @@ class Constants
DAYBOUND = 200,
NIGHTBOUND = 201,
DECAYED = 202,
NB_BASIC_ABILITIES = 203,
HASSTRIVE = 203,
NB_BASIC_ABILITIES = 204,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics