mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Converted Living Artifact to script.
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
Name:Living Artifact
|
Name:Living Artifact
|
||||||
ManaCost:G
|
ManaCost:G
|
||||||
Types:Enchantment Aura
|
Types:Enchantment Aura
|
||||||
Text:Whenever you're dealt damage, put that many vitality counters on CARDNAME.
|
Text:no text
|
||||||
K:Enchant Artifact
|
K:Enchant Artifact
|
||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | IsPresent$ Card.Self+countersGE1VITALITY | OptionalDecider$ You | Execute$ TrigRemoveCounter | TriggerDescription$ At the beginning of your upkeep, you may remove a vitality counter from CARDNAME. If you do, you gain 1 life.
|
T:Mode$ DamageDone | ValidTarget$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever you're dealt damage, put that many vitality counters on CARDNAME.
|
||||||
SVar:TrigRemoveCounter:AB$RemoveCounter | Cost$ 0 | Defined$ Self | CounterType$ VITALITY | CounterNum$ 1 | SubAbility$ SVar=DBGainLife
|
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ VITALITY | CounterNum$ X
|
||||||
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 1
|
SVar:X:Count$TriggeredDamageAmount
|
||||||
SVar:RemAIDeck:True
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGainLife | IsPresent$ Card.Self+countersGE1VITALITY | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may remove a vitality counter from CARDNAME. If you do, you gain 1 life.
|
||||||
|
SVar:TrigGainLife:AB$GainLife | Cost$ SubCounter<1/VITALITY> | Defined$ You | LifeAmount$ 1
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/living_artifact.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/living_artifact.jpg
|
||||||
SetInfo:LEA|Rare|http://magiccards.info/scans/en/al/117.jpg
|
SetInfo:LEA|Rare|http://magiccards.info/scans/en/al/117.jpg
|
||||||
|
|||||||
@@ -2527,28 +2527,11 @@ public class GameActionUtil {
|
|||||||
|
|
||||||
if(c.getName().equals("Whirling Dervish") || c.getName().equals("Dunerider Outlaw"))
|
if(c.getName().equals("Whirling Dervish") || c.getName().equals("Dunerider Outlaw"))
|
||||||
playerCombatDamage_Whirling_Dervish(c);
|
playerCombatDamage_Whirling_Dervish(c);
|
||||||
else if(AllZoneUtil.isCardInPlay("Living Artifact", player)) execute_Living_Artifact(player, damage);
|
|
||||||
|
|
||||||
if (player.isPlayer(AllZone.HumanPlayer)) c.setDealtDmgToHumanThisTurn(true);
|
if (player.isPlayer(AllZone.HumanPlayer)) c.setDealtDmgToHumanThisTurn(true);
|
||||||
if (player.isPlayer(AllZone.ComputerPlayer)) c.setDealtDmgToComputerThisTurn(true);
|
if (player.isPlayer(AllZone.ComputerPlayer)) c.setDealtDmgToComputerThisTurn(true);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void execute_Living_Artifact(final Player p, final int num) {
|
|
||||||
CardList las = AllZoneUtil.getPlayerCardsInPlay(p, "Living Artifact");
|
|
||||||
for(final Card la:las) {
|
|
||||||
Ability addCounter = new Ability(la, "0") {
|
|
||||||
public void resolve() {
|
|
||||||
la.addCounter(Counters.VITALITY, num);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
addCounter.setStackDescription(la.getName()+" - Put "+num+" vitality counters on "+la);
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(addCounter);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//restricted to combat damage, restricted to players
|
//restricted to combat damage, restricted to players
|
||||||
public static void executeCombatDamageToPlayerEffects(final Player player, final Card c, final int damage) {
|
public static void executeCombatDamageToPlayerEffects(final Player player, final Card c, final int damage) {
|
||||||
|
|||||||
Reference in New Issue
Block a user