- Tweaking a method name.

This commit is contained in:
Agetian
2018-12-11 15:12:41 +03:00
parent 96f941aeae
commit 0c5e5288b8
2 changed files with 5 additions and 2 deletions

View File

@@ -190,7 +190,10 @@ public class ComputerUtilAbility {
return targeted; return targeted;
} }
public static Pair<SpellAbility, Integer> getDamageAfterChainingSpells(Player ai, SpellAbility sa, String damage) { // Returns a pair of a SpellAbility (APIType DealDamage or Pump) and damage/debuff amount
// The returned spell ability can be chained to "sa" to deal more damage (enough mana is available to cast both
// and can be properly reserved).
public static Pair<SpellAbility, Integer> getDamagingSAToChain(Player ai, SpellAbility sa, String damage) {
int chance = ((PlayerControllerAi)ai.getController()).getAi().getIntProperty(AiProps.CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS); int chance = ((PlayerControllerAi)ai.getController()).getAi().getIntProperty(AiProps.CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS);
if (!MyRandom.percentTrue(chance)) { if (!MyRandom.percentTrue(chance)) {
return null; return null;

View File

@@ -197,7 +197,7 @@ public class DamageDealAi extends DamageAiBase {
} }
// Try to chain damage/debuff effects // Try to chain damage/debuff effects
Pair<SpellAbility, Integer> chainDmg = ComputerUtilAbility.getDamageAfterChainingSpells(ai, sa, damage); Pair<SpellAbility, Integer> chainDmg = ComputerUtilAbility.getDamagingSAToChain(ai, sa, damage);
// temporarily disabled until better AI // temporarily disabled until better AI
if (!ComputerUtilCost.checkLifeCost(ai, abCost, source, 4, sa)) { if (!ComputerUtilCost.checkLifeCost(ai, abCost, source, 4, sa)) {