mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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
|
||||
Types:Artifact
|
||||
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:Picture:http://www.wizards.com/global/images/magic/general/heartstone.jpg
|
||||
SetInfo:STH|Uncommon|http://magiccards.info/scans/en/sh/128.jpg
|
||||
|
||||
@@ -2,8 +2,8 @@ Name:Power Artifact
|
||||
ManaCost:U U
|
||||
Types:Enchantment Aura
|
||||
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
|
||||
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
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -2,7 +2,7 @@ Name:Training Grounds
|
||||
ManaCost:U
|
||||
Types:Enchantment
|
||||
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:Picture:http://www.wizards.com/global/images/magic/general/training_grounds.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.spellability.SpellAbility;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
|
||||
/**
|
||||
* The Class StaticAbility_CantBeCast.
|
||||
@@ -80,6 +81,10 @@ public class StaticAbilityCostChange {
|
||||
*/
|
||||
public static ManaCost applyReduceCostAbility(final StaticAbility staticAbility, final SpellAbility sa
|
||||
, final ManaCost originalCost) {
|
||||
//Can't reduce zero cost
|
||||
if (originalCost.toString().equals("0")) {
|
||||
return originalCost;
|
||||
}
|
||||
final HashMap<String, String> params = staticAbility.getMapParams();
|
||||
final Card hostCard = staticAbility.getHostCard();
|
||||
final Player activator = sa.getActivatingPlayer();
|
||||
@@ -101,6 +106,9 @@ public class StaticAbilityCostChange {
|
||||
if (params.containsKey("Type") && params.get("Type").equals("Ability") && !sa.isAbility()) {
|
||||
return originalCost;
|
||||
}
|
||||
if (params.containsKey("AffectedZone") && !card.isInZone(ZoneType.smartValueOf("AffectedZone"))) {
|
||||
return originalCost;
|
||||
}
|
||||
|
||||
if (!"WUGRB".contains(amount)) {
|
||||
int value = 0;
|
||||
@@ -111,8 +119,12 @@ public class StaticAbilityCostChange {
|
||||
}
|
||||
|
||||
manaCost.decreaseColorlessMana(value);
|
||||
if (manaCost.toString().equals("0") && params.containsKey("MinMana")) {
|
||||
manaCost.increaseColorlessMana(Integer.valueOf(params.get("MinMana")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return manaCost;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user