mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Fix the AI killing itself with Mystic Forge.
- The AI shouldn't miss the NameCard trigger. However, there's no meaningful AI logic yet, so the AI will just name a random thing for now.
This commit is contained in:
@@ -54,7 +54,7 @@ public class ChooseCardNameAi extends SpellAbilityAi {
|
|||||||
@Override
|
@Override
|
||||||
protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) {
|
protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) {
|
||||||
// TODO - there is no AILogic implemented yet
|
// TODO - there is no AILogic implemented yet
|
||||||
return false;
|
return mandatory;
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.card.ability.SpellAbilityAi#chooseSingleCard(forge.card.spellability.SpellAbility, java.util.List, boolean)
|
* @see forge.card.ability.SpellAbilityAi#chooseSingleCard(forge.card.spellability.SpellAbility, java.util.List, boolean)
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ public class DigAi extends SpellAbilityAi {
|
|||||||
final Card host = sa.getHostCard();
|
final Card host = sa.getHostCard();
|
||||||
Player libraryOwner = ai;
|
Player libraryOwner = ai;
|
||||||
|
|
||||||
|
if (!willPayCosts(ai, sa, sa.getPayCosts(), host)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (sa.usesTargeting()) {
|
if (sa.usesTargeting()) {
|
||||||
sa.resetTargets();
|
sa.resetTargets();
|
||||||
if (!opp.canBeTargetedBy(sa)) {
|
if (!opp.canBeTargetedBy(sa)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user