mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- RemAIDeck update: next iteration ("when CARDNAME enters the battlefield, return a creature you control to its owner's hand").
This commit is contained in:
@@ -700,6 +700,8 @@ public class ComputerUtil {
|
||||
return sacrificed; // sacrifice none
|
||||
}
|
||||
}
|
||||
boolean exceptSelf = "ExceptSelf".equals(source.getParam("AILogic"));
|
||||
boolean removedSelf = false;
|
||||
|
||||
if (isOptional && source.hasParam("Devour") || source.hasParam("Exploit") || considerSacLogic) {
|
||||
if (source.hasParam("Exploit")) {
|
||||
@@ -757,11 +759,22 @@ public class ComputerUtil {
|
||||
|
||||
final int max = Math.min(remaining.size(), amount);
|
||||
|
||||
if (exceptSelf) {
|
||||
removedSelf = remaining.remove(source.getHostCard());
|
||||
}
|
||||
|
||||
for (int i = 0; i < max; i++) {
|
||||
Card c = chooseCardToSacrifice(remaining, ai, destroy);
|
||||
remaining.remove(c);
|
||||
sacrificed.add(c);
|
||||
if (c != null) {
|
||||
sacrificed.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
if (sacrificed.isEmpty() && removedSelf) {
|
||||
sacrificed.add(source.getHostCard());
|
||||
}
|
||||
|
||||
return sacrificed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1381,7 +1381,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
String logic = sa.getParam("AILogic");
|
||||
if ("NeverBounceItself".equals(logic)) {
|
||||
Card source = sa.getHostCard();
|
||||
if (fetchList.contains(source)) {
|
||||
if (fetchList.contains(source) && fetchList.size() > 1) {
|
||||
// For cards that should never be bounced back to hand with their own [e.g. triggered] abilities, such as guild lands.
|
||||
fetchList.remove(source);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user