DamageEachEffect refactor + MOM Tandem Takedown / MOC Great Aerie (#2814)

* DamageEachEffect refactor

* AiAttackController refactor param

* SpellAbilityEffect.tokenizeString use joinHomogenous

* refactor old cards, add tandem_takedown.txt

* the_great_aerie.txt + Support + refactor grim_contest.txt
This commit is contained in:
Northmoc
2023-04-07 08:13:55 -04:00
committed by GitHub
parent 4da4a333d9
commit 1f82420261
18 changed files with 83 additions and 111 deletions

View File

@@ -257,7 +257,7 @@ public class AiAttackController {
continue; continue;
} }
if (sa.getApi() == ApiType.EachDamage && "TriggeredAttacker".equals(sa.getParam("DefinedPlayers"))) { if (sa.getApi() == ApiType.EachDamage && "TriggeredAttacker".equals(sa.getParam("Defined"))) {
List<Card> valid = CardLists.getValidCards(c.getController().getCreaturesInPlay(), sa.getParam("ValidCards"), c.getController(), c, sa); List<Card> valid = CardLists.getValidCards(c.getController().getCreaturesInPlay(), sa.getParam("ValidCards"), c.getController(), c, sa);
// TODO: this assumes that 1 damage is dealt per creature. Improve this to check the parameter/X to determine // TODO: this assumes that 1 damage is dealt per creature. Improve this to check the parameter/X to determine
// how much damage is dealt by each of the creatures in the valid list. // how much damage is dealt by each of the creatures in the valid list.

View File

@@ -24,10 +24,6 @@ import forge.util.MyRandom;
public class FightAi extends SpellAbilityAi { public class FightAi extends SpellAbilityAi {
@Override @Override
protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) { protected boolean checkAiLogic(final Player ai, final SpellAbility sa, final String aiLogic) {
if (sa.hasParam("FightWithToughness")) {
// TODO: add ailogic
return false;
}
return super.checkAiLogic(ai, sa, aiLogic); return super.checkAiLogic(ai, sa, aiLogic);
} }

View File

@@ -1,28 +1,15 @@
package forge.game.ability; package forge.game.ability;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Table; import com.google.common.collect.Table;
import forge.GameCommand; import forge.GameCommand;
import forge.card.MagicColor; import forge.card.MagicColor;
import forge.game.Game; import forge.game.Game;
import forge.game.GameEntity; import forge.game.GameEntity;
import forge.game.GameObject; import forge.game.GameObject;
import forge.game.card.Card; import forge.game.card.*;
import forge.game.card.CardCollection;
import forge.game.card.CardCollectionView;
import forge.game.card.CardUtil;
import forge.game.card.CardZoneTable;
import forge.game.combat.Combat; import forge.game.combat.Combat;
import forge.game.phase.PhaseType; import forge.game.phase.PhaseType;
import forge.game.player.Player; import forge.game.player.Player;
@@ -41,6 +28,9 @@ import forge.util.Lang;
import forge.util.Localizer; import forge.util.Localizer;
import forge.util.TextUtil; import forge.util.TextUtil;
import forge.util.collect.FCollection; import forge.util.collect.FCollection;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
/** /**
* <p> * <p>
@@ -192,7 +182,7 @@ public abstract class SpellAbilityEffect {
} else { } else {
objs = AbilityUtils.getDefinedObjects(sa.getHostCard(), t, sa); objs = AbilityUtils.getDefinedObjects(sa.getHostCard(), t, sa);
} }
sb.append(StringUtils.join(objs, ", ")); sb.append(Lang.joinHomogenous(objs));
} }
} else { } else {
sb.append(t); sb.append(t);

View File

@@ -5,6 +5,7 @@ import forge.game.GameEntity;
import forge.game.GameEntityCounterTable; import forge.game.GameEntityCounterTable;
import forge.game.ability.AbilityUtils; import forge.game.ability.AbilityUtils;
import forge.game.card.Card; import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardDamageMap; import forge.game.card.CardDamageMap;
import forge.game.card.CardLists; import forge.game.card.CardLists;
import forge.game.spellability.SpellAbility; import forge.game.spellability.SpellAbility;
@@ -20,10 +21,9 @@ public class DamageEachEffect extends DamageBaseEffect {
@Override @Override
protected String getStackDescription(SpellAbility sa) { protected String getStackDescription(SpellAbility sa) {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
final String damage = sa.getParam("NumDmg"); final int iDmg = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumDmg"), sa);
final int iDmg = AbilityUtils.calculateAmount(sa.getHostCard(), damage, sa);
String desc = sa.getParam("ValidCards"); String desc = sa.getParamOrDefault("ValidCards", "");
if (sa.hasParam("ValidDescription")) { if (sa.hasParam("ValidDescription")) {
desc = sa.getParam("ValidDescription"); desc = sa.getParam("ValidDescription");
} }
@@ -35,18 +35,9 @@ public class DamageEachEffect extends DamageBaseEffect {
dmg += iDmg + " damage"; dmg += iDmg + " damage";
} }
if (sa.hasParam("StackDescription")) {
sb.append(sa.getParam("StackDescription"));
} else {
sb.append("Each ").append(desc).append(" deals ").append(dmg).append(" to "); sb.append("Each ").append(desc).append(" deals ").append(dmg).append(" to ");
Lang.joinHomogenous(getTargetPlayers(sa)); sb.append(Lang.joinHomogenous(getTargetEntities(sa))).append(".");
if (sa.hasParam("DefinedCards")) {
if (sa.getParam("DefinedCards").equals("Self")) {
sb.append(" itself");
}
}
}
sb.append(".");
return sb.toString(); return sb.toString();
} }
@@ -58,11 +49,17 @@ public class DamageEachEffect extends DamageBaseEffect {
public void resolve(SpellAbility sa) { public void resolve(SpellAbility sa) {
final Card card = sa.getHostCard(); final Card card = sa.getHostCard();
final Game game = card.getGame(); final Game game = card.getGame();
final String num = sa.getParamOrDefault("NumDmg", "X");
FCollectionView<Card> sources = game.getCardsIn(ZoneType.Battlefield); FCollectionView<Card> sources;
if (sa.hasParam("DefinedDamagers")) {
sources = AbilityUtils.getDefinedCards(card, sa.getParam("DefinedDamagers"), sa);
} else {
sources = game.getCardsIn(ZoneType.Battlefield);
if (sa.hasParam("ValidCards")) { if (sa.hasParam("ValidCards")) {
sources = CardLists.getValidCards(sources, sa.getParam("ValidCards"), sa.getActivatingPlayer(), card, sa); sources = CardLists.getValidCards(sources, sa.getParam("ValidCards"), sa.getActivatingPlayer(), card, sa);
} }
}
boolean usedDamageMap = true; boolean usedDamageMap = true;
CardDamageMap damageMap = sa.getDamageMap(); CardDamageMap damageMap = sa.getDamageMap();
@@ -77,12 +74,30 @@ public class DamageEachEffect extends DamageBaseEffect {
usedDamageMap = false; usedDamageMap = false;
} }
for (final GameEntity ge : getTargetEntities(sa, "DefinedPlayers")) { if (sa.hasParam("EachToItself")) {
for (final Card source : sources) { for (final Card source : sources) {
final Card sourceLKI = game.getChangeZoneLKIInfo(source); final Card sourceLKI = game.getChangeZoneLKIInfo(source);
// TODO shouldn't that be using Num or something first? final int dmg = AbilityUtils.calculateAmount(source, num, sa);
final int dmg = AbilityUtils.calculateAmount(source, "X", sa); damageMap.put(sourceLKI, source, dmg);
}
} else if (sa.hasParam("ToEachOther")) {
final CardCollection targets = AbilityUtils.getDefinedCards(card, sa.getParam("ToEachOther"), sa);
for (final Card damager : targets) {
for (final Card c : targets) {
if (!c.equals(damager)) {
final Card sourceLKI = game.getChangeZoneLKIInfo(damager);
final int dmg = AbilityUtils.calculateAmount(damager, num, sa);
damageMap.put(sourceLKI, c, dmg);
}
}
}
} else for (final GameEntity ge : getTargetEntities(sa)) {
for (final Card source : sources) {
final Card sourceLKI = game.getChangeZoneLKIInfo(source);
final int dmg = AbilityUtils.calculateAmount(source, num, sa);
if (ge instanceof Card) { if (ge instanceof Card) {
final Card c = (Card) ge; final Card c = (Card) ge;
@@ -95,30 +110,6 @@ public class DamageEachEffect extends DamageBaseEffect {
} }
} }
if (sa.hasParam("DefinedCards")) {
if (sa.getParam("DefinedCards").equals("Self")) {
for (final Card source : sources) {
final Card sourceLKI = game.getChangeZoneLKIInfo(source);
final int dmg = AbilityUtils.calculateAmount(source, "X", sa);
damageMap.put(sourceLKI, source, dmg);
}
}
if (sa.getParam("DefinedCards").equals("Remembered")) {
for (final Card source : sources) {
final int dmg = AbilityUtils.calculateAmount(source, "X", sa);
final Card sourceLKI = source.getGame().getChangeZoneLKIInfo(source);
for (final Object o : card.getRemembered()) {
if (o instanceof Card) {
Card rememberedcard = (Card) o;
damageMap.put(sourceLKI, rememberedcard, dmg);
}
}
}
}
}
if (!usedDamageMap) { if (!usedDamageMap) {
game.getAction().dealDamage(false, damageMap, preventMap, counterTable, sa); game.getAction().dealDamage(false, damageMap, preventMap, counterTable, sa);
} }

View File

@@ -147,7 +147,6 @@ public class FightEffect extends DamageBaseEffect {
} }
private void dealDamage(final SpellAbility sa, Card fighterA, Card fighterB) { private void dealDamage(final SpellAbility sa, Card fighterA, Card fighterB) {
boolean fightToughness = sa.hasParam("FightWithToughness");
boolean usedDamageMap = true; boolean usedDamageMap = true;
CardDamageMap damageMap = sa.getDamageMap(); CardDamageMap damageMap = sa.getDamageMap();
@@ -168,11 +167,11 @@ public class FightEffect extends DamageBaseEffect {
// 701.12c If a creature fights itself, it deals damage to itself equal to twice its power. // 701.12c If a creature fights itself, it deals damage to itself equal to twice its power.
final int dmg1 = fightToughness ? fighterA.getNetToughness() : fighterA.getNetPower(); final int dmg1 = fighterA.getNetPower();
if (fighterA.equals(fighterB)) { if (fighterA.equals(fighterB)) {
damageMap.put(fighterA, fighterA, dmg1 * 2); damageMap.put(fighterA, fighterA, dmg1 * 2);
} else { } else {
final int dmg2 = fightToughness ? fighterB.getNetToughness() : fighterB.getNetPower(); final int dmg2 = fighterB.getNetPower();
damageMap.put(fighterA, fighterB, dmg1); damageMap.put(fighterA, fighterB, dmg1);
damageMap.put(fighterB, fighterA, dmg2); damageMap.put(fighterB, fighterA, dmg2);

View File

@@ -1,12 +1,9 @@
Name:Alpha Brawl Name:Alpha Brawl
ManaCost:6 R R ManaCost:6 R R
Types:Sorcery Types:Sorcery
A:SP$ Pump | Cost$ 6 R R | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | RememberTargets$ True | StackDescription$ None | SubAbility$ AlphaAttack | SpellDescription$ Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those creatures deals damage equal to its power to that creature. A:SP$ Pump | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | RememberTargets$ True | SubAbility$ AlphaAttack | StackDescription$ {c:Targeted} | SpellDescription$ Target creature an opponent controls
SVar:AlphaAttack:DB$ DamageAll | ValidCards$ Creature.IsNotRemembered+ControlledBy TargetedController | DamageSource$ Targeted | NumDmg$ Y | SubAbility$ SucksToBeAlpha | StackDescription$ Targeted creature deals damage equal to its power to each other creature that player controls, SVar:AlphaAttack:DB$ DamageAll | ValidCards$ Creature.IsNotRemembered+ControlledBy TargetedController | DamageSource$ Targeted | NumDmg$ Remembered$CardPower | SubAbility$ SucksToBeAlpha | StackDescription$ SpellDescription | SpellDescription$ deals damage equal to its power to each other creature that player controls,
SVar:SucksToBeAlpha:DB$ EachDamage | ValidCards$ Creature.IsNotRemembered+ControlledBy TargetedController | ValidDescription$ of those creatures | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Remembered | SubAbility$ DBCleanup | StackDescription$ then each of those creatures deals damage equal to its power to that creature SVar:SucksToBeAlpha:DB$ EachDamage | ValidCards$ Creature.IsNotRemembered+ControlledBy TargetedController | NumDmg$ Count$CardPower | Defined$ Remembered | SubAbility$ DBCleanup | StackDescription$ SpellDescription | SpellDescription$ then each of those creatures deals damage equal to its power to that creature.
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$CardPower
SVar:Y:Remembered$CardPower
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those creatures deals damage equal to its power to that creature. Oracle:Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those creatures deals damage equal to its power to that creature.

View File

@@ -1,10 +1,6 @@
Name:Band Together Name:Band Together
ManaCost:2 G ManaCost:2 G
Types:Instant Types:Instant
A:SP$ Pump | Cost$ 2 G | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select up to two target creatures you control | ImprintCards$ ThisTargetedCard | AILogic$ PowerDmg | SubAbility$ DBPump | TargetMin$ 0 | TargetMax$ 2 | StackDescription$ SpellDescription | SpellDescription$ Up to two target creatures you control each deal damage equal to their power to another target creature. A:SP$ Pump | TargetMin$ 0 | TargetMax$ 2 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select up to two target creatures you control | AILogic$ PowerDmg | SubAbility$ DBEachDamage | StackDescription$ {c:ThisTargetedCard} | SpellDescription$ Up to two target creatures you control
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature to be dealt damage | RememberObjects$ ThisTargetedCard | IsCurse$ True | SubAbility$ DBEachDamage | StackDescription$ None SVar:DBEachDamage:DB$ EachDamage | DefinedDamagers$ ParentTarget | ValidTgts$ Creature | TgtPrompt$ Select another target creature | TargetUnique$ True | NumDmg$ Count$CardPower | StackDescription$ REP another target creature_{c:ThisTargetedCard} | SpellDescription$ each deal damage equal to their power to another target creature.
SVar:DBEachDamage:DB$ EachDamage | ValidCards$ Creature.IsImprinted | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Remembered | SubAbility$ DBCleanup | StackDescription$ None
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:X:Count$CardPower
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
Oracle:Up to two target creatures you control each deal damage equal to their power to another target creature. Oracle:Up to two target creatures you control each deal damage equal to their power to another target creature.

View File

@@ -1,10 +1,6 @@
Name:Combo Attack Name:Combo Attack
ManaCost:2 G ManaCost:2 G
Types:Sorcery Types:Sorcery
A:SP$ Pump | Cost$ 2 G | ValidTgts$ Creature.YourTeamCtrl | TgtPrompt$ Select two target creatures your team controls | ImprintCards$ ThisTargetedCard | TargetMin$ 2 | TargetMax$ 2 | AILogic$ PowerDmg | SubAbility$ DBPump | StackDescription$ SpellDescription | SpellDescription$ Two target creatures your team controls each deal damage equal to their power to target creature. A:SP$ Pump | ValidTgts$ Creature.YourTeamCtrl | TgtPrompt$ Select two target creatures your team controls | TargetMin$ 2 | TargetMax$ 2 | SubAbility$ DBEachDamage | StackDescription$ {c:ThisTargetedCard} | SpellDescription$ Two target creatures your team controls
SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature to be dealt damage | RememberObjects$ ThisTargetedCard | IsCurse$ True | SubAbility$ DBEachDamage | StackDescription$ None SVar:DBEachDamage:DB$ EachDamage | ValidTgts$ Creature | DefinedDamagers$ ParentTarget | NumDmg$ Count$CardPower | StackDescription$ REP target creature_{c:ThisTargetedCard} | SpellDescription$ each deal damage equal to their power to target creature.
SVar:DBEachDamage:DB$ EachDamage | ValidCards$ Creature.IsImprinted | NumDmg$ X | DefinedCards$ Remembered | SubAbility$ DBCleanup | StackDescription$ None
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:X:Count$CardPower
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
Oracle:Two target creatures your team controls each deal damage equal to their power to target creature. Oracle:Two target creatures your team controls each deal damage equal to their power to target creature.

View File

@@ -1,7 +1,7 @@
Name:Grim Contest Name:Grim Contest
ManaCost:1 B G ManaCost:1 B G
Types:Instant Types:Instant
A:SP$ Pump | Cost$ 1 B G | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ DBFight | SpellDescription$ Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other. A:SP$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ DBEachDamage | StackDescription$ None | SpellDescription$ Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other.
SVar:DBFight:DB$ Fight | Defined$ ParentTarget | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose target creature an opponent controls | FightWithToughness$ True SVar:DBEachDamage:DB$ EachDamage | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose target creature an opponent controls | ToEachOther$ Targeted | NumDmg$ Count$CardToughness | StackDescription$ {c:Targeted} each deal damage equal to its toughness to the other.
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other. Oracle:Choose target creature you control and target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other.

View File

@@ -2,12 +2,8 @@ Name:Living Inferno
ManaCost:6 R R ManaCost:6 R R
Types:Creature Elemental Types:Creature Elemental
PT:8/5 PT:8/5
A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute damage to | NumDmg$ FirePower | TargetMin$ Min | TargetMax$ FirePower | DividedAsYouChoose$ FirePower | SubAbility$ Retribution | RememberTargets$ True | SpellDescription$ CARDNAME deals damage equal to its power divided as you choose among any number of target creatures. Each of those creatures deals damage equal to its power to CARDNAME. A:AB$ DealDamage | Cost$ T | ValidTgts$ Creature | TgtPrompt$ Select any number of target creatures | NumDmg$ Count$CardPower | TargetMin$ Min | TargetMax$ Count$CardPower | DividedAsYouChoose$ Count$CardPower | SubAbility$ Retribution | SpellDescription$ CARDNAME deals damage equal to its power divided as you choose among any number of target creatures.
SVar:Retribution:DB$ EachDamage | ValidCards$ Creature.IsRemembered | ValidDescription$ of those creatures | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedPlayers$ Self | SubAbility$ DBCleanup | StackDescription$ then each of those creatures deals damage equal to its power to CARDNAME SVar:Retribution:DB$ EachDamage | DefinedDamagers$ ParentTarget | NumDmg$ Count$CardPower | Defined$ Self | StackDescription$ SpellDescription | SpellDescription$ Each of those creatures deals damage equal to its power to CARDNAME.
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$CardPower
SVar:FirePower:Count$CardPower
SVar:Min:SVar$FirePower/LimitMax.1
AI:RemoveDeck:Random AI:RemoveDeck:Random
SVar:Min:Count$CardPower/LimitMax.1
Oracle:{T}: Living Inferno deals damage equal to its power divided as you choose among any number of target creatures. Each of those creatures deals damage equal to its power to Living Inferno. Oracle:{T}: Living Inferno deals damage equal to its power divided as you choose among any number of target creatures. Each of those creatures deals damage equal to its power to Living Inferno.

View File

@@ -1,8 +1,9 @@
Name:Nissa's Judgment Name:Nissa's Judgment
ManaCost:4 G ManaCost:4 G
Types:Sorcery Types:Sorcery
A:SP$ PutCounter | Cost$ 4 G | AILogic$ PowerDmg | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DealToCreature | SpellDescription$ Support 2. (Put a +1/+1 counter on each of up to two target creatures.) A:SP$ PutCounter | AILogic$ PowerDmg | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Select up to two target creatures | CounterType$ P1P1 | SubAbility$ DealToCreature | StackDescription$ REP ._. ({c:ThisTargetedCard}) | SpellDescription$ Support 2. (Put a +1/+1 counter on each of up to two target creatures.)
SVar:DealToCreature:DB$ EachDamage | AILogic$ PowerDmg | ValidCards$ Creature.YouCtrl+counters_GE1_P1P1 | NumDmg$ X | TgtPrompt$ Choose target creature opponent controls | ValidTgts$ Creature.OppCtrl | TargetMin$ 0 | TargetMax$ 1 | SpellDescription$ Each creature you control with a +1/+1 counter deals damage equal to its power to target creature opponent controls. SVar:DealToCreature:DB$ EachDamage | ValidCards$ Creature.YouCtrl+counters_GE1_P1P1 | NumDmg$ X | TgtPrompt$ Select up to one target creature an opponent controls | ValidTgts$ Creature.OppCtrl | TargetMin$ 0 | TargetMax$ 1 | StackDescription$ REP target creature opponent controls_{c:ThisTargetedCard} | SpellDescription$ Each creature you control with a +1/+1 counter deals damage equal to its power to target creature opponent controls.
SVar:X:Count$CardPower SVar:X:Count$CardPower
DeckHas:Ability$Counters
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:Support 2. (Put a +1/+1 counter on each of up to two target creatures.)\nChoose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature. Oracle:Support 2. (Put a +1/+1 counter on each of up to two target creatures.)\nChoose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal to its power to that creature.

View File

@@ -6,10 +6,8 @@ A:AB$ Dig | Cost$ AddCounter<0/LOYALTY> | DigNum$ 1 | Reveal$ True | ChangeNum$
SVar:DBDamage:DB$ DealDamage | Defined$ Self | NumDmg$ Y | SubAbility$ DBCleanup | AILogic$ MadSarkhanDigDmg SVar:DBDamage:DB$ DealDamage | Defined$ Self | NumDmg$ Y | SubAbility$ DBCleanup | AILogic$ MadSarkhanDigDmg
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:Remembered$CardManaCost SVar:Y:Remembered$CardManaCost
A:AB$ Destroy | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Creature | TgtPrompt$ Select target creature | Sacrifice$ True | SubAbility$ DBToken | Planeswalker$ True | AILogic$ MadSarkhanDragon | SpellDescription$ Target creature's controller sacrifices it, then that player creates a 5/5 red Dragon creature token with flying. A:AB$ Destroy | Cost$ SubCounter<2/LOYALTY> | ValidTgts$ Creature | Sacrifice$ True | SubAbility$ DBToken | Planeswalker$ True | AILogic$ MadSarkhanDragon | SpellDescription$ Target creature's controller sacrifices it, then that player creates a 5/5 red Dragon creature token with flying.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ r_5_5_dragon_flying | TokenOwner$ TargetedController SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ r_5_5_dragon_flying | TokenOwner$ TargetedController
#for this AF, the DefinedCards$ Self is the target for Each damaging. They EachDamage themselves. A:AB$ EachDamage | Cost$ SubCounter<4/LOYALTY> | Planeswalker$ True | Ultimate$ True | ValidCards$ Dragon.Creature+YouCtrl | ValidDescription$ Dragon creature you control | NumDmg$ Count$CardPower | DamageDesc$ damage equal to its power | ValidTgts$ Player,Planeswalker | TgtPrompt$ Select target player or planeswalker | AILogic$ MadSarkhanUltimate | SpellDescription$ Each Dragon creature you control deals damage equal to its power to target player or planeswalker.
A:AB$ EachDamage | Cost$ SubCounter<4/LOYALTY> | ValidCards$ Dragon.Creature+YouCtrl | ValidDescription$ Dragon creature you control | NumDmg$ X | DamageDesc$ damage equal to its power | ValidTgts$ Player,Planeswalker | TgtPrompt$ Select target player or planeswalker | Planeswalker$ True | Ultimate$ True | AILogic$ MadSarkhanUltimate | SpellDescription$ Each Dragon creature you control deals damage equal to its power to target player or planeswalker. DeckHas:Ability$Sacrifice|Token & Type$Dragon
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:X:Count$CardPower
Oracle:[0]: Reveal the top card of your library and put it into your hand. Sarkhan the Mad deals damage to himself equal to that card's mana value.\n[-2]: Target creature's controller sacrifices it, then that player creates a 5/5 red Dragon creature token with flying.\n[-4]: Each Dragon creature you control deals damage equal to its power to target player or planeswalker. Oracle:[0]: Reveal the top card of your library and put it into your hand. Sarkhan the Mad deals damage to himself equal to that card's mana value.\n[-2]: Target creature's controller sacrifices it, then that player creates a 5/5 red Dragon creature token with flying.\n[-4]: Each Dragon creature you control deals damage equal to its power to target player or planeswalker.

View File

@@ -3,8 +3,7 @@ ManaCost:3 R R
Types:Legendary Planeswalker Sarkhan Types:Legendary Planeswalker Sarkhan
Loyalty:5 Loyalty:5
T:Mode$ Attacks | ValidCard$ Creature | Attacked$ You,Planeswalker.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature attacks you or a planeswalker you control, each Dragon you control deals 1 damage to that creature. T:Mode$ Attacks | ValidCard$ Creature | Attacked$ You,Planeswalker.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature attacks you or a planeswalker you control, each Dragon you control deals 1 damage to that creature.
SVar:TrigDamage:DB$ EachDamage | ValidCards$ Dragon.YouCtrl | DefinedPlayers$ TriggeredAttacker | StackDescription$ Each Dragon you control deals 1 damage to that creature. SVar:TrigDamage:DB$ EachDamage | ValidCards$ Dragon.YouCtrl | NumDmg$ 1 | Defined$ TriggeredAttacker
SVar:X:Number$1
A:AB$ AnimateAll | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Power$ 4 | Toughness$ 4 | Types$ Creature,Dragon | Colors$ Red | OverwriteColors$ True | RemoveCardTypes$ True | Keywords$ Flying | ValidCards$ Planeswalker.YouCtrl | AILogic$ Always | SpellDescription$ Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying. A:AB$ AnimateAll | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Power$ 4 | Toughness$ 4 | Types$ Creature,Dragon | Colors$ Red | OverwriteColors$ True | RemoveCardTypes$ True | Keywords$ Flying | ValidCards$ Planeswalker.YouCtrl | AILogic$ Always | SpellDescription$ Until end of turn, each planeswalker you control becomes a 4/4 red Dragon creature and gains flying.
A:AB$ Token | Cost$ SubCounter<3/LOYALTY> | TokenAmount$ 1 | TokenScript$ r_4_4_dragon_flying | TokenOwner$ You | Planeswalker$ True | SpellDescription$ Create a 4/4 red Dragon creature token with flying. A:AB$ Token | Cost$ SubCounter<3/LOYALTY> | TokenAmount$ 1 | TokenScript$ r_4_4_dragon_flying | TokenOwner$ You | Planeswalker$ True | SpellDescription$ Create a 4/4 red Dragon creature token with flying.
DeckHas:Ability$Token DeckHas:Ability$Token

View File

@@ -1,8 +1,7 @@
Name:Solar Blaze Name:Solar Blaze
ManaCost:2 R W ManaCost:2 R W
Types:Sorcery Types:Sorcery
A:SP$ EachDamage | Cost$ 2 R W | ValidCards$ Creature | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Self | SpellDescription$ Each creature deals damage to itself equal to its power. A:SP$ EachDamage | ValidCards$ Creature | EachToItself$ True | NumDmg$ Count$CardPower | StackDescription$ SpellDescription | SpellDescription$ Each creature deals damage to itself equal to its power.
SVar:X:Count$CardPower
AI:RemoveDeck:All AI:RemoveDeck:All
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:Each creature deals damage to itself equal to its power. Oracle:Each creature deals damage to itself equal to its power.

View File

@@ -5,6 +5,5 @@ K:Saga:3:DBGainControl,DBAllAttack,DBDamageTapped
SVar:DBGainControl:DB$ GainControl | ValidTgts$ Creature | TgtPrompt$ Select target creature | LoseControl$ LeavesPlay | SpellDescription$ Gain control of target creature for as long as CARDNAME remains on the battlefield. SVar:DBGainControl:DB$ GainControl | ValidTgts$ Creature | TgtPrompt$ Select target creature | LoseControl$ LeavesPlay | SpellDescription$ Gain control of target creature for as long as CARDNAME remains on the battlefield.
SVar:DBAllAttack:DB$ Effect | Duration$ UntilYourNextTurn | StaticAbilities$ MustAttack | SpellDescription$ Until your next turn, creatures your opponents control attack each combat if able. SVar:DBAllAttack:DB$ Effect | Duration$ UntilYourNextTurn | StaticAbilities$ MustAttack | SpellDescription$ Until your next turn, creatures your opponents control attack each combat if able.
SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Creature.OppCtrl | Description$ Until your next turn, creatures your opponents control attack each combat if able. SVar:MustAttack:Mode$ MustAttack | ValidCreature$ Creature.OppCtrl | Description$ Until your next turn, creatures your opponents control attack each combat if able.
SVar:DBDamageTapped:DB$ EachDamage | ValidCards$ Creature.tapped | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Self | SpellDescription$ Each tapped creature deals damage to itself equal to its power. SVar:DBDamageTapped:DB$ EachDamage | ValidCards$ Creature.tapped | NumDmg$ Count$CardPower | EachToItself$ True | SpellDescription$ Each tapped creature deals damage to itself equal to its power.
SVar:X:Count$CardPower
Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Gain control of target creature for as long as The Akroan War remains on the battlefield.\nII — Until your next turn, creatures your opponents control attack each combat if able.\nIII — Each tapped creature deals damage to itself equal to its power. Oracle:(As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)\nI — Gain control of target creature for as long as The Akroan War remains on the battlefield.\nII — Until your next turn, creatures your opponents control attack each combat if able.\nIII — Each tapped creature deals damage to itself equal to its power.

View File

@@ -0,0 +1,6 @@
Name:Tandem Takedown
ManaCost:1 G G
Types:Instant
A:SP$ Pump | TargetMin$ 0 | TargetMax$ 2 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select up to two target creatures you control | NumAtt$ +1 | AILogic$ PowerDmg | SubAbility$ DBEachDamage | StackDescription$ REP Up to two target creatures you control_{c:ThisTargetedCard} | SpellDescription$ Up to two target creatures you control each get +1/+0 until end of turn.
SVar:DBEachDamage:DB$ EachDamage | ValidTgts$ Creature,Planeswalker,Battle | TgtPrompt$ Select another target creature, planeswalker, or battle | TargetUnique$ True | DefinedDamagers$ ParentTarget | NumDmg$ Count$CardPower | StackDescription$ REP another target creature, planeswalker, or battle_{c:ThisTargetedCard} | SpellDescription$ They each deal damage equal to their power to another target creature, planeswalker, or battle.
Oracle:Up to two target creatures you control each get +1/+0 until end of turn. They each deal damage equal to their power to another target creature, planeswalker, or battle.

View File

@@ -0,0 +1,11 @@
Name:The Great Aerie
ManaCost:no cost
Types:Plane Tarkir
T:Mode$ PlaneswalkedTo | ValidCard$ Card.Self | Execute$ TrigBolster | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your upkeep, bolster 3. (Choose a creature with the least toughness among creatures you control and put three +1/+1 counters on it.)
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigBolster | TriggerZones$ Command | Secondary$ True | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your upkeep, bolster 3. (Choose a creature with the least toughness among creatures you control and put three +1/+1 counters on it.)
SVar:TrigBolster:DB$ PutCounter | Bolster$ True | CounterNum$ 3 | CounterType$ P1P1
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever chaos ensues, choose up to one target creature you control and up to one target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other.
SVar:RolledChaos:DB$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Choose up to one target creature you control | TargetMin$ 0 | TargetMax$ 1 | SubAbility$ DBEachDamage
SVar:DBEachDamage:DB$ EachDamage | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Choose up to one target creature an opponent controls | TargetMin$ 0 | TargetMax$ 1 | ToEachOther$ Targeted | NumDmg$ Count$CardToughness
DeckHas:Ability$Counters
Oracle:When you planeswalk to The Great Aerie and at the beginning of your upkeep, bolster 3. (Choose a creature with the least toughness among creatures you control and put three +1/+1 counters on it.)\nWhenever chaos ensues, choose up to one target creature you control and up to one target creature an opponent controls. Each of those creatures deals damage equal to its toughness to the other.

View File

@@ -1,9 +1,7 @@
Name:Wave of Reckoning Name:Wave of Reckoning
ManaCost:4 W ManaCost:4 W
Types:Sorcery Types:Sorcery
#for this AF, the DefinedCards$ Self is the target for Each damaging. They EachDamage themselves. A:SP$ EachDamage | ValidCards$ Creature | EachToItself$ True | NumDmg$ Count$CardPower | StackDescription$ SpellDescription | SpellDescription$ Each creature deals damage to itself equal to its power.
A:SP$ EachDamage | Cost$ 4 W | ValidCards$ Creature | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Self | SpellDescription$ Each creature deals damage to itself equal to its power.
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
SVar:X:Count$CardPower SVar:X:Count$CardPower
AI:RemoveDeck:All AI:RemoveDeck:All
AI:RemoveDeck:Random AI:RemoveDeck:Random