mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Tweaking a method name.
This commit is contained in:
@@ -190,7 +190,10 @@ public class ComputerUtilAbility {
|
||||
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);
|
||||
if (!MyRandom.percentTrue(chance)) {
|
||||
return null;
|
||||
|
||||
@@ -197,7 +197,7 @@ public class DamageDealAi extends DamageAiBase {
|
||||
}
|
||||
|
||||
// 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
|
||||
if (!ComputerUtilCost.checkLifeCost(ai, abCost, source, 4, sa)) {
|
||||
|
||||
Reference in New Issue
Block a user