mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'fix+gonti' into 'master'
Fixing Mana types being inappropriately referenced in relation to Matrices See merge request core-developers/forge!883
This commit is contained in:
@@ -913,6 +913,10 @@ public class ComputerUtilMana {
|
||||
// Make mana needed to avoid negative effect a mandatory cost for the AI
|
||||
for (String manaPart : card.getSVar("ManaNeededToAvoidNegativeEffect").split(",")) {
|
||||
// convert long color strings to short color strings
|
||||
if (manaPart.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
byte mask = ManaAtom.fromName(manaPart);
|
||||
|
||||
// make mana mandatory for AI
|
||||
|
||||
@@ -26,6 +26,7 @@ import forge.game.card.CardPredicates.Presets;
|
||||
import forge.game.combat.Combat;
|
||||
import forge.game.cost.*;
|
||||
import forge.game.mana.Mana;
|
||||
import forge.game.mana.ManaConversionMatrix;
|
||||
import forge.game.mana.ManaCostBeingPaid;
|
||||
import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
@@ -921,7 +922,7 @@ public class PlayerControllerAi extends PlayerController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean payManaCost(ManaCost toPay, CostPartMana costPartMana, SpellAbility sa, String prompt /* ai needs hints as well */, boolean isActivatedSa) {
|
||||
public boolean payManaCost(ManaCost toPay, CostPartMana costPartMana, SpellAbility sa, String prompt /* ai needs hints as well */, ManaConversionMatrix matrix, boolean isActivatedSa) {
|
||||
// TODO Auto-generated method stub
|
||||
ManaCostBeingPaid cost = isActivatedSa ? ComputerUtilMana.calculateManaCost(sa, false, 0) : new ManaCostBeingPaid(toPay);
|
||||
return ComputerUtilMana.payManaCost(cost, sa, player);
|
||||
|
||||
Reference in New Issue
Block a user