From a46596672b09ca4188ac4a103baed46a0225ddd9 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 12 Dec 2010 17:02:41 +0000 Subject: [PATCH] bug fix for something reported in the forums, becomes( and transforms( were not correctly giving creatures abilities...this is just because of a small overlooked issue, the string would read "flying)" instead of "flying" and was there for rejected by mikes new abilities hash. same with transforms( it would read ",flying" and reject it...just had to correct the "ends" and "begins" of those strings...mike you told me you tested this change when we got into it...shame on you! --- projects/mtg/src/MTGAbility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 9d9e8da2d..6b1d925ad 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1665,7 +1665,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } if (pt && end != real_end) { - sabilities = s.substr(end + 1, real_end - end); + sabilities = s.substr(end + 1, real_end - end - 1); } MTGAbility * ab; if (forceUEOT) @@ -1721,7 +1721,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG vector effectParameters = split( transformsParamsString, ','); string stypes = effectParameters[0]; - string sabilities = transformsParamsString.substr(stypes.length()); + string sabilities = transformsParamsString.substr(stypes.length() + 1); MTGAbility * a; if (forceFOREVER)