mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Adding Stackable Flag for Effects that don't Stack if there are more than one.
This commit is contained in:
@@ -6,7 +6,7 @@ Loyalty:3
|
|||||||
A:AB$ Untap | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Mountain | TgtPrompt$ Select target Mountain | SubAbility$ DBAnimate | SpellDescription$ Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land.
|
A:AB$ Untap | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Mountain | TgtPrompt$ Select target Mountain | SubAbility$ DBAnimate | SpellDescription$ Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land.
|
||||||
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Power$ 4 | Toughness$ 4 | Types$ Creature,Elemental | Colors$ Red
|
SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Power$ 4 | Toughness$ 4 | Types$ Creature,Elemental | Colors$ Red
|
||||||
A:AB$ Mana | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Produced$ R | Amount$ X | SpellDescription$ Add R to your mana pool for each Mountain you control.
|
A:AB$ Mana | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Produced$ R | Amount$ X | SpellDescription$ Add R to your mana pool for each Mountain you control.
|
||||||
A:AB$ Effect | Cost$ SubCounter<5/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Koth of the Hammer emblem | StaticAbilities$ STDamage | SVars$ ABDealDamage | Duration$ Permanent | SpellDescription$ You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player."
|
A:AB$ Effect | Cost$ SubCounter<5/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Koth of the Hammer emblem | Stackable$ False | StaticAbilities$ STDamage | SVars$ ABDealDamage | Duration$ Permanent | SpellDescription$ You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player."
|
||||||
SVar:STDamage:Mode$ Continuous | Affected$ Mountain.YouCtrl | AddAbility$ ABDealDamage | AffectedZone$ Battlefield
|
SVar:STDamage:Mode$ Continuous | Affected$ Mountain.YouCtrl | AddAbility$ ABDealDamage | AffectedZone$ Battlefield
|
||||||
SVar:ABDealDamage:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ Deal 1 damage to target creature or player
|
SVar:ABDealDamage:AB$ DealDamage | Cost$ T | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | NumDmg$ 1 | SpellDescription$ Deal 1 damage to target creature or player
|
||||||
SVar:X:Count$Valid Mountain.YouCtrl
|
SVar:X:Count$Valid Mountain.YouCtrl
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ import java.util.Random;
|
|||||||
import forge.AllZone;
|
import forge.AllZone;
|
||||||
import forge.AllZoneUtil;
|
import forge.AllZoneUtil;
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
|
import forge.CardList;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.ComputerUtil;
|
import forge.ComputerUtil;
|
||||||
import forge.MyRandom;
|
import forge.MyRandom;
|
||||||
import forge.Player;
|
import forge.Player;
|
||||||
|
import forge.Constant.Zone;
|
||||||
import forge.card.spellability.Ability_Activated;
|
import forge.card.spellability.Ability_Activated;
|
||||||
import forge.card.spellability.Ability_Sub;
|
import forge.card.spellability.Ability_Sub;
|
||||||
import forge.card.spellability.Spell;
|
import forge.card.spellability.Spell;
|
||||||
@@ -191,6 +193,20 @@ public class AbilityFactory_Effect {
|
|||||||
*/
|
*/
|
||||||
public static boolean effectCanPlayAI(final AbilityFactory af, final SpellAbility sa) {
|
public static boolean effectCanPlayAI(final AbilityFactory af, final SpellAbility sa) {
|
||||||
Random r = MyRandom.random;
|
Random r = MyRandom.random;
|
||||||
|
HashMap<String, String> params = af.getMapParams();
|
||||||
|
|
||||||
|
String stackable = params.get("Stackable");
|
||||||
|
|
||||||
|
if (stackable != null && stackable.equals("False")) {
|
||||||
|
String name = params.get("Name");
|
||||||
|
if (name == null) {
|
||||||
|
name = sa.getSourceCard().getName() + "'s Effect";
|
||||||
|
}
|
||||||
|
CardList list = sa.getActivatingPlayer().getCardsIn(Zone.Battlefield, name);
|
||||||
|
if (list.size() != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Target tgt = sa.getTarget();
|
Target tgt = sa.getTarget();
|
||||||
if (tgt != null) {
|
if (tgt != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user