mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
YDMU: Priest of Possibility and support (#1638)
* EffectEffect tidy up * priest_of_possibility.txt + "ShareKeywords" * remember keywords as strings instead of giving Effect keywords * EffectEffect clean up imports
This commit is contained in:
@@ -221,8 +221,8 @@ public class StaticEffect {
|
||||
|
||||
// remove keywords
|
||||
// (Although nothing uses it at this time)
|
||||
if (hasParam("AddKeyword") || hasParam("RemoveKeyword")
|
||||
|| hasParam("RemoveAllAbilities") || hasParam("RemoveLandTypes")) {
|
||||
if (hasParam("AddKeyword") || hasParam("RemoveKeyword") || hasParam("RemoveLandTypes")
|
||||
|| hasParam("ShareRememberedKeywords") || hasParam("RemoveAllAbilities")) {
|
||||
affectedCard.removeChangedCardKeywords(getTimestamp(), ability.getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package forge.game.ability.effects;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -16,11 +17,8 @@ import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
import forge.game.card.*;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollection;
|
||||
import forge.game.card.CardLists;
|
||||
import forge.game.card.CardPredicates;
|
||||
import forge.game.card.CounterType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.replacement.ReplacementEffect;
|
||||
import forge.game.replacement.ReplacementHandler;
|
||||
@@ -50,14 +48,12 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
|
||||
String[] effectAbilities = null;
|
||||
String[] effectTriggers = null;
|
||||
String[] effectKeywords = null;
|
||||
String[] effectStaticAbilities = null;
|
||||
String[] effectReplacementEffects = null;
|
||||
FCollection<GameObject> rememberList = null;
|
||||
String effectImprinted = null;
|
||||
String noteCounterDefined = null;
|
||||
List<Player> effectOwner = null;
|
||||
boolean imprintOnHost = false;
|
||||
final String duration = sa.getParam("Duration");
|
||||
|
||||
if (((duration != null && duration.startsWith("UntilHostLeavesPlay")) || "UntilLoseControlOfHost".equals(duration))
|
||||
@@ -84,10 +80,6 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
effectReplacementEffects = sa.getParam("ReplacementEffects").split(",");
|
||||
}
|
||||
|
||||
if (sa.hasParam("Keywords")) {
|
||||
effectKeywords = sa.getParam("Keywords").split(",");
|
||||
}
|
||||
|
||||
if (sa.hasParam("RememberSpell")) {
|
||||
rememberList = new FCollection<>();
|
||||
for (final String rem : sa.getParam("RememberSpell").split(",")) {
|
||||
@@ -136,10 +128,6 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
effectOwner = Lists.newArrayList(sa.getActivatingPlayer());
|
||||
}
|
||||
|
||||
if (sa.hasParam("ImprintOnHost")) {
|
||||
imprintOnHost = true;
|
||||
}
|
||||
|
||||
String image;
|
||||
if (sa.hasParam("Image")) {
|
||||
image = ImageKeys.getTokenKey(sa.getParam("Image"));
|
||||
@@ -210,11 +198,20 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
// Grant Keywords
|
||||
// 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"));
|
||||
String[] restrictions = sa.hasParam("SharedRestrictions") ? sa.getParam("SharedRestrictions").split(",")
|
||||
: new String[]{"Card"};
|
||||
effectKeywords = CardFactoryUtil.sharedKeywords(effectKeywords, restrictions, zones, hostCard, sa);
|
||||
}
|
||||
if (effectKeywords != null) {
|
||||
for (final String s : effectKeywords) {
|
||||
final String actualKeyword = hostCard.getSVar(s);
|
||||
eff.addIntrinsicKeyword(actualKeyword);
|
||||
eff.addRemembered(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +346,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (imprintOnHost) {
|
||||
if (sa.hasParam("ImprintOnHost")) {
|
||||
hostCard.addImprintedCard(eff);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
|
||||
|| hasParam("AddTrigger") || hasParam("RemoveTriggers")
|
||||
|| hasParam("RemoveKeyword") || hasParam("AddReplacementEffects")
|
||||
|| hasParam("AddStaticAbility") || hasParam("AddSVar")
|
||||
|| hasParam("CantHaveKeyword")) {
|
||||
|| hasParam("CantHaveKeyword") || hasParam("ShareRememberedKeywords")) {
|
||||
layers.add(StaticAbilityLayer.ABILITIES);
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,15 @@ public final class StaticAbilityContinuous {
|
||||
String[] restrictions = params.containsKey("SharedRestrictions") ? params.get("SharedRestrictions").split(",") : new String[] {"Card"};
|
||||
addKeywords = CardFactoryUtil.sharedKeywords(addKeywords, restrictions, zones, hostCard, stAb);
|
||||
}
|
||||
} else if (params.containsKey("ShareRememberedKeywords")) {
|
||||
List<String> kwToShare = Lists.newArrayList();
|
||||
for (final Object o : hostCard.getRemembered()) {
|
||||
final String k = (String) o;
|
||||
kwToShare.add(k);
|
||||
}
|
||||
if (!kwToShare.isEmpty()) {
|
||||
addKeywords = kwToShare;
|
||||
}
|
||||
}
|
||||
|
||||
if (params.containsKey("CantHaveKeyword")) {
|
||||
|
||||
12
forge-gui/res/cardsfolder/upcoming/priest_of_possibility.txt
Normal file
12
forge-gui/res/cardsfolder/upcoming/priest_of_possibility.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Priest of Possibility
|
||||
ManaCost:1 W
|
||||
Types:Creature Kor Cleric
|
||||
PT:2/2
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLook | TriggerDescription$ When CARDNAME enters the battlefield, look at the top seven cards of your library. If a card among them has flying, CARDNAME perpetually gains flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance. Then shuffle.
|
||||
SVar:TrigLook:DB$ PeekAndReveal | PeekAmount$ 7 | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBEffect
|
||||
SVar:DBEffect:DB$ Effect | StaticAbilities$ ShareKW | RememberKeywords$ Flying,First Strike,Double Strike,Deathtouch,Haste,Hexproof,Indestructible,Lifelink,Menace,Protection,Reach,Trample,Vigilance | SharedKeywordsZone$ Library | SharedRestrictions$ Card.IsRemembered | Duration$ Permanent | Name$ Priest of Possibility's Perpetual Effect | SubAbility$ DBCleanup
|
||||
SVar:ShareKW:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield,Hand,Graveyard,Exile,Stack,Library,Command | Affected$ Card.EffectSource | ShareRememberedKeywords$ True | Description$ EFFECTSOURCE perpetually gains these keywords.
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBShuffle
|
||||
SVar:DBShuffle:DB$ Shuffle
|
||||
DeckHints:Keyword$Flying|First Strike|Double Strike|Deathtouch|Haste|Hexproof|Indestructible|Lifelink|Menace|Protection|Reach|Trample|Vigilance
|
||||
Oracle:When Priest of Possibility enters the battlefield, look at the top seven cards of your library. If a card among them has flying, Priest of Possibility perpetually gains flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance. Then shuffle.
|
||||
Reference in New Issue
Block a user