Implemented Commander mode and rules, added Command Zone to game, added/fixed primitives, increased the major release version.

This commit is contained in:
valfieri
2020-12-06 20:11:51 +01:00
parent 6ef9ecc147
commit ced2c85076
33 changed files with 588 additions and 78 deletions

View File

@@ -256,6 +256,8 @@ int Damage::resolve()
else
{
((MTGCardInstance*)source)->damageToOpponent = true;
if(((MTGCardInstance*)source)->basicAbilities[Constants::ISCOMMANDER])
((MTGCardInstance*)source)->damageInflictedAsCommander += damage;
}
target->lifeLostThisTurn += damage;
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
@@ -271,6 +273,8 @@ int Damage::resolve()
}
WEvent * lifed = NEW WEventLife((Player*)target,-damage, source);
observer->receiveEvent(lifed);
if(((MTGCardInstance*)source)->damageInflictedAsCommander > 20) // if a Commander has dealt 21 or more damages to a player, he loose game.
observer->setLoser(((MTGCardInstance*)source)->controller()->opponent());
}
}