xkos / wagic

Automatically exported from code.google.com/p/wagic
0 stars 0 forks source link

Investigate Paradise Plume card definition #602

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It seems that Paradise Plume may not be 100% compatible with Wagic.  Before 
r3207, the current card definition for Paradise Plume would cause a crash in 
the game shop as well as the deck editor when filtering by mana ability.  
However, an alternative definition for Paradise Plume is compatible I'm not 
sure if it is correct.  This needs to be investigated by those who know the 
card coding a little better than I to verify.

Please review issue 601 for a detailed discussion of the issue.

Original issue reported on code.google.com by techdragon.nguyen@gmail.com on 1 Mar 2011 at 1:03

Attachments:

GoogleCodeExporter commented 8 years ago
this is a symptom of another issue, card def should have absolutely no effect 
on the filters...

Original comment by omegabla...@gmail.com on 1 Mar 2011 at 11:49

GoogleCodeExporter commented 8 years ago
//WCFilterProducesColor
bool WCFilterProducesColor::isMatch(MTGCard * c)
{
    bool bMatch = false;
    if (!c || !c->data) return false;
    string s = c->data->magicText;
    size_t t = s.find("add");
    while (t != string::npos)
    {
        s = s.substr(t + 3);
        ManaCost * mc = ManaCost::parseManaCost(s);
        if (mc->hasColor(color) > 0)
        {
            bMatch = true;
            SAFE_DELETE(mc);
            break;
        }
        SAFE_DELETE(mc);
        t = s.find("add");
    }
    return bMatch;
}

refer to this in the svn and start there...this is how filters find mana 
producers...

Original comment by omegabla...@gmail.com on 1 Mar 2011 at 11:51

GoogleCodeExporter commented 8 years ago
closing, this is not a probelm with the card code...the card is indeed coded 
using the rules we set in wagic...the issue stems from probelms with filters 
class.

Original comment by omegabla...@gmail.com on 2 Mar 2011 at 2:38