Update The Book of Vile Darkness

This commit is contained in:
Lyu Zong-Hong
2021-07-18 19:14:04 +09:00
parent b29f744b45
commit c0fc97e81f
7 changed files with 16 additions and 15 deletions

View File

@@ -164,14 +164,6 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
final Trigger parsedTrigger = TriggerHandler.parseTrigger(AbilityUtils.getSVar(sa, s), c, false, sa); final Trigger parsedTrigger = TriggerHandler.parseTrigger(AbilityUtils.getSVar(sa, s), c, false, sa);
addedTriggers.add(parsedTrigger); addedTriggers.add(parsedTrigger);
} }
if (sa.hasParam("GainsTriggeredAbilitiesOf")) {
final List<Card> cards = AbilityUtils.getDefinedCards(sa.getHostCard(), sa.getParam("GainsTriggeredAbilitiesOf"), sa);
for (final Card card : cards) {
for (Trigger t : card.getTriggers()) {
addedTriggers.add(t.copy(c, false));
}
}
}
// give replacement effects // give replacement effects
final List<ReplacementEffect> addedReplacements = Lists.newArrayList(); final List<ReplacementEffect> addedReplacements = Lists.newArrayList();

View File

@@ -31,6 +31,7 @@ import forge.game.event.GameEventCardStatsChanged;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.replacement.ReplacementType; import forge.game.replacement.ReplacementType;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
import forge.game.trigger.Trigger;
import forge.game.zone.ZoneType; import forge.game.zone.ZoneType;
public abstract class TokenEffectBase extends SpellAbilityEffect { public abstract class TokenEffectBase extends SpellAbilityEffect {
@@ -118,7 +119,7 @@ public abstract class TokenEffectBase extends SpellAbilityEffect {
} }
tok.setTimestamp(timestamp); tok.setTimestamp(timestamp);
tok.setToken(true); tok.setToken(true);
// do effect stuff with the token // do effect stuff with the token
if (sa.hasParam("TokenTapped")) { if (sa.hasParam("TokenTapped")) {
tok.setTapped(true); tok.setTapped(true);
@@ -138,6 +139,15 @@ public abstract class TokenEffectBase extends SpellAbilityEffect {
tok.addEtbCounter(cType, cAmount, creator); tok.addEtbCounter(cType, cAmount, creator);
} }
if (sa.hasParam("AddTriggersFrom")) {
final List<Card> cards = AbilityUtils.getDefinedCards(host, sa.getParam("AddTriggersFrom"), sa);
for (final Card card : cards) {
for (final Trigger trig : card.getTriggers()) {
tok.addTrigger(trig.copy(tok, false));
}
}
}
if (clone) { if (clone) {
tok.setCopiedPermanent(prototype); tok.setCopiedPermanent(prototype);
} }

View File

@@ -220,7 +220,7 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
if (hasParam("Description") && !this.isSuppressed()) { if (hasParam("Description") && !this.isSuppressed()) {
String desc = AbilityUtils.applyDescriptionTextChangeEffects(getParam("Description"), this); String desc = AbilityUtils.applyDescriptionTextChangeEffects(getParam("Description"), this);
String currentName; String currentName;
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) { if (this.isIntrinsic() && cardState != null && cardState.getCard() == getHostCard()) {
currentName = cardState.getName(); currentName = cardState.getName();
} }
else { else {

View File

@@ -854,7 +854,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
if (node.getHostCard() != null) { if (node.getHostCard() != null) {
String currentName; String currentName;
// if alternate state is viewed while card uses original // if alternate state is viewed while card uses original
if (node.isIntrinsic() && !node.getHostCard().isMutated() && node.cardState != null) { if (node.isIntrinsic() && node.cardState != null && node.cardState.getCard() == node.getHostCard()) {
currentName = node.cardState.getName(); currentName = node.cardState.getName();
} }
else { else {

View File

@@ -209,7 +209,7 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
public final String toString() { public final String toString() {
if (hasParam("Description") && !this.isSuppressed()) { if (hasParam("Description") && !this.isSuppressed()) {
String currentName; String currentName;
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) { if (this.isIntrinsic() && cardState != null && cardState.getCard() == getHostCard()) {
currentName = cardState.getName(); currentName = cardState.getName();
} }
else { else {

View File

@@ -132,7 +132,7 @@ public abstract class Trigger extends TriggerReplacementBase {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
String currentName; String currentName;
if (this.isIntrinsic() && !this.getHostCard().isMutated() && cardState != null) { if (this.isIntrinsic() && cardState != null && cardState.getCard() == getHostCard()) {
currentName = cardState.getName(); currentName = cardState.getName();
} }
else { else {

View File

@@ -4,8 +4,7 @@ Types:Legendary Artifact
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | CheckSVar$ X | SVarCompare$ GE2 | TriggerDescription$ At the beginning of your end step, if you lost 2 or more life this turn, create a 2/2 black Zombie creature token. T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | CheckSVar$ X | SVarCompare$ GE2 | TriggerDescription$ At the beginning of your end step, if you lost 2 or more life this turn, create a 2/2 black Zombie creature token.
SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie
SVar:X:PlayerCountPropertyYou$LifeLostThisTurn SVar:X:PlayerCountPropertyYou$LifeLostThisTurn
A:AB$ Token | Cost$ T Exile<1/CARDNAME> Exile<1/Artifact.YouCtrl+namedEye of Vecna> Exile<1/Artifact.YouCtrl+namedHand of Vecna> | RememberCostCards$ True | ImprintTokens$ True | CostDesc$ {T}, Exile CARDNAME and artifacts you control named Eye of Vecna and Hand of Vecna: | TokenScript$ vecna | SubAbility$ DBAnimate | SpellDescription$ Create Vecna, a legendary 8/8 black Zombie God creature token with indestructible. It gains all triggered abilities of the exiled cards. A:AB$ Token | Cost$ T Exile<1/CARDNAME> Exile<1/Artifact.YouCtrl+namedEye of Vecna> Exile<1/Artifact.YouCtrl+namedHand of Vecna> | CostDesc$ {T}, Exile CARDNAME and artifacts you control named Eye of Vecna and Hand of Vecna: | TokenScript$ vecna | AddTriggersFrom$ ExiledCards | SpellDescription$ Create Vecna, a legendary 8/8 black Zombie God creature token with indestructible. It gains all triggered abilities of the exiled cards.
SVar:DBAnimate:DB$ Animate | Defined$ Imprinted | Duration$ Permanent | GainsTriggeredAbilitiesOf$ Remembered
DeckHas:Ability$Token DeckHas:Ability$Token
DeckHints:Type$Zombie DeckHints:Type$Zombie
DeckHints:Name$Eye of Vecna|Hand of Vecna DeckHints:Name$Eye of Vecna|Hand of Vecna