mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Merge branch 'Card-Forge:master' into formats/premodern
This commit is contained in:
@@ -109,6 +109,10 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
|
||||
for (final String s : abilities) {
|
||||
SpellAbility sSA = AbilityFactory.getAbility(c, s, sa);
|
||||
addedAbilities.add(sSA);
|
||||
|
||||
if (sa.hasParam("TransferActivator")) {
|
||||
sSA.getRestrictions().setActivator("Player.PlayerUID_" + sa.getActivatingPlayer().getId());
|
||||
}
|
||||
}
|
||||
|
||||
// Grant triggers
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package forge.game.ability.effects;
|
||||
|
||||
import forge.game.GameLogEntryType;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
import forge.game.card.Card;
|
||||
@@ -57,8 +58,12 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("RememberChosen")) {
|
||||
card.addRemembered(chosen);
|
||||
}
|
||||
p.getGame().getAction().notifyOfValue(sa, p, Localizer.getInstance().getMessage("lblPlayerPickedChosen", sa.getActivatingPlayer(), chosen), null);
|
||||
|
||||
if (sa.hasParam("DontNotify")) { //ie Shared Fate
|
||||
//log the chosen player
|
||||
p.getGame().getGameLog().add(GameLogEntryType.INFORMATION, Localizer.getInstance().getMessage("lblPlayerPickedChosen", sa.getActivatingPlayer(), chosen));
|
||||
} else {
|
||||
p.getGame().getAction().notifyOfValue(sa, p, Localizer.getInstance().getMessage("lblPlayerPickedChosen", sa.getActivatingPlayer(), chosen), null);
|
||||
}
|
||||
// SubAbility that only fires if a player is chosen
|
||||
SpellAbility chosenSA = sa.getAdditionalAbility("ChooseSubAbility");
|
||||
if (chosenSA != null) {
|
||||
|
||||
@@ -106,6 +106,21 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("RememberLKI")) {
|
||||
rememberList = new FCollection<>();
|
||||
for (final String rem : sa.getParam("RememberLKI").split(",")) {
|
||||
CardCollection def = AbilityUtils.getDefinedCards(hostCard, rem, sa);
|
||||
for (Card c : def) {
|
||||
rememberList.add(CardUtil.getLKICopy(c));
|
||||
}
|
||||
}
|
||||
|
||||
// don't create Effect if there is no remembered Objects
|
||||
if (rememberList.isEmpty() && (sa.hasParam("ForgetOnMoved") || sa.hasParam("ExileOnMoved"))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("ImprintCards")) {
|
||||
effectImprinted = sa.getParam("ImprintCards");
|
||||
}
|
||||
@@ -202,7 +217,6 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
|
||||
// Remember Keywords
|
||||
if (sa.hasParam("RememberKeywords")) {
|
||||
rememberList = new FCollection<>();
|
||||
List<String> effectKeywords = Arrays.asList(sa.getParam("RememberKeywords").split(","));
|
||||
if (sa.hasParam("SharedKeywordsZone")) {
|
||||
List<ZoneType> zones = ZoneType.listValueOf(sa.getParam("SharedKeywordsZone"));
|
||||
|
||||
Reference in New Issue
Block a user