Please update your rules folder
- "Manapool empties at the end of each step" becomes an ability, and was moved into the external rules file. "removemana(*) to remove all, removemana(*{G}) to remove all green, removemana(*{G}{B}{R}) to remove all green black red, removemana({G}{G}{B}{U}) (no "*") to remove a specific value.
- Added a possibility to make abilities non interruptible. With little work, this could be added to the parser if needed. Please use with care, let's discuss what is an acceptable usage of this now functionality, if needed.
This commit is contained in:
@@ -255,6 +255,8 @@ void Rules::addExtraRules()
|
||||
|
||||
if (a)
|
||||
{
|
||||
//We make those non interruptible, so that they don't appear on the player's stack
|
||||
a->canBeInterrupted = false;
|
||||
if (a->oneShot)
|
||||
{
|
||||
if (((p->isAI() && p->playMode
|
||||
@@ -463,7 +465,6 @@ void Rules::initGame()
|
||||
p->poisonCount = initState.playerData[i].poisonCount;
|
||||
p->damageCount = initState.playerData[i].damageCount;
|
||||
p->preventable = initState.playerData[i].preventable;
|
||||
p->getManaPool()->copy(initState.playerData[i].manapool);
|
||||
if (initState.playerData[i].avatar.size())
|
||||
{
|
||||
p->loadAvatar(initState.playerData[i].avatar);
|
||||
@@ -504,9 +505,23 @@ void Rules::initGame()
|
||||
}
|
||||
}
|
||||
addExtraRules();
|
||||
|
||||
postUpdateInitDone = false;
|
||||
DebugTrace("RULES Init Game Done !\n");
|
||||
}
|
||||
|
||||
//This function has all iitialization that can't be done in the "real" init function,
|
||||
// because the first update call messes things up.
|
||||
//It's a hack, ideally, the first update call shouldn't mess the init parameters...
|
||||
void Rules::postUpdateInit()
|
||||
{
|
||||
if (postUpdateInitDone)
|
||||
return;
|
||||
for (int i = 0; i < 2; ++ i)
|
||||
GameObserver::GetInstance()->players[i]->getManaPool()->copy(initState.playerData[i].manapool);
|
||||
postUpdateInitDone = true;
|
||||
}
|
||||
|
||||
void RulesPlayerZone::cleanup()
|
||||
{
|
||||
cards.clear();
|
||||
@@ -546,6 +561,7 @@ Rules::Rules(string _bg)
|
||||
unlockOption = INVALID_OPTION;
|
||||
hidden = false;
|
||||
filename = "";
|
||||
postUpdateInitDone = false;
|
||||
}
|
||||
|
||||
bool Rules::canChooseDeck()
|
||||
|
||||
Reference in New Issue
Block a user