add nonCombatDamage count
This commit is contained in:
@@ -11382,7 +11382,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Bloodcrazed Goblin
|
||||
auto=this(opponentdamagecount <1) cantattack
|
||||
auto=this(variable{odnoncount}<1) cantattack
|
||||
text=Bloodcrazed Goblin can't attack unless an opponent was dealt noncombat damage this turn.
|
||||
mana={R}
|
||||
type=Creature
|
||||
|
||||
@@ -690,6 +690,14 @@ private:
|
||||
{
|
||||
intValue = target->controller()->opponent()->damageCount;
|
||||
}
|
||||
else if (s == "pdnoncount")
|
||||
{
|
||||
intValue = target->controller()->nonCombatDamage;
|
||||
}
|
||||
else if (s == "odnoncount")
|
||||
{
|
||||
intValue = target->controller()->opponent()->nonCombatDamage;
|
||||
}
|
||||
else if (s == "playerpoisoncount")
|
||||
{
|
||||
intValue = target->controller()->poisonCount;
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
int handsize;
|
||||
int poisonCount;
|
||||
int damageCount;
|
||||
int nonCombatDamage;
|
||||
int preventable;
|
||||
int thatmuch;
|
||||
int lifeLostThisTurn;
|
||||
|
||||
@@ -184,6 +184,8 @@ int Damage::resolve()
|
||||
if(!_target->inPlay()->hasAbility(Constants::POISONSHROUD))
|
||||
_target->poisonCount += damage;//this will be changed to poison counters.
|
||||
_target->damageCount += damage;
|
||||
if(typeOfDamage == 2)
|
||||
target->nonCombatDamage += damage;
|
||||
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
|
||||
{
|
||||
vector<string> values = MTGAllCards::getCreatureValuesById();
|
||||
@@ -202,6 +204,8 @@ int Damage::resolve()
|
||||
if(!_target->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
a = target->dealDamage(damage);
|
||||
target->damageCount += damage;
|
||||
if(typeOfDamage == 2)
|
||||
target->nonCombatDamage += damage;
|
||||
if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes.
|
||||
{
|
||||
vector<string> values = MTGAllCards::getCreatureValuesById();
|
||||
@@ -237,6 +241,8 @@ int Damage::resolve()
|
||||
else
|
||||
a = target->dealDamage(damage);
|
||||
target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount
|
||||
if(typeOfDamage == 2)
|
||||
target->nonCombatDamage += damage;
|
||||
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE){
|
||||
((MTGCardInstance*)target)->wasDealtDamage = true;
|
||||
((MTGCardInstance*)source)->damageToCreature = true;
|
||||
|
||||
@@ -211,11 +211,13 @@ void GameObserver::nextGamePhase()
|
||||
{
|
||||
cleanupPhase();
|
||||
currentPlayer->damageCount = 0;
|
||||
currentPlayer->nonCombatDamage = 0;
|
||||
currentPlayer->drawCounter = 0;
|
||||
currentPlayer->raidcount = 0;
|
||||
currentPlayer->opponent()->raidcount = 0;
|
||||
currentPlayer->prowledTypes.clear();
|
||||
currentPlayer->opponent()->damageCount = 0; //added to clear odcount
|
||||
currentPlayer->opponent()->nonCombatDamage = 0;
|
||||
currentPlayer->preventable = 0;
|
||||
mLayers->actionLayer()->cleanGarbage(); //clean abilities history for this turn;
|
||||
mLayers->stackLayer()->garbageCollect(); //clean stack history for this turn;
|
||||
|
||||
@@ -26,6 +26,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck *
|
||||
nomaxhandsize = false;
|
||||
poisonCount = 0;
|
||||
damageCount = 0;
|
||||
nonCombatDamage = 0;
|
||||
preventable = 0;
|
||||
mAvatarTex = NULL;
|
||||
type_as_damageable = DAMAGEABLE_PLAYER;
|
||||
|
||||
Reference in New Issue
Block a user