allow to use X as the number of counters. daily build.
Added feral hydra.
This commit is contained in:
@@ -13317,6 +13317,18 @@ type=Creature
|
|||||||
subtype=Faerie Soldier
|
subtype=Faerie Soldier
|
||||||
power=3
|
power=3
|
||||||
toughness=2
|
toughness=2
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
|
name=Feral Hydra
|
||||||
|
type=Creature
|
||||||
|
subtype=Hydra Beast
|
||||||
|
mana={X}{G}
|
||||||
|
power=0
|
||||||
|
toughness=0
|
||||||
|
text=Feral Hydra comes into play with X +1/+1 counters on it. -- {3}: Put a +1/+1 counter on Feral Hydra. Any player may play this ability
|
||||||
|
auto=counter(1/1,X)
|
||||||
|
auto={3}:counter(1/1)
|
||||||
|
grade=borderline
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Feral Animist
|
name=Feral Animist
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
########################
|
########################
|
||||||
#Generic engine features
|
#Generic engine features
|
||||||
########################
|
########################
|
||||||
|
zzz.txt
|
||||||
generic/attacks_each_turn.txt
|
generic/attacks_each_turn.txt
|
||||||
generic/cycling.txt
|
generic/cycling.txt
|
||||||
generic/cycling2.txt
|
generic/cycling2.txt
|
||||||
|
|||||||
Binary file not shown.
@@ -183,8 +183,8 @@ public:
|
|||||||
int triggerOnEvent(WEvent * event){
|
int triggerOnEvent(WEvent * event){
|
||||||
WEventDamage * e = dynamic_cast<WEventDamage *>(event);
|
WEventDamage * e = dynamic_cast<WEventDamage *>(event);
|
||||||
if (!e) return 0;
|
if (!e) return 0;
|
||||||
if(!tc->canTarget(e->damage->target)) return 0;
|
if(!tc->canTarget(e->damage->target)) return 0;
|
||||||
if (fromTc && !fromTc->canTarget(e->damage->source)) return 0;
|
if (fromTc && !fromTc->canTarget(e->damage->source)) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class AbilityFactory{
|
|||||||
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
|
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
|
||||||
int parseRestriction(string s);
|
int parseRestriction(string s);
|
||||||
public:
|
public:
|
||||||
Counter * parseCounter(string s, MTGCardInstance * target);
|
Counter * parseCounter(string s, MTGCardInstance * target, Spell * spell = NULL);
|
||||||
int parsePowerToughness(string s, int *power, int *toughness);
|
int parsePowerToughness(string s, int *power, int *toughness);
|
||||||
int getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCardInstance * card = NULL, int id = 0,MTGGameZone * dest = NULL);
|
int getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCardInstance * card = NULL, int id = 0,MTGGameZone * dest = NULL);
|
||||||
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0,MTGGameZone * dest = NULL);
|
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0,MTGGameZone * dest = NULL);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ int AbilityFactory::countCards(TargetChooser * tc, Player * player, int option){
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Counter * AbilityFactory::parseCounter(string s, MTGCardInstance * target) {
|
Counter * AbilityFactory::parseCounter(string s, MTGCardInstance * target, Spell * spell) {
|
||||||
int nb = 1;
|
int nb = 1;
|
||||||
string name = "";
|
string name = "";
|
||||||
size_t start = 0;
|
size_t start = 0;
|
||||||
@@ -50,7 +50,13 @@ Counter * AbilityFactory::parseCounter(string s, MTGCardInstance * target) {
|
|||||||
name = s.substr(separator2+1,end-separator2-1);
|
name = s.substr(separator2+1,end-separator2-1);
|
||||||
}
|
}
|
||||||
string nbstr = s.substr(separator+1,separator2-separator-1);
|
string nbstr = s.substr(separator+1,separator2-separator-1);
|
||||||
nb = atoi(nbstr.c_str());
|
WParsedInt * wpi;
|
||||||
|
if (target){
|
||||||
|
wpi = NEW WParsedInt(nbstr,spell,target);
|
||||||
|
}else{
|
||||||
|
wpi = NEW WParsedInt(atoi(nbstr.c_str()));
|
||||||
|
}
|
||||||
|
nb = wpi->getValue();
|
||||||
end = separator;
|
end = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +808,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
size_t start = s.find("(");
|
size_t start = s.find("(");
|
||||||
size_t end = s.find(")");
|
size_t end = s.find(")");
|
||||||
string counterString = s.substr(start+1,end-start-1);
|
string counterString = s.substr(start+1,end-start-1);
|
||||||
Counter * counter = parseCounter(counterString,target);
|
Counter * counter = parseCounter(counterString,target,spell);
|
||||||
if (counter){
|
if (counter){
|
||||||
MTGAbility * a = NEW AACounter(id,card,target,counter->name.c_str(),counter->power,counter->toughness,counter->nb);
|
MTGAbility * a = NEW AACounter(id,card,target,counter->name.c_str(),counter->power,counter->toughness,counter->nb);
|
||||||
a->oneShot = 1;
|
a->oneShot = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user