mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Converted Heartstone, Power Artifact and Training Grounds to StAb ReduceCost.
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Heartstone
|
|||||||
ManaCost:3
|
ManaCost:3
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
Text:no text
|
Text:no text
|
||||||
K:CostChange:Player:Less:1:Ability:All:Creature:TargetInPlay:Activated abilities of creatures you control cost 1 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 1 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost 1 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartstone.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/heartstone.jpg
|
||||||
SetInfo:STH|Uncommon|http://magiccards.info/scans/en/sh/128.jpg
|
SetInfo:STH|Uncommon|http://magiccards.info/scans/en/sh/128.jpg
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Name:Power Artifact
|
|||||||
ManaCost:U U
|
ManaCost:U U
|
||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:no text
|
Text:no text
|
||||||
K:CostChange:Player:Less:2:Enchanted:All:Artifact:TargetInPlay:Enchanted artifact's activated abilities cost 2 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
|
||||||
K:Enchant artifact
|
K:Enchant artifact
|
||||||
|
S:Mode$ ReduceCost | ValidCard$ Artifact.EnchantedBy | Type$ Ability | Amount$ 2 | MinMana$ 1 | Description$ Enchanted artifact's activated abilities cost 2 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
A:SP$ Attach | Cost$ U U | ValidTgts$ Artifact | AILogic$ Pump
|
A:SP$ Attach | Cost$ U U | ValidTgts$ Artifact | AILogic$ Pump
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Training Grounds
|
|||||||
ManaCost:U
|
ManaCost:U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:no text
|
Text:no text
|
||||||
K:CostChange:Player:Less:2:Ability:All:Creature:TargetInPlay:Activated abilities of creatures you control cost up to 2 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 2 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost 2 less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/training_grounds.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/training_grounds.jpg
|
||||||
SetInfo:ROE|Rare|http://magiccards.info/scans/en/roe/91.jpg
|
SetInfo:ROE|Rare|http://magiccards.info/scans/en/roe/91.jpg
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import forge.card.cardfactory.CardFactoryUtil;
|
|||||||
import forge.card.mana.ManaCost;
|
import forge.card.mana.ManaCost;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
|
import forge.game.zone.ZoneType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class StaticAbility_CantBeCast.
|
* The Class StaticAbility_CantBeCast.
|
||||||
@@ -80,6 +81,10 @@ public class StaticAbilityCostChange {
|
|||||||
*/
|
*/
|
||||||
public static ManaCost applyReduceCostAbility(final StaticAbility staticAbility, final SpellAbility sa
|
public static ManaCost applyReduceCostAbility(final StaticAbility staticAbility, final SpellAbility sa
|
||||||
, final ManaCost originalCost) {
|
, final ManaCost originalCost) {
|
||||||
|
//Can't reduce zero cost
|
||||||
|
if (originalCost.toString().equals("0")) {
|
||||||
|
return originalCost;
|
||||||
|
}
|
||||||
final HashMap<String, String> params = staticAbility.getMapParams();
|
final HashMap<String, String> params = staticAbility.getMapParams();
|
||||||
final Card hostCard = staticAbility.getHostCard();
|
final Card hostCard = staticAbility.getHostCard();
|
||||||
final Player activator = sa.getActivatingPlayer();
|
final Player activator = sa.getActivatingPlayer();
|
||||||
@@ -101,6 +106,9 @@ public class StaticAbilityCostChange {
|
|||||||
if (params.containsKey("Type") && params.get("Type").equals("Ability") && !sa.isAbility()) {
|
if (params.containsKey("Type") && params.get("Type").equals("Ability") && !sa.isAbility()) {
|
||||||
return originalCost;
|
return originalCost;
|
||||||
}
|
}
|
||||||
|
if (params.containsKey("AffectedZone") && !card.isInZone(ZoneType.smartValueOf("AffectedZone"))) {
|
||||||
|
return originalCost;
|
||||||
|
}
|
||||||
|
|
||||||
if (!"WUGRB".contains(amount)) {
|
if (!"WUGRB".contains(amount)) {
|
||||||
int value = 0;
|
int value = 0;
|
||||||
@@ -111,8 +119,12 @@ public class StaticAbilityCostChange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
manaCost.decreaseColorlessMana(value);
|
manaCost.decreaseColorlessMana(value);
|
||||||
|
if (manaCost.toString().equals("0") && params.containsKey("MinMana")) {
|
||||||
|
manaCost.increaseColorlessMana(Integer.valueOf(params.get("MinMana")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return manaCost;
|
return manaCost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user