mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Fixed life gain happening whenever a creature with negative attack power would attack a player.
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user