mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Merge branch 'master' into 'master'
Fix a logic error in RearrangeTopOfLibrary AI Closes #1005 See merge request core-developers/forge!1707
This commit is contained in:
@@ -26,7 +26,7 @@ public class RearrangeTopOfLibraryAi extends SpellAbilityAi {
|
|||||||
final PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
|
final PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
|
||||||
final Card source = sa.getHostCard();
|
final Card source = sa.getHostCard();
|
||||||
|
|
||||||
if (source.isPermanent() && sa.getPayCosts() != null
|
if (source.isPermanent() && sa.getRestrictions().isInstantSpeed() && sa.getPayCosts() != null
|
||||||
&& (sa.getPayCosts().hasTapCost() || sa.getPayCosts().hasManaCost())) {
|
&& (sa.getPayCosts().hasTapCost() || sa.getPayCosts().hasManaCost())) {
|
||||||
// If it has an associated cost, try to only do this before own turn
|
// If it has an associated cost, try to only do this before own turn
|
||||||
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer)) {
|
if (!(ph.is(PhaseType.END_OF_TURN) && ph.getNextTurn() == aiPlayer)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user