This commit is contained in:
TRT
2023-01-27 13:48:19 +01:00
parent 639c20123c
commit 4162ec4ceb
3 changed files with 4 additions and 19 deletions

View File

@@ -738,11 +738,7 @@ public class DamageDealAi extends DamageAiBase {
dump = true;
}
final int assignedDamage = dump ? dmg : ComputerUtilCombat.getEnoughDamageToKill(c, dmg, source, false, noPrevention);
if (assignedDamage <= dmg) {
sa.addDividedAllocation(c, assignedDamage);
} else {
sa.addDividedAllocation(c, dmg);
}
sa.addDividedAllocation(c, Math.min(assignedDamage, dmg));
dmg = dmg - assignedDamage;
if (dmg <= 0) {
break;
@@ -752,10 +748,12 @@ public class DamageDealAi extends DamageAiBase {
}
} else if ("OppAtTenLife".equals(logic)) {
for (final Player p : ai.getOpponents()) {
if (sa.canTarget(p) && p.getLife() == 10 && tcs.size() < tgt.getMaxTargets(source, sa)) {
if (sa.canTarget(p) && p.getLife() == 10) {
tcs.add(p);
return true;
}
}
return false;
}
// TODO: Improve Damage, we shouldn't just target the player just because we can
if (sa.canTarget(enemy) && tcs.size() < tgt.getMaxTargets(source, sa)) {

View File

@@ -1961,17 +1961,6 @@ public class AbilityUtils {
} // end ctb != null
if (sq[0].contains("OppsAtLifeTotal")) {
final int lifeTotal = calculateAmount(c, sq[1], ctb);
int number = 0;
for (final Player opp : player.getOpponents()) {
if (opp.getLife() == lifeTotal) {
number++;
}
}
return doXMath(number, expr, c, ctb);
}
//Count$SearchedLibrary.<DefinedPlayer>
if (sq[0].contains("SearchedLibrary")) {
int sum = 0;

View File

@@ -3,6 +3,4 @@ ManaCost:3 R
Types:Instant
A:SP$ DealDamage | Cost$ 3 R | ValidTgts$ Player | TgtPrompt$ Select target player | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ10 | NumDmg$ 10 | AILogic$ OppAtTenLife | SpellDescription$ If target player has exactly 10 life, CARDNAME deals 10 damage to that player.
SVar:X:TargetedPlayer$LifeTotal
SVar:Y:Count$OppsAtLifeTotal.10
SVar:NeedsToPlayVar:Y GE1
Oracle:If target player has exactly 10 life, Hidetsugu's Second Rite deals 10 damage to that player.