mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'master' into 'master'
Some CopySpellAbilityAi improvements. See merge request core-developers/forge!1148
This commit is contained in:
@@ -36,6 +36,10 @@ public class CopySpellAbilityAi extends SpellAbilityAi {
|
||||
chance = 100;
|
||||
}
|
||||
|
||||
if (top.getActivatingPlayer().isOpponentOf(aiPlayer)) {
|
||||
chance = 100; // currently the AI will always copy the opponent's spell if viable
|
||||
}
|
||||
|
||||
if (!MyRandom.percentTrue(chance)
|
||||
&& !"AlwaysIfViable".equals(logic)
|
||||
&& !"OnceIfViable".equals(logic)
|
||||
@@ -73,7 +77,7 @@ public class CopySpellAbilityAi extends SpellAbilityAi {
|
||||
|
||||
if (top.canBeTargetedBy(sa)) {
|
||||
AiPlayDecision decision = AiPlayDecision.CantPlaySa;
|
||||
if (top instanceof Spell) {
|
||||
if (top instanceof Spell && !top.hasParam("ConditionManaSpent") /* mana spent is not copied */ ) {
|
||||
decision = ((PlayerControllerAi) aiPlayer.getController()).getAi().canPlayFromEffectAI((Spell) topCopy, true, true);
|
||||
} else if (top instanceof AbilityActivated && top.getActivatingPlayer().equals(aiPlayer)
|
||||
&& logic.contains("CopyActivatedAbilities")) {
|
||||
|
||||
Reference in New Issue
Block a user