- Fixed life gain happening whenever a creature with negative attack power would attack a player.

This commit is contained in:
jendave
2011-08-06 03:50:50 +00:00
parent f747302cd3
commit 2a21f40853

View File

@@ -96,12 +96,14 @@ public class Combat
if (CombatUtil.isDoranInPlay()) if (CombatUtil.isDoranInPlay())
damageDealt = att.get(i).getNetDefense(); damageDealt = att.get(i).getNetDefense();
if (damageDealt > 0) {
//if the creature has first strike do not do damage in the normal combat phase //if the creature has first strike do not do damage in the normal combat phase
//if(att.get(i).hasSecondStrike()) //if(att.get(i).hasSecondStrike())
if(!att.get(i).hasFirstStrike() || (att.get(i).hasFirstStrike() && att.get(i).hasDoubleStrike()) ) if(!att.get(i).hasFirstStrike() || (att.get(i).hasFirstStrike() && att.get(i).hasDoubleStrike()) )
addDefendingDamage(damageDealt, att.get(i)); addDefendingDamage(damageDealt, att.get(i));
} }
} } //! isBlocked...
}//for
} }
public void setDefendingFirstStrikeDamage() public void setDefendingFirstStrikeDamage()
{ {
@@ -114,13 +116,14 @@ public class Combat
if (CombatUtil.isDoranInPlay()) if (CombatUtil.isDoranInPlay())
damageDealt = att.get(i).getNetDefense(); damageDealt = att.get(i).getNetDefense();
if (damageDealt > 0) {
//if the creature has first strike or double strike do damage in the first strike combat phase //if the creature has first strike or double strike do damage in the first strike combat phase
if(att.get(i).hasFirstStrike() || att.get(i).hasDoubleStrike()){ if(att.get(i).hasFirstStrike() || att.get(i).hasDoubleStrike()){
addDefendingFirstStrikeDamage(damageDealt, att.get(i)); addDefendingFirstStrikeDamage(damageDealt, att.get(i));
} }
} }
} }
} //for
} }
public void addDefendingDamage(int n, Card source) public void addDefendingDamage(int n, Card source)
{ {