support LKI of cause (#3451)

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.59>
This commit is contained in:
tool4ever
2023-07-10 21:43:08 +02:00
committed by GitHub
parent b437d9764d
commit e0ac62e518
2 changed files with 10 additions and 2 deletions

View File

@@ -70,7 +70,11 @@ public class StaticAbilityDisableTriggers {
if (trigMode.equals(TriggerType.ChangesZone)) {
// Cause of the trigger the card changing zones
if (!stAb.matchesValidParam("ValidCause", runParams.get(AbilityKey.Card))) {
Card moved = (Card) runParams.get(AbilityKey.Card);
if ("Battlefield".equals(regtrig.getParam("Origin"))) {
moved = (Card) runParams.get(AbilityKey.CardLKI);
}
if (!stAb.matchesValidParam("ValidCause", moved)) {
return false;
}
if (!stAb.matchesValidParam("Destination", runParams.get(AbilityKey.Destination))) {

View File

@@ -89,7 +89,11 @@ public class StaticAbilityPanharmonicon {
if (trigMode.equals(TriggerType.ChangesZone)) {
// Cause of the trigger the card changing zones
if (!stAb.matchesValidParam("ValidCause", runParams.get(AbilityKey.Card))) {
Card moved = (Card) runParams.get(AbilityKey.Card);
if ("Battlefield".equals(trigger.getParam("Origin"))) {
moved = (Card) runParams.get(AbilityKey.CardLKI);
}
if (!stAb.matchesValidParam("ValidCause", moved)) {
return false;
}
if (!stAb.matchesValidParam("Origin", runParams.get(AbilityKey.Origin))) {