mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-12 16:58:57 +00:00
Merge pull request #179 from Northmoc/sncHoldForRansom
SNC: Hold for Ransom and support
This commit is contained in:
@@ -1035,6 +1035,11 @@ public class AbilityUtils {
|
|||||||
if (root != null) {
|
if (root != null) {
|
||||||
addPlayer(Lists.newArrayList(root), defined, players);
|
addPlayer(Lists.newArrayList(root), defined, players);
|
||||||
}
|
}
|
||||||
|
} else if (defined.startsWith("OriginalHost")) {
|
||||||
|
Card originalHost = sa.getOriginalHost();
|
||||||
|
if (originalHost != null) {
|
||||||
|
addPlayer(Lists.newArrayList(originalHost), defined, players);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (defined.startsWith("DelayTriggerRemembered") && sa instanceof SpellAbility) {
|
else if (defined.startsWith("DelayTriggerRemembered") && sa instanceof SpellAbility) {
|
||||||
SpellAbility root = ((SpellAbility)sa).getRootAbility();
|
SpellAbility root = ((SpellAbility)sa).getRootAbility();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@@ -18,25 +19,27 @@ import forge.game.card.CardZoneTable;
|
|||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
|
import forge.util.Lang;
|
||||||
|
|
||||||
public class SacrificeAllEffect extends SpellAbilityEffect {
|
public class SacrificeAllEffect extends SpellAbilityEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getStackDescription(SpellAbility sa) {
|
protected String getStackDescription(SpellAbility sa) {
|
||||||
// when getStackDesc is called, just build exactly what is happening
|
// when getStackDesc is called, just build exactly what is happening
|
||||||
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
/*
|
if (sa.hasParam("Controller")) {
|
||||||
* This is not currently targeted ArrayList<Player> tgtPlayers;
|
List<Player> conts = getDefinedPlayersOrTargeted(sa, "Controller");
|
||||||
*
|
sb.append(Lang.joinHomogenous(conts)).append(conts.size() == 1 ? " sacrifices " : " sacrifice ");
|
||||||
* Target tgt = af.getAbTgt(); if (tgt != null) tgtPlayers =
|
} else {
|
||||||
* tgt.getTargetPlayers(); else tgtPlayers =
|
sb.append("Sacrifice ");
|
||||||
* AbilityFactory.getDefinedPlayers(sa.getHostCard(),
|
}
|
||||||
* sa.get("Defined"), sa);
|
if (sa.hasParam("Defined")) {
|
||||||
*/
|
List<Card> toSac = getDefinedCardsOrTargeted(sa);
|
||||||
|
sb.append(Lang.joinHomogenous(toSac)).append(".");
|
||||||
sb.append("Sacrifice permanents.");
|
} else {
|
||||||
|
sb.append("permanents.");
|
||||||
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
9
forge-gui/res/cardsfolder/upcoming/hold_for_ransom.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/hold_for_ransom.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Hold for Ransom
|
||||||
|
ManaCost:1 W
|
||||||
|
Types:Enchantment Aura
|
||||||
|
K:Enchant creature
|
||||||
|
A:SP$ Attach | ValidTgts$ Creature | AILogic$ Curse
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ CARDNAME can't attack or block. | AddAbility$ PayRansom | Description$ Enchanted creature can't attack or block and has "{7}: Hold for Ransom's controller sacrifices it and draws a card. Activate only as a sorcery."
|
||||||
|
SVar:PayRansom:AB$ SacrificeAll | Cost$ 7 | Defined$ OriginalHost | Controller$ OriginalHostController | SubAbility$ DBDraw | SorcerySpeed$ True | SpellDescription$ ORIGINALHOST's controller sacrifices it and draws a card. Activate only as a sorcery.
|
||||||
|
SVar:DBDraw:DB$ Draw | Defined$ OriginalHostController
|
||||||
|
Oracle:Enchant creature\nEnchanted creature can't attack or block and has "{7}: Hold for Ransom's controller sacrifices it and draws a card. Activate only as a sorcery."
|
||||||
Reference in New Issue
Block a user