mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Clean up
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user