- Moved "game mode" types of awards outside of a code, and inside of a configuration file (rules/awards.dat). No code is required anymore to create such an award (momir, hermit basic, etc...)

- fixed compilation errors in GameObserver (windows)
This commit is contained in:
wagic.the.homebrew
2011-10-02 01:03:45 +00:00
parent 483c767492
commit 9e572ee416
15 changed files with 281 additions and 127 deletions
+2 -1
View File
@@ -71,7 +71,7 @@ int MTGAbility::allowedToAltCast(MTGCardInstance * card,Player * player)
return af.parseCastRestrictions(card,player,card->getOtherRestrictions());
}
int AbilityFactory::parseCastRestrictions(MTGCardInstance * card,Player * player,string restrictions)
int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * player,string restrictions)
{
vector <string> restriction = split(restrictions, ',');
AbilityFactory af(observer);
@@ -3954,6 +3954,7 @@ int Trigger::triggerOnEvent(WEvent * event) {
return 1;//can't check these restrictions without a source aka:in a rule.txt
AbilityFactory af(game);
int checkCond = af.parseCastRestrictions(source,source->controller(),castRestriction);
if(!checkCond)
return 0;
}