added support for doubling cube, recoded the curses to follow the rules better, with the exception of 1 which can not quite be supported

Curse of Oblivion moved back to unsupported.
added support for targeting a zone by targeting a player...
any time you have targeted a player, you can access items in thier zones by using 
targetedpersonsZONE
targetedpersonsbattlefield for example...
added "targetedplayer" as a targetchooser and who.
added "mycurses" targetchooser.
added "targetedcurses" word variable.
This commit is contained in:
omegablast2002@yahoo.com
2012-03-15 06:18:08 +00:00
parent d7cef8398f
commit a497ef49c8
9 changed files with 144 additions and 88 deletions

View File

@@ -82,11 +82,18 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
return NEW PlayerTargetChooser(observer, card, maxtargets); //Any player
}
found = s.find("mycurses");
if (found != string::npos)
{
int maxtargets = TargetChooser::UNLITMITED_TARGETS;
return NEW myCursesChooser(observer, card, maxtargets);
}
found = s.find("proliferation");
if (found != string::npos)
{
int maxtargets = TargetChooser::UNLITMITED_TARGETS;
return NEW ProliferateChooser(observer, card, maxtargets); //Any player
return NEW ProliferateChooser(observer, card, maxtargets);
}
string s1;
@@ -1472,6 +1479,34 @@ bool TriggerTargetChooser::equals(TargetChooser * tc)
return TargetChooser::equals(tc);
}
/*my curses */
bool myCursesChooser::canTarget(Targetable * target,bool withoutProtections)
{
for(unsigned int i = 0;i < source->controller()->curses.size();++i)
{
MTGCardInstance * compare = source->controller()->curses[i];
if(compare == dynamic_cast<MTGCardInstance*>(target))
return true;
}
return false;
}
myCursesChooser* myCursesChooser::clone() const
{
myCursesChooser * a = NEW myCursesChooser(*this);
return a;
}
bool myCursesChooser::equals(TargetChooser * tc)
{
myCursesChooser * dtc = dynamic_cast<myCursesChooser *> (tc);
if (!dtc)
return false;
return TypeTargetChooser::equals(tc);
}
/*Proliferate Target */
bool ProliferateChooser::canTarget(Targetable * target,bool withoutProtections)
{