mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added Bloodlord of Vaasgoth (scripted by moomarc)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1116,6 +1116,7 @@ res/cardsfolder/b/bloodied_ghost.txt svneol=native#text/plain
|
||||
res/cardsfolder/b/bloodletter_quill.txt svneol=native#text/plain
|
||||
res/cardsfolder/b/bloodline_keeper_lord_of_lineage.txt -text
|
||||
res/cardsfolder/b/bloodline_shaman.txt -text
|
||||
res/cardsfolder/b/bloodlord_of_vaasgoth.txt -text
|
||||
res/cardsfolder/b/bloodmark_mentor.txt svneol=native#text/plain
|
||||
res/cardsfolder/b/bloodpyre_elemental.txt svneol=native#text/plain
|
||||
res/cardsfolder/b/bloodrage_vampire.txt svneol=native#text/plain
|
||||
|
||||
13
res/cardsfolder/b/bloodlord_of_vaasgoth.txt
Normal file
13
res/cardsfolder/b/bloodlord_of_vaasgoth.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Bloodlord of Vaasgoth
|
||||
ManaCost:3 B B
|
||||
Types:Creature Vampire Warrior
|
||||
PT:3/3
|
||||
K:Bloodthirst 3
|
||||
K:Flying
|
||||
T:Mode$ SpellCast | ValidCard$ Creature.Vampire | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ BloodPump | TriggerDescription$ Whenever you cast a Vampire creature spell, it gains bloodthirst 3.
|
||||
SVar:BloodPump:AB$ Animate | Cost$ 0 | Defined$ TriggeredCard | Replacements$ etbBloodthirst | sVars$ VaasgothETB,BloodthirstCounters | Permanent$ True
|
||||
SVar:etbBloodthirst:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Bloodthirst$ True | ReplaceWith$ VaasgothETB | Description$ Bloodthirst 3 (If an opponent was dealt damage this turn, this creature enters the battlefield with three +1/+1 counters on it.)
|
||||
SVar:VaasgothETB:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | SubAbility$ BloodthirstCounters
|
||||
SVar:BloodthirstCounters:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 3
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodlord_of_vaasgoth.jpg
|
||||
Oracle:Bloodthirst 3 (If an opponent was dealt damage this turn, this creature enters the battlefield with three +1/+1 counters on it.)\nFlying\nWhenever you cast a Vampire creature spell, it gains bloodthirst 3.
|
||||
@@ -8147,7 +8147,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public void setReplacementEffects(final List<ReplacementEffect> res) {
|
||||
this.getCharacteristics().getReplacementEffects().clear();
|
||||
for (final ReplacementEffect replacementEffect : res) {
|
||||
if (!replacementEffect.isTemporary()) {
|
||||
if (replacementEffect.isIntrinsic()) {
|
||||
this.addReplacementEffect(replacementEffect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import forge.card.TriggerReplacementBase;
|
||||
import forge.card.ability.AbilityFactory;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.replacement.ReplacementHandler;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.staticability.StaticAbility;
|
||||
import forge.card.trigger.Trigger;
|
||||
@@ -100,7 +101,11 @@ public class AnimateAllEffect extends AnimateEffectBase {
|
||||
if (sa.hasParam("Abilities")) {
|
||||
abilities.addAll(Arrays.asList(sa.getParam("Abilities").split(",")));
|
||||
}
|
||||
|
||||
// replacement effects to add to the animated being
|
||||
final ArrayList<String> replacements = new ArrayList<String>();
|
||||
if (sa.hasParam("Replacements")) {
|
||||
replacements.addAll(Arrays.asList(sa.getParam("Replacements").split(",")));
|
||||
}
|
||||
// triggers to add to the animated being
|
||||
final ArrayList<String> triggers = new ArrayList<String>();
|
||||
if (sa.hasParam("Triggers")) {
|
||||
@@ -156,7 +161,15 @@ public class AnimateAllEffect extends AnimateEffectBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// give replacement effects
|
||||
final ArrayList<ReplacementEffect> addedReplacements = new ArrayList<ReplacementEffect>();
|
||||
if (replacements.size() > 0) {
|
||||
for (final String s : replacements) {
|
||||
final String actualReplacement = host.getSVar(s);
|
||||
final ReplacementEffect parsedReplacement = ReplacementHandler.parseReplacement(actualReplacement, c, false);
|
||||
addedReplacements.add(c.addReplacementEffect(parsedReplacement));
|
||||
}
|
||||
}
|
||||
// Grant triggers
|
||||
final ArrayList<Trigger> addedTriggers = new ArrayList<Trigger>();
|
||||
if (triggers.size() > 0) {
|
||||
@@ -210,7 +223,7 @@ public class AnimateAllEffect extends AnimateEffectBase {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
doUnanimate(c, sa, finalDesc, hiddenKeywords, addedAbilities, addedTriggers,
|
||||
doUnanimate(c, sa, finalDesc, hiddenKeywords, addedAbilities, addedTriggers, addedReplacements,
|
||||
colorTimestamp, false, removedAbilities, timestamp);
|
||||
|
||||
// give back suppressed triggers
|
||||
|
||||
@@ -12,6 +12,7 @@ import forge.card.TriggerReplacementBase;
|
||||
import forge.card.ability.AbilityFactory;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.replacement.ReplacementHandler;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.staticability.StaticAbility;
|
||||
import forge.card.trigger.Trigger;
|
||||
@@ -117,6 +118,12 @@ public class AnimateEffect extends AnimateEffectBase {
|
||||
abilities.addAll(Arrays.asList(sa.getParam("Abilities").split(",")));
|
||||
}
|
||||
|
||||
// replacement effects to add to the animated being
|
||||
final ArrayList<String> replacements = new ArrayList<String>();
|
||||
if (sa.hasParam("Replacements")) {
|
||||
replacements.addAll(Arrays.asList(sa.getParam("Replacements").split(",")));
|
||||
}
|
||||
|
||||
// triggers to add to the animated being
|
||||
final ArrayList<String> triggers = new ArrayList<String>();
|
||||
if (sa.hasParam("Triggers")) {
|
||||
@@ -179,6 +186,16 @@ public class AnimateEffect extends AnimateEffectBase {
|
||||
}
|
||||
}
|
||||
|
||||
// give replacement effects
|
||||
final ArrayList<ReplacementEffect> addedReplacements = new ArrayList<ReplacementEffect>();
|
||||
if (replacements.size() > 0) {
|
||||
for (final String s : replacements) {
|
||||
final String actualReplacement = source.getSVar(s);
|
||||
final ReplacementEffect parsedReplacement = ReplacementHandler.parseReplacement(actualReplacement, c, false);
|
||||
addedReplacements.add(c.addReplacementEffect(parsedReplacement));
|
||||
}
|
||||
}
|
||||
|
||||
// suppress triggers from the animated card
|
||||
final ArrayList<Trigger> removedTriggers = new ArrayList<Trigger>();
|
||||
if (sa.hasParam("OverwriteTriggers") || removeAll) {
|
||||
@@ -239,7 +256,7 @@ public class AnimateEffect extends AnimateEffectBase {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
doUnanimate(c, sa, finalDesc, hiddenKeywords, addedAbilities, addedTriggers,
|
||||
doUnanimate(c, sa, finalDesc, hiddenKeywords, addedAbilities, addedTriggers, addedReplacements,
|
||||
colorTimestamp, givesStAbs, removedAbilities, timestamp);
|
||||
|
||||
// give back suppressed triggers
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.ArrayList;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
import forge.card.replacement.ReplacementEffect;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.staticability.StaticAbility;
|
||||
import forge.card.trigger.Trigger;
|
||||
@@ -134,7 +135,8 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
|
||||
*/
|
||||
void doUnanimate(final Card c, SpellAbility sa, final String colorDesc,
|
||||
final ArrayList<String> hiddenKeywords, final ArrayList<SpellAbility> addedAbilities,
|
||||
final ArrayList<Trigger> addedTriggers, final long colorTimestamp, final boolean givesStAbs,
|
||||
final ArrayList<Trigger> addedTriggers, final ArrayList<ReplacementEffect> addedReplacements,
|
||||
final long colorTimestamp, final boolean givesStAbs,
|
||||
final ArrayList<SpellAbility> removedAbilities, final long timestamp) {
|
||||
|
||||
c.removeNewPT(timestamp);
|
||||
@@ -169,6 +171,10 @@ public abstract class AnimateEffectBase extends SpellAbilityEffect {
|
||||
c.removeTrigger(t);
|
||||
}
|
||||
|
||||
for (final ReplacementEffect rep : addedReplacements) {
|
||||
c.getReplacementEffects().remove(rep);
|
||||
}
|
||||
|
||||
// any other unanimate cleanup
|
||||
if (!c.isCreature()) {
|
||||
c.unEquipAllCards();
|
||||
|
||||
@@ -146,7 +146,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
||||
for (final String s : effectReplacementEffects) {
|
||||
final String actualReplacement = hostCard.getSVar(s);
|
||||
|
||||
final ReplacementEffect parsedReplacement = ReplacementHandler.parseReplacement(actualReplacement, eff);
|
||||
final ReplacementEffect parsedReplacement = ReplacementHandler.parseReplacement(actualReplacement, eff, true);
|
||||
eff.addReplacementEffect(parsedReplacement);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ public class CardFactory {
|
||||
//Planeswalker damage redirection
|
||||
card.addReplacementEffect(ReplacementHandler.parseReplacement("Event$ DamageDone | ActiveZones$ Battlefield | IsCombat$ False | ValidSource$ Card.YouDontCtrl"
|
||||
+ " | ValidTarget$ You | Optional$ True | OptionalDecider$ Opponent | ReplaceWith$ DamagePW | Secondary$ True"
|
||||
+ " | AICheckSVar$ DamagePWAI | AISVarCompare$ GT4 | Description$ Redirect damage to " + card.toString(), card));
|
||||
+ " | AICheckSVar$ DamagePWAI | AISVarCompare$ GT4 | Description$ Redirect damage to " + card.toString(), card, true));
|
||||
card.setSVar("DamagePW", "AB$DealDamage | Cost$ 0 | Defined$ Self | NumDmg$ DamagePWX | DamageSource$ ReplacedSource | References$ DamagePWX,DamagePWAI");
|
||||
card.setSVar("DamagePWX", "ReplaceCount$DamageAmount");
|
||||
card.setSVar("DamagePWAI", "ReplaceCount$DamageAmount/NMinus.DamagePWY");
|
||||
@@ -400,7 +400,7 @@ public class CardFactory {
|
||||
private static void readCardFace(Card c, ICardFace face) {
|
||||
for(String a : face.getAbilities()) c.addIntrinsicAbility(a);
|
||||
for(String k : face.getKeywords()) c.addIntrinsicKeyword(k);
|
||||
for(String r : face.getReplacements()) c.addReplacementEffect(ReplacementHandler.parseReplacement(r, c));
|
||||
for(String r : face.getReplacements()) c.addReplacementEffect(ReplacementHandler.parseReplacement(r, c, true));
|
||||
for(String s : face.getStaticAbilities()) c.addStaticAbilityString(s);
|
||||
for(String t : face.getTriggers()) c.addTrigger(TriggerHandler.parseTrigger(t, c, true));
|
||||
for(Entry<String, String> v : face.getVariables()) c.setSVar(v.getKey(), v.getValue());
|
||||
|
||||
@@ -2649,7 +2649,7 @@ public class CardFactoryUtil {
|
||||
}
|
||||
}
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repEffsb.toString(), card);
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repEffsb.toString(), card, true);
|
||||
re.setLayer(layer);
|
||||
re.setOverridingAbility(repAb);
|
||||
|
||||
@@ -2687,7 +2687,7 @@ public class CardFactoryUtil {
|
||||
String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield "
|
||||
+ "| ReplaceWith$ ETBCounterSVar | Description$ " + desc + (!extraparams.equals("") ? " | " + extraparams : "");
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card);
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card, true);
|
||||
re.setLayer(ReplacementLayer.Other);
|
||||
|
||||
card.addReplacementEffect(re);
|
||||
@@ -2705,7 +2705,7 @@ public class CardFactoryUtil {
|
||||
String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield "
|
||||
+ "| ReplaceWith$ ETBTappedSVar | Description$ CARDNAME enters the battlefield tapped.";
|
||||
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card);
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card, true);
|
||||
re.setLayer(ReplacementLayer.Other);
|
||||
|
||||
card.addReplacementEffect(re);
|
||||
@@ -3318,7 +3318,7 @@ public class CardFactoryUtil {
|
||||
}
|
||||
|
||||
if( hasKw ) {
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement("Event$ Destroy | ActiveZones$ Battlefield | ValidCard$ Card.EnchantedBy | ReplaceWith$ RegenTA | Secondary$ True | TotemArmor$ True | Description$ Totem armor - " + c, c);
|
||||
ReplacementEffect re = ReplacementHandler.parseReplacement("Event$ Destroy | ActiveZones$ Battlefield | ValidCard$ Card.EnchantedBy | ReplaceWith$ RegenTA | Secondary$ True | TotemArmor$ True | Description$ Totem armor - " + c, c, true);
|
||||
c.getSVars().put("RegenTA", "AB$ DealDamage | Cost$ 0 | Defined$ ReplacedCard | Remove$ All | SubAbility$ DestroyMe");
|
||||
c.getSVars().put("DestroyMe", "DB$ Destroy | Defined$ Self");
|
||||
c.getReplacementEffects().add(re);
|
||||
|
||||
@@ -34,8 +34,8 @@ public class ReplaceCounter extends ReplacementEffect {
|
||||
* @param map the map
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceCounter(Map<String, String> map, Card host) {
|
||||
super(map, host);
|
||||
public ReplaceCounter(Map<String, String> map, Card host, boolean intrinsic) {
|
||||
super(map, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -36,8 +36,8 @@ public class ReplaceDamage extends ReplacementEffect {
|
||||
* @param map the map
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceDamage(Map<String, String> map, Card host) {
|
||||
super(map, host);
|
||||
public ReplaceDamage(Map<String, String> map, Card host, boolean intrinsic) {
|
||||
super(map, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -34,8 +34,8 @@ public class ReplaceDestroy extends ReplacementEffect {
|
||||
* @param params the params
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceDestroy(final Map<String, String> params, final Card host) {
|
||||
super(params, host);
|
||||
public ReplaceDestroy(final Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -34,8 +34,8 @@ public class ReplaceDiscard extends ReplacementEffect {
|
||||
* @param params the params
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceDiscard(final Map<String, String> params, final Card host) {
|
||||
super(params, host);
|
||||
public ReplaceDiscard(final Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -36,8 +36,8 @@ public class ReplaceDraw extends ReplacementEffect {
|
||||
* @param params the params
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceDraw(final Map<String, String> params, final Card host) {
|
||||
super(params, host);
|
||||
public ReplaceDraw(final Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -34,8 +34,8 @@ public class ReplaceGainLife extends ReplacementEffect {
|
||||
* @param map the map
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceGainLife(Map<String, String> map, Card host) {
|
||||
super(map, host);
|
||||
public ReplaceGainLife(Map<String, String> map, Card host, boolean intrinsic) {
|
||||
super(map, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -16,8 +16,8 @@ public class ReplaceGameLoss extends ReplacementEffect {
|
||||
* @param map the map
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceGameLoss(Map<String, String> map, Card host) {
|
||||
super(map, host);
|
||||
public ReplaceGameLoss(Map<String, String> map, Card host, boolean intrinsic) {
|
||||
super(map, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -18,8 +18,8 @@ public class ReplaceMoved extends ReplacementEffect {
|
||||
* @param mapParams   HashMap<String, String>
|
||||
* @param host   Card
|
||||
*/
|
||||
public ReplaceMoved(final Map<String, String> mapParams, final Card host) {
|
||||
super(mapParams, host);
|
||||
public ReplaceMoved(final Map<String, String> mapParams, final Card host, final boolean intrinsic) {
|
||||
super(mapParams, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -33,8 +33,8 @@ public class ReplaceSetInMotion extends ReplacementEffect {
|
||||
* @param params the params
|
||||
* @param host the host
|
||||
*/
|
||||
public ReplaceSetInMotion(final Map<String, String> params, final Card host) {
|
||||
super(params, host);
|
||||
public ReplaceSetInMotion(final Map<String, String> params, final Card host, final boolean intrinsic) {
|
||||
super(params, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -17,8 +17,8 @@ public class ReplaceTurnFaceUp extends ReplacementEffect {
|
||||
* @param mapParams   HashMap<String, String>
|
||||
* @param host   Card
|
||||
*/
|
||||
public ReplaceTurnFaceUp(final Map<String, String> mapParams, final Card host) {
|
||||
super(mapParams, host);
|
||||
public ReplaceTurnFaceUp(final Map<String, String> mapParams, final Card host, final boolean intrinsic) {
|
||||
super(mapParams, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -41,6 +41,9 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
/** The has run. */
|
||||
private boolean hasRun = false;
|
||||
|
||||
/** The is intrinsic. */
|
||||
private final boolean intrinsic;
|
||||
|
||||
/**
|
||||
* Checks for run.
|
||||
*
|
||||
@@ -61,9 +64,10 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
* @param host
|
||||
* the host
|
||||
*/
|
||||
public ReplacementEffect(final Map<String, String> map, final Card host) {
|
||||
public ReplacementEffect(final Map<String, String> map, final Card host, final boolean intrinsic) {
|
||||
mapParams = map;
|
||||
this.setHostCard(host);
|
||||
this.intrinsic = intrinsic;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,10 +204,11 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
*/
|
||||
public final ReplacementEffect getCopy() {
|
||||
ReplacementType rt = ReplacementType.getTypeFor(this);
|
||||
ReplacementEffect res = rt.createReplacement(mapParams, hostCard);
|
||||
ReplacementEffect res = rt.createReplacement(mapParams, hostCard, intrinsic);
|
||||
res.setOverridingAbility(this.getOverridingAbility());
|
||||
res.setActiveZone(validHostZones);
|
||||
res.setLayer(getLayer());
|
||||
res.setTemporary(isTemporary());
|
||||
return res;
|
||||
|
||||
}
|
||||
@@ -270,4 +275,12 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
||||
public final boolean isTemporary() {
|
||||
return this.temporary;
|
||||
}
|
||||
/**
|
||||
* Checks if is intrinsic.
|
||||
*
|
||||
* @return the isIntrinsic
|
||||
*/
|
||||
public boolean isIntrinsic() {
|
||||
return this.intrinsic;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,10 +261,10 @@ public class ReplacementHandler {
|
||||
* The cards that hosts the replacement effect.
|
||||
* @return A finished instance
|
||||
*/
|
||||
public static ReplacementEffect parseReplacement(final String repParse, final Card host) {
|
||||
public static ReplacementEffect parseReplacement(final String repParse, final Card host, final boolean intrinsic) {
|
||||
|
||||
final Map<String, String> mapParams = FileSection.parseToMap(repParse, "$", "|");
|
||||
return ReplacementHandler.parseReplacement(mapParams, host);
|
||||
return ReplacementHandler.parseReplacement(mapParams, host, intrinsic);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,9 +278,9 @@ public class ReplacementHandler {
|
||||
* The card that hosts the replacement effect
|
||||
* @return The finished instance
|
||||
*/
|
||||
private static ReplacementEffect parseReplacement(final Map<String, String> mapParams, final Card host) {
|
||||
private static ReplacementEffect parseReplacement(final Map<String, String> mapParams, final Card host, final boolean intrinsic) {
|
||||
final ReplacementType rt = ReplacementType.smartValueOf(mapParams.get("Event"));
|
||||
ReplacementEffect ret = rt.createReplacement(mapParams, host);
|
||||
ReplacementEffect ret = rt.createReplacement(mapParams, host, intrinsic);
|
||||
|
||||
String activeZones = mapParams.get("ActiveZones");
|
||||
if (null != activeZones) {
|
||||
|
||||
@@ -54,14 +54,14 @@ public enum ReplacementType {
|
||||
* @param intrinsic
|
||||
* @return
|
||||
*/
|
||||
public ReplacementEffect createReplacement(Map<String, String> mapParams, Card host) {
|
||||
public ReplacementEffect createReplacement(Map<String, String> mapParams, Card host, boolean intrinsic) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Constructor<? extends ReplacementEffect>[] cc = (Constructor<? extends ReplacementEffect>[]) clasz.getDeclaredConstructors();
|
||||
for (Constructor<? extends ReplacementEffect> c : cc) {
|
||||
Class<?>[] pp = c.getParameterTypes();
|
||||
if (pp[0].isAssignableFrom(Map.class)) {
|
||||
try {
|
||||
ReplacementEffect res = c.newInstance(mapParams, host);
|
||||
ReplacementEffect res = c.newInstance(mapParams, host, intrinsic);
|
||||
return res;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// TODO Auto-generated catch block ignores the exception, but sends it to System.err and probably forge.log.
|
||||
|
||||
@@ -431,7 +431,7 @@ public class StaticAbilityContinuous {
|
||||
// add Replacement effects
|
||||
if (addReplacements != null) {
|
||||
for (String rep : addReplacements) {
|
||||
final ReplacementEffect actualRep = ReplacementHandler.parseReplacement(rep, affectedCard);
|
||||
final ReplacementEffect actualRep = ReplacementHandler.parseReplacement(rep, affectedCard, false);
|
||||
affectedCard.addReplacementEffect(actualRep).setTemporary(true);;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user