mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
Fix AI not targeting triggered Random Charm (#8955)
This commit is contained in:
@@ -982,6 +982,9 @@ public class AbilityUtils {
|
||||
for (final Card c : getDefinedCards(card, "Targeted", sa)) {
|
||||
players.add(c.getOwner());
|
||||
}
|
||||
for (final SpellAbility s : getDefinedSpellAbilities(card, "Targeted", sa)) {
|
||||
players.add(s.getHostCard().getOwner());
|
||||
}
|
||||
} else if (defined.equals("TargetedAndYou") && sa instanceof SpellAbility) {
|
||||
final SpellAbility saTargeting = ((SpellAbility)sa).getSATargetingPlayer();
|
||||
if (saTargeting != null) {
|
||||
@@ -1118,10 +1121,8 @@ public class AbilityUtils {
|
||||
final String replacingType = defined.substring(8);
|
||||
o = root.getReplacingObject(AbilityKey.fromString(replacingType));
|
||||
}
|
||||
if (o != null) {
|
||||
if (o instanceof Player) {
|
||||
players.add((Player) o);
|
||||
}
|
||||
if (o instanceof Player) {
|
||||
players.add((Player) o);
|
||||
}
|
||||
} else if (defined.startsWith("Non")) {
|
||||
players.addAll(game.getPlayersInTurnOrder());
|
||||
|
||||
@@ -2496,7 +2496,7 @@ public class CardFactoryUtil {
|
||||
inst.addReplacement(re);
|
||||
} else if (keyword.equals("Read ahead")) {
|
||||
String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Secondary$ True | ReplacementResult$ Updated | Description$ Choose a chapter and start with that many lore counters.";
|
||||
String effStr = "DB$ PutCounter | Defined$ Self | CounterType$ LORE | ETB$ True | UpTo$ True | UpToMin$ 1 | ReadAhead$ True | CounterNum$ FinalChapterNr";
|
||||
String effStr = "DB$ PutCounter | Defined$ Self | CounterType$ LORE | ETB$ True | UpTo$ True | UpToMin$ 1 | CounterNum$ FinalChapterNr";
|
||||
|
||||
SpellAbility saCounter = AbilityFactory.getAbility(effStr, card);
|
||||
saCounter.setSVar("FinalChapterNr", "Count$FinalChapterNr");
|
||||
|
||||
Reference in New Issue
Block a user