mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Update AiController.java (#5863)
* Update AiController.java Add RepParams for AddCounter * Update check with new required params --------- Co-authored-by: TRT <>
This commit is contained in:
@@ -529,6 +529,12 @@ public class AiController {
|
|||||||
repParams.put(AbilityKey.Destination, ZoneType.Battlefield);
|
repParams.put(AbilityKey.Destination, ZoneType.Battlefield);
|
||||||
repParams.put(AbilityKey.Source, land);
|
repParams.put(AbilityKey.Source, land);
|
||||||
|
|
||||||
|
// add Params for AddCounter Replacements
|
||||||
|
GameEntityCounterTable table = new GameEntityCounterTable();
|
||||||
|
repParams.put(AbilityKey.EffectOnly, true);
|
||||||
|
repParams.put(AbilityKey.CounterTable, table);
|
||||||
|
repParams.put(AbilityKey.CounterMap, table.column(land));
|
||||||
|
|
||||||
boolean foundTapped = false;
|
boolean foundTapped = false;
|
||||||
for (ReplacementEffect re : player.getGame().getReplacementHandler().getReplacementList(ReplacementType.Moved, repParams, ReplacementLayer.Other)) {
|
for (ReplacementEffect re : player.getGame().getReplacementHandler().getReplacementList(ReplacementType.Moved, repParams, ReplacementLayer.Other)) {
|
||||||
SpellAbility reSA = re.ensureAbility();
|
SpellAbility reSA = re.ensureAbility();
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import forge.game.CardTraitPredicates;
|
|||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameActionUtil;
|
import forge.game.GameActionUtil;
|
||||||
import forge.game.GameEntity;
|
import forge.game.GameEntity;
|
||||||
|
import forge.game.GameEntityCounterTable;
|
||||||
import forge.game.GameObject;
|
import forge.game.GameObject;
|
||||||
import forge.game.GameType;
|
import forge.game.GameType;
|
||||||
import forge.game.ability.AbilityKey;
|
import forge.game.ability.AbilityKey;
|
||||||
@@ -3307,6 +3308,11 @@ public class ComputerUtil {
|
|||||||
repParams.put(AbilityKey.CardLKI, c);
|
repParams.put(AbilityKey.CardLKI, c);
|
||||||
repParams.put(AbilityKey.Origin, c.getLastKnownZone().getZoneType());
|
repParams.put(AbilityKey.Origin, c.getLastKnownZone().getZoneType());
|
||||||
repParams.put(AbilityKey.Destination, ZoneType.Battlefield);
|
repParams.put(AbilityKey.Destination, ZoneType.Battlefield);
|
||||||
|
// add Params for AddCounter Replacements
|
||||||
|
GameEntityCounterTable table = new GameEntityCounterTable();
|
||||||
|
repParams.put(AbilityKey.EffectOnly, true);
|
||||||
|
repParams.put(AbilityKey.CounterTable, table);
|
||||||
|
repParams.put(AbilityKey.CounterMap, table.column(c));
|
||||||
List<ReplacementEffect> list = c.getGame().getReplacementHandler().getReplacementList(ReplacementType.Moved, repParams, ReplacementLayer.CantHappen);
|
List<ReplacementEffect> list = c.getGame().getReplacementHandler().getReplacementList(ReplacementType.Moved, repParams, ReplacementLayer.CantHappen);
|
||||||
return !list.isEmpty();
|
return !list.isEmpty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user