-added telkinetic sliver. This confirms that All lords that give a "complex" ability can now be added in cards.dat, as long as we can write the ability.
For example: lord(sliver) {T}:tap target(*) for telkinetic sliver. Please test and let me know
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-07-12 03:02:38 +00:00
parent cf45e00331
commit 3350ad6d03
4 changed files with 48 additions and 5 deletions
+12
View File
@@ -359,6 +359,18 @@ text=B
rarity=C rarity=C
[/card] [/card]
[card] [card]
id=111085
name=Telekinetic Sliver
mana={2}{U}{U}
type=Creature
subtype=Sliver
power=2
toughness=2
text=All Slivers have "{T}: Tap target permanent."
auto=lord(sliver) {T}:tap target(*)
rarity=U
[/card]
[card]
id=118887 id=118887
name=Temporal Eddy name=Temporal Eddy
mana={2}{U}{U} mana={2}{U}{U}
+1
View File
@@ -134,6 +134,7 @@ stasis.txt
steelclad_serpent1.txt steelclad_serpent1.txt
steelclad_serpent2.txt steelclad_serpent2.txt
sword_to_plowshares.txt sword_to_plowshares.txt
telekinetic_sliver.txt
terror.txt terror.txt
titanic_ultimatum.txt titanic_ultimatum.txt
tranquil_domain.txt tranquil_domain.txt
@@ -0,0 +1,28 @@
#Testing Telekinetic sliver
# text=All Slivers have "{T}: Tap target permanent."
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:Telekinetic Sliver,Metallic sliver,grizzly bears
[PLAYER2]
[DO]
Metallic sliver
grizzly bears
next
#combat begins
next
#attackers
grizzly bears
next
#blockers
next
#damage
next
#combat ends
[ASSERT]
COMBATEND
[PLAYER1]
inplay:Telekinetic Sliver,Metallic sliver,grizzly bears
[PLAYER2]
life:20
[END]
+6 -4
View File
@@ -113,9 +113,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
int doTap = 0; //Tap in the cost ? int doTap = 0; //Tap in the cost ?
if (s.find("{t}") != string::npos) doTap = 1; if (s.find("{t}") != string::npos) doTap = 1;
unsigned int delimiter = s.find("}:"); size_t delimiter = s.find("}:");
size_t firstNonSpace = s.find_first_not_of(" ");
if (delimiter!= string::npos && s[0]=='{'){ if (delimiter!= string::npos && firstNonSpace !=string::npos && s[firstNonSpace] == '{'){
ManaCost * cost = ManaCost::parseManaCost(s.substr(0,delimiter+1),NULL,card); ManaCost * cost = ManaCost::parseManaCost(s.substr(0,delimiter+1),NULL,card);
if (doTap || (cost && !cost->isNull())){ if (doTap || (cost && !cost->isNull())){
string s1 = s.substr(delimiter+2); string s1 = s.substr(delimiter+2);
@@ -1973,7 +1973,9 @@ MTGAbility::MTGAbility(int id, MTGCardInstance * _source,Targetable * _target ):
} }
MTGAbility::~MTGAbility(){ MTGAbility::~MTGAbility(){
SAFE_DELETE(cost); if (!isClone){
SAFE_DELETE(cost);
}
} }
int MTGAbility::addToGame(){ int MTGAbility::addToGame(){