bug fixs, added colon to "damage" parsing so we can finally not worry about "damage" wanting to build a ability. it now has to look for "damage:" which makes it more consistent with how we made the other abilities. did the same with lifeset however no bug there.

2nd bug fix, 
commented out a peice of code that compared if power and toughness would be cancelled out by a new counter. exsample:
1/1 is cancelled by -1/-1...this is actually extremely incorrect, 

if you "put a 1/1 on a creature"
then you "put a -1/-1" on the same one. it does NOT remove the 1/1 as per MTG rules. the counters all all treated as NEW objects on a card. so a creature that had both those abilities used on it should have BOTH a 1/1 and a -1/-1 counter.
commenting out the section of code corrected this probelm.
modular creature, phantom creatures,sunburst and many many more will now correctly be able to use their counters even if they recieved "cancelling" Counters

last was just an improvement, as i got overly frustraited tonight while fighting with a deck that slaps many different types of counters on cards, i was having a very hard time telling what exactly i was about to put on a creature.

so what i did to correct this is create a much better menuText return on aacounter class.

PLEASE let me know if i missed a case where a counter is not showing correct text.
This commit is contained in:
omegablast2002@yahoo.com
2010-12-04 12:32:33 +00:00
parent 55de150aac
commit 142d6b4609
3 changed files with 32 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ Counters::~Counters()
int Counters::addCounter(const char * _name, int _power, int _toughness)
{
for (int i = 0; i < mCount; i++)
/* for (int i = 0; i < mCount; i++)
{
if (counters[i]->cancels(_power, _toughness) && counters[i]->nb > 0)
{
@@ -80,7 +80,15 @@ int Counters::addCounter(const char * _name, int _power, int _toughness)
counters[i]->nb--;
return mCount;
}
}
}*/
//leaving this commented out incase it was placed here to avoid some bug(maybe a misunderstanding of how counters work in MTG)
//bug fix, creatures that have abilities based on +1/+1 counters should still be allowed to use their counter
//putting a -1/-1 counter is not the same thing as removing a 1/1 counter.
//consider this effect, put a 1/1 counter on creature, then put a - 1/-1 counter on creature. it never saids
//remove the counter 1/1, it saids put a NEW counter -1/-1.
//the card should have both a 1/1 and a -1/-1 counter at this point.
//if an effect states that it should take off the counters, then it should be done with the following code
//counter(1/1,-1) this is removel of 1/1 counters. judging by the primitives its fully understood as i see this method being used often.
for (int i = 0; i < mCount; i++)
{