This commit is contained in:
Alessandro Coli
2019-03-09 13:34:44 +01:00
4 changed files with 25 additions and 7 deletions

View File

@@ -1455,7 +1455,7 @@ public class ComputerUtilCombat {
continue;
}
if (ability.hasParam("Adapt") && blocker != null && blocker.getCounters(CounterType.P1P1) > 0) {
if (ability.hasParam("Adapt") && attacker.getCounters(CounterType.P1P1) > 0) {
continue;
}
@@ -1692,7 +1692,7 @@ public class ComputerUtilCombat {
continue;
}
if (ability.hasParam("Adapt") && blocker.getCounters(CounterType.P1P1) > 0) {
if (ability.hasParam("Adapt") && attacker.getCounters(CounterType.P1P1) > 0) {
continue;
}

View File

@@ -423,7 +423,7 @@ public class GameAction {
// Need to apply any static effects to produce correct triggers
checkStaticAbilities();
game.getTriggerHandler().clearInstrinsicActiveTriggers(c, zoneFrom);
game.getTriggerHandler().registerActiveTrigger(c, false);
game.getTriggerHandler().registerActiveTrigger(lastKnownInfo, false);
// do ETB counters after StaticAbilities check
if (!suppress) {

View File

@@ -1,6 +1,7 @@
package forge.game.ability.effects;
import forge.game.GameAction;
import forge.game.GameLogEntryType;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
@@ -59,9 +60,7 @@ public class ClashEffect extends SpellAbilityEffect {
* <p>
* clashWithOpponent.
* </p>
*
* @param source
* a {@link forge.game.card.Card} object.
*
* @return a boolean.
*/
private static boolean clashWithOpponent(final SpellAbility sa) {
@@ -126,11 +125,14 @@ public class ClashEffect extends SpellAbilityEffect {
private static void clashMoveToTopOrBottom(final Player p, final Card c, final SpellAbility sa) {
final GameAction action = p.getGame().getAction();
final boolean putOnTop = p.getController().willPutCardOnTop(c);
final String location = putOnTop ? "top" : "bottom";
final String clashOutcome = p.getName() + " clashed and put " + c.getName() + " to the " + location + " of library.";
if (putOnTop) {
action.moveToLibrary(c, sa);
} else {
action.moveToBottomOfLibrary(c, sa);
}
// computer just puts the card back until such time it can make a smarter decision
p.getGame().getGameLog().add(GameLogEntryType.STACK_RESOLVE, clashOutcome);
}
}

View File

@@ -0,0 +1,16 @@
[metadata]
Name:Possibility Storm - Ravnica Allegiance #06
URL:http://www.possibilitystorm.com/wp-content/uploads/2019/02/103.-RNA6.jpg
Goal:Win
Turns:1
Difficulty:Uncommon
Description:Win this turn. Your solution must satisfy all possible blocking scenarios.
[state]
humanlife=20
ailife=8
turn=1
activeplayer=human
activephase=MAIN1
humanhand=Skirk Prospector;Metamorphic Alteration;Luminous Bonds;Electrodominance
humanbattlefield=Fresh-Faced Recruit;Juggernaut;Ledev Champion;Biomancer's Familiar;Gateway Plaza;Gateway Plaza;Gateway Plaza;Temple Garden|NoETBTrigs;Temple Garden|NoETBTrigs;Temple Garden|NoETBTrigs;Temple Garden|NoETBTrigs
aibattlefield=Queen's Agent|Counters:P1P1=1;Azorius Knight-Arbiter;Queen's Agent|Counters:P1P1=1