mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
tekuthal_inquiry_dominus.txt / ReplaceProliferate support
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package forge.game.ability.effects;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
@@ -15,6 +16,7 @@ import forge.game.card.CounterType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerController;
|
||||
import forge.game.player.PlayerPredicates;
|
||||
import forge.game.replacement.ReplacementType;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
import forge.game.trigger.TriggerType;
|
||||
import forge.game.zone.ZoneType;
|
||||
@@ -35,11 +37,23 @@ public class CountersProliferateEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
int num = sa.hasParam("Amount") ? AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("Amount"), sa) : 1;
|
||||
|
||||
final Player p = sa.getActivatingPlayer();
|
||||
final Card host = sa.getHostCard();
|
||||
final Game game = host.getGame();
|
||||
|
||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(p);
|
||||
repParams.put(AbilityKey.Source, sa);
|
||||
repParams.put(AbilityKey.Num, num);
|
||||
|
||||
switch (game.getReplacementHandler().run(ReplacementType.Proliferate, repParams)) {
|
||||
case NotReplaced:
|
||||
break;
|
||||
case Updated: {
|
||||
num = (int) repParams.get(AbilityKey.Num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PlayerController pc = p.getController();
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
|
||||
@@ -111,7 +111,7 @@ public class CostRemoveAnyCounter extends CostPart {
|
||||
sb.append(Cost.convertAmountTypeToWords(this.convertAmount(), this.getAmount(), counters));
|
||||
sb.append(this.getAmount().equals("1") ? "" : "s");
|
||||
}
|
||||
sb.append(" from ").append(desc);
|
||||
sb.append(" from ").append(desc).append(" you control");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package forge.game.replacement;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import forge.game.ability.AbilityKey;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.spellability.SpellAbility;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public class ReplaceProliferate extends ReplacementEffect {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param mapParams   HashMap<String, String>
|
||||
* @param host   Card
|
||||
*/
|
||||
public ReplaceProliferate(final Map<String, String> mapParams, final Card host, final boolean intrinsic) {
|
||||
super(mapParams, host, intrinsic);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.replacement.ReplacementEffect#canReplace(java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public boolean canReplace(Map<AbilityKey, Object> runParams) {
|
||||
if (((int) runParams.get(AbilityKey.Num)) <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!matchesValidParam("ValidPlayer", runParams.get(AbilityKey.Affected))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.card.replacement.ReplacementEffect#setReplacingObjects(java.util.Map, forge.card.spellability.SpellAbility)
|
||||
*/
|
||||
@Override
|
||||
public void setReplacingObjects(Map<AbilityKey, Object> runParams, SpellAbility sa) {
|
||||
sa.setReplacingObject(AbilityKey.Player, runParams.get(AbilityKey.Affected));
|
||||
sa.setReplacingObject(AbilityKey.Num, runParams.get(AbilityKey.Num));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public enum ReplacementType {
|
||||
Mill(ReplaceMill.class),
|
||||
Moved(ReplaceMoved.class),
|
||||
ProduceMana(ReplaceProduceMana.class),
|
||||
Proliferate(ReplaceProliferate.class),
|
||||
Scry(ReplaceScry.class),
|
||||
SetInMotion(ReplaceSetInMotion.class),
|
||||
Surveil(ReplaceSurveil.class),
|
||||
|
||||
@@ -2,6 +2,6 @@ Name:Soul Diviner
|
||||
ManaCost:U B
|
||||
Types:Creature Zombie Wizard
|
||||
PT:2/3
|
||||
A:AB$ Draw | Cost$ T RemoveAnyCounter<1/Any/Card.Artifact;Card.Creature;Card.Land;Card.Planeswalker/artifact, creature, land or planeswalker> | NumCards$ 1 | SpellDescription$ Draw a card.
|
||||
A:AB$ Draw | Cost$ T RemoveAnyCounter<1/Any/Artifact;Creature;Land;Planeswalker/artifact, creature, land or planeswalker> | NumCards$ 1 | SpellDescription$ Draw a card.
|
||||
AI:RemoveDeck:Random
|
||||
Oracle:{T}, Remove a counter from an artifact, creature, land, or planeswalker you control: Draw a card.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Name:Tekuthal, Inquiry Dominus
|
||||
ManaCost:2 U U
|
||||
Types:Legendary Creature Phyrexian Horror
|
||||
PT:3/5
|
||||
K:Flying
|
||||
R:Event$ Proliferate | ActiveZones$ Battlefield | ValidPlayer$ You | ReplaceWith$ ProlifTwice | AiLogic$ DoubleLife | Description$ If you would proliferate, proliferate twice instead.
|
||||
SVar:ProlifTwice:DB$ ReplaceEffect | VarName$ Num | VarValue$ ReplaceCount$Num/Twice
|
||||
A:AB$ PutCounter | Cost$ 1 UP UP RemoveAnyCounter<3/Any/Artifact.Other;Creature.Other;Planeswalker.Other/among other artifacts, creatures, and planeswalkers> | CounterType$ Indestructible | SpellDescription$ Put an indestructible counter on CARDNAME. ({U/P} can be paid with either {U} or 2 life.)
|
||||
DeckHints:Type$Artifact|Planeswalker & Ability$Proliferate
|
||||
DeckNeeds:Ability$Counters
|
||||
Oracle:Flying\nIf you would proliferate, proliferate twice instead.\n{1}{U/P}{U/P}, Remove three counters from among other artifacts, creatures, and planeswalkers you control: Put an indestructible counter on Tekuthal, Inquiry Dominus. ({U/P} can be paid with either {U} or 2 life.)
|
||||
Reference in New Issue
Block a user