mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Properly consider Trample damage for non-pumped blocked creatures in the previously committed routine.
This commit is contained in:
@@ -1202,9 +1202,15 @@ public class ComputerUtilCard {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (atk == c) {
|
if (atk == c) {
|
||||||
totalPowerUnblocked += pumpedDmg;
|
totalPowerUnblocked += pumpedDmg; // this accounts for Trample by now
|
||||||
} else {
|
} else {
|
||||||
totalPowerUnblocked += ComputerUtilCombat.damageIfUnblocked(atk, opp, combat, true);
|
totalPowerUnblocked += ComputerUtilCombat.damageIfUnblocked(atk, opp, combat, true);
|
||||||
|
if (combat.isBlocked(atk)) {
|
||||||
|
// consider Trample damage properly for a blocked creature
|
||||||
|
for (Card blk : combat.getBlockers(atk)) {
|
||||||
|
totalPowerUnblocked -= ComputerUtilCombat.getDamageToKill(blk);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (totalPowerUnblocked >= opp.getLife()){
|
if (totalPowerUnblocked >= opp.getLife()){
|
||||||
|
|||||||
Reference in New Issue
Block a user