Erwan
- Added "X" cost for token multiplier -"daily" build
This commit is contained in:
@@ -607,6 +607,7 @@ toughness=2
|
||||
text=When Rise of the Hobgoblins comes into play, you may pay {X}. If you do, put X 1/1 red and white Goblin Soldier creature tokens into play. {RW}: Red creatures and white creatures you control gain first strike until end of turn.
|
||||
id=151114
|
||||
auto={RW}:lord(creature[white;red]|myinplay) first strike
|
||||
auto=Token(Goblin Soldier,Creature Goblin Soldier,1/1,red white)*x
|
||||
name=Rise of the Hobgoblins
|
||||
rarity=R
|
||||
type=Enchantment
|
||||
|
||||
@@ -546,6 +546,7 @@ toughness=1
|
||||
text=Put X 1/1 red Goblin creature tokens onto the battlefield.
|
||||
id=8818
|
||||
name=Goblin Offensive
|
||||
auto=token(Goblin,Creature Goblin,1/1,red)*x
|
||||
rarity=U
|
||||
mana={X}{1}{R}{R}
|
||||
type=Sorcery
|
||||
|
||||
@@ -117,6 +117,7 @@ gnarled_effigy.txt
|
||||
goblin_balloon_brigade.txt
|
||||
goblin_balloon_brigade2.txt
|
||||
goblin_king.txt
|
||||
goblin_offensive.txt
|
||||
gravedigger.txt
|
||||
#hammerfist_giant.txt
|
||||
hannas_custody.txt
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#Test: X for tokens
|
||||
[INIT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
manapool:{5}{1}{R}{R}
|
||||
hand:goblin offensive
|
||||
[PLAYER2]
|
||||
[DO]
|
||||
goblin offensive
|
||||
[ASSERT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
inplay:*,*,*,*,*
|
||||
graveyard:goblin offensive
|
||||
[PLAYER2]
|
||||
[END]
|
||||
Binary file not shown.
@@ -35,8 +35,8 @@ public:
|
||||
delete c;
|
||||
return x;
|
||||
}
|
||||
WParsedInt(){
|
||||
intValue = 0;
|
||||
WParsedInt(int value = 0){
|
||||
intValue = value;
|
||||
}
|
||||
|
||||
WParsedInt(string s, Spell * spell, MTGCardInstance * card){
|
||||
@@ -517,12 +517,12 @@ public:
|
||||
list<int>colors;
|
||||
int power, toughness;
|
||||
string name;
|
||||
int multiplier;
|
||||
ATokenCreator(int _id,MTGCardInstance * _source,ManaCost * _cost, string sname, string stypes,int _power,int _toughness, string sabilities, int _doTap, int _multiplier = 1):ActivatedAbility(_id,_source,_cost,0,_doTap){
|
||||
WParsedInt * multiplier;
|
||||
ATokenCreator(int _id,MTGCardInstance * _source,ManaCost * _cost, string sname, string stypes,int _power,int _toughness, string sabilities, int _doTap, WParsedInt * multiplier = NULL):ActivatedAbility(_id,_source,_cost,0,_doTap), multiplier(multiplier){
|
||||
power = _power;
|
||||
toughness = _toughness;
|
||||
name = sname;
|
||||
multiplier = _multiplier;
|
||||
if(!multiplier) this->multiplier = NEW WParsedInt(1);
|
||||
|
||||
//TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class;
|
||||
|
||||
@@ -556,7 +556,7 @@ public:
|
||||
}
|
||||
|
||||
int resolve(){
|
||||
for (int i = 0; i < multiplier; ++i){
|
||||
for (int i = 0; i < multiplier->getValue(); ++i){
|
||||
Token * myToken = NEW Token(name,source,power,toughness);
|
||||
list<int>::iterator it;
|
||||
for ( it=types.begin() ; it != types.end(); it++ ){
|
||||
@@ -594,6 +594,12 @@ public:
|
||||
return a;
|
||||
}
|
||||
|
||||
~ATokenCreator(){
|
||||
if (!isClone){
|
||||
delete(multiplier);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class AAMover:public ActivatedAbility{
|
||||
|
||||
@@ -367,9 +367,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
int power, toughness;
|
||||
parsePowerToughness(spt,&power, &toughness);
|
||||
string sabilities = s.substr(end+1);
|
||||
int multiplier = 1;
|
||||
WParsedInt * multiplier = NULL;
|
||||
found = s.find("*");
|
||||
if (found != string::npos)multiplier = atoi(s.substr(found+1).c_str());
|
||||
if (found != string::npos)multiplier = NEW WParsedInt(s.substr(found+1),spell,card);
|
||||
ATokenCreator * tok = NEW ATokenCreator(id,card,NULL,sname,stypes,power,toughness,sabilities,0, multiplier);
|
||||
tok->oneShot = 1;
|
||||
return tok;
|
||||
@@ -1453,20 +1453,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//-- addon Urza Saga---
|
||||
case 8818: //Goblin Offensive
|
||||
{
|
||||
int x = computeX(spell,card);
|
||||
ATokenCreator * tok = NEW ATokenCreator(id,card,NEW ManaCost(),"Goblin","creature Goblin",1,1,"Red",0);
|
||||
for (int i=0; i < x; i++){
|
||||
tok->resolve();
|
||||
}
|
||||
delete(tok);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//-- addon 10E---
|
||||
|
||||
case 129710: //Angelic Chorus
|
||||
@@ -1557,7 +1544,7 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
||||
}
|
||||
|
||||
// --- addon Invasion---
|
||||
case 23195: //Artifact Mutation
|
||||
case 23195: //Artifact Mutation
|
||||
{
|
||||
card->target->controller()->game->putInGraveyard(card->target);
|
||||
int x = card->target->getManaCost()->getConvertedCost();
|
||||
@@ -1568,18 +1555,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
||||
delete(tok);
|
||||
break;
|
||||
}
|
||||
//--- addon Eventide ----
|
||||
|
||||
case 151114: //Rise of the Hobgoblins
|
||||
{
|
||||
int x = computeX(spell,card);
|
||||
ATokenCreator * tok = NEW ATokenCreator(id,card,NEW ManaCost(),"Goblin Soldier","creature Goblin Soldier",1,1,"red white",0);
|
||||
for (int i=0; i < x; i++){
|
||||
tok->resolve();
|
||||
}
|
||||
delete(tok);
|
||||
break;
|
||||
}
|
||||
|
||||
// --- addon Ravnica---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user