mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Converted Alpha Status to script
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
Name:Alpha Status
|
||||
ManaCost:2 G
|
||||
Types:Enchantment Aura
|
||||
Text:Enchant Creature \r\nEnchanted creatures gets +2/+2 for each other creature on the battlefield that shares a creature type with it.
|
||||
A:SP$Attach | Cost$ 2 G | ValidTgts$ Creature | AILogic$ Pump
|
||||
Text:no text
|
||||
K:Enchant Creature
|
||||
A:SP$ Attach | Cost$ 2 G | ValidTgts$ Creature | AILogic$ Pump
|
||||
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ AffectedX | AddToughness$ AffectedX | References$ AffectedX | EffectZone$ Battlefield | Description$ Enchanted creature gets +2/+2 for each other creature on the battlefield that shares a creature type with it.
|
||||
SVar:AffectedX:Count$Valid Creature.sharesCreatureTypeWith+Other/Times.2
|
||||
SVar:PlayMain1:TRUE
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/alpha_status.jpg
|
||||
|
||||
@@ -946,48 +946,6 @@ public final class GameActionUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static Command alphaStatus = new Command() {
|
||||
private static final long serialVersionUID = -3213793711304934358L;
|
||||
|
||||
private final List<Card> previouslyPumped = new ArrayList<Card>();
|
||||
private final ArrayList<Integer> previouslyPumpedValue = new ArrayList<Integer>();
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
final List<Card> alphaStatuses = CardLists.filter(Singletons.getModel().getGame()
|
||||
.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Alpha Status"));
|
||||
final List<Card> allCreatures = CardLists.filter(Singletons.getModel().getGame()
|
||||
.getCardsIn(ZoneType.Battlefield), Presets.CREATURES);
|
||||
|
||||
for (int i = 0; i < this.previouslyPumped.size(); i++) {
|
||||
this.previouslyPumped.get(i).addSemiPermanentAttackBoost(0 - this.previouslyPumpedValue.get(i));
|
||||
this.previouslyPumped.get(i).addSemiPermanentDefenseBoost(0 - this.previouslyPumpedValue.get(i));
|
||||
}
|
||||
this.previouslyPumped.clear();
|
||||
this.previouslyPumpedValue.clear();
|
||||
|
||||
for (final Card alpha : alphaStatuses) {
|
||||
final Card enchanted = alpha.getEnchantingCard();
|
||||
if (enchanted == null) {
|
||||
continue;
|
||||
}
|
||||
int totalbuff = 0;
|
||||
|
||||
for (final Card othercreat : allCreatures) {
|
||||
if (!enchanted.equals(othercreat) && othercreat.sharesCreatureTypeWith(enchanted)) {
|
||||
totalbuff += 2;
|
||||
}
|
||||
}
|
||||
|
||||
enchanted.addSemiPermanentAttackBoost(totalbuff);
|
||||
enchanted.addSemiPermanentDefenseBoost(totalbuff);
|
||||
this.previouslyPumped.add(enchanted);
|
||||
this.previouslyPumpedValue.add(totalbuff);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/** stores the Command. */
|
||||
private static Command umbraStalker = new Command() {
|
||||
private static final long serialVersionUID = -3500747003228938898L;
|
||||
@@ -1146,7 +1104,6 @@ public final class GameActionUtil {
|
||||
static {
|
||||
// Please add cards in alphabetical order so they are easier to find
|
||||
|
||||
GameActionUtil.getCommands().put("Alpha_Status", GameActionUtil.alphaStatus);
|
||||
GameActionUtil.getCommands().put("Liu_Bei", GameActionUtil.liuBei);
|
||||
GameActionUtil.getCommands().put("Old_Man_of_the_Sea", GameActionUtil.oldManOfTheSea);
|
||||
GameActionUtil.getCommands().put("Tarmogoyf", GameActionUtil.tarmogoyf);
|
||||
|
||||
@@ -286,7 +286,6 @@ public class StaticEffects {
|
||||
// value has to be an array, since certain cards have multiple commands
|
||||
// associated with them
|
||||
|
||||
StaticEffects.cardToEffectsList.put("Alpha Status", new String[] { "Alpha_Status" });
|
||||
StaticEffects.cardToEffectsList.put("Liu Bei, Lord of Shu", new String[] { "Liu_Bei" });
|
||||
StaticEffects.cardToEffectsList.put("Old Man of the Sea", new String[] { "Old_Man_of_the_Sea" });
|
||||
StaticEffects.cardToEffectsList.put("Tarmogoyf", new String[] { "Tarmogoyf" });
|
||||
|
||||
Reference in New Issue
Block a user