mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
*Added initial Radiance parameter to AF_DealDamage.
*Converted Wojek Embermage to script. *Converted Cleansing Beam to Radiance parameter. *Fixed one of the Haunt triggers, previously it would bug the AIs ETB trigger evaluation. *Added Count$DamageDoneThisTurn *Added Brightflame
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -964,6 +964,7 @@ res/cardsfolder/b/briarhorn.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/b/briarknit_kami.txt svneol=native#text/plain
|
res/cardsfolder/b/briarknit_kami.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bribery.txt svneol=native#text/plain
|
res/cardsfolder/b/bribery.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/bridge_from_below.txt svneol=native#text/plain
|
res/cardsfolder/b/bridge_from_below.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/b/brightflame.txt -text
|
||||||
res/cardsfolder/b/brighthearth_banneret.txt svneol=native#text/plain
|
res/cardsfolder/b/brighthearth_banneret.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/brightstone_ritual.txt svneol=native#text/plain
|
res/cardsfolder/b/brightstone_ritual.txt svneol=native#text/plain
|
||||||
res/cardsfolder/b/brilliant_halo.txt svneol=native#text/plain
|
res/cardsfolder/b/brilliant_halo.txt svneol=native#text/plain
|
||||||
|
|||||||
9
res/cardsfolder/b/brightflame.txt
Normal file
9
res/cardsfolder/b/brightflame.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Brightflame
|
||||||
|
ManaCost:X R R W W
|
||||||
|
Types:Sorcery
|
||||||
|
Text:no text
|
||||||
|
A:SP$DealDamage | Cost$ X R R W W | ValidTgts$ Creature | Radiance$ True | NumDmg$ X | SubAbility$ DBGainLife | SpellDescription$ Radiance - Brightflame deals X damage to target creature and each other creature that shares a color with it. You gain life equal to the damage dealt this way.
|
||||||
|
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ Y
|
||||||
|
SVar:X:Count$xPaid
|
||||||
|
SVar:Y:Count$DamageDoneThisTurn
|
||||||
|
End
|
||||||
@@ -2,9 +2,7 @@ Name:Cleansing Beam
|
|||||||
ManaCost:4 R
|
ManaCost:4 R
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
Text:no text
|
||||||
A:SP$ DealDamage | Cost$ 4 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ 2 | SubAbility$ SVar=DBDamageAll | RememberTargets$ True | ForgetOtherTargets$ True | SpellDescription$ Radiance - CARDNAME deals 2 damage to target creature and each other creature that shares a color with it.
|
A:SP$ DealDamage | Cost$ 4 R | ValidTgts$ Creature | Radiance$ True | TgtPrompt$ Select target creature | NumDmg$ 2 | SpellDescription$ Radiance - CARDNAME deals 2 damage to target creature and each other creature that shares a color with it.
|
||||||
SVar:DBDamageAll:DB$DamageAll | NumDmg$ 2 | ValidCards$ Remembered.Creature+Other+SharesColorWith | SubAbility$ DBCleanup
|
|
||||||
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
|
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cleansing_beam.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cleansing_beam.jpg
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ ManaCost:3 R
|
|||||||
Types:Creature Human Wizard
|
Types:Creature Human Wizard
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:1/2
|
PT:1/2
|
||||||
|
A:AB$DealDamage | Cost$ T | ValidTgts$ Creature | Radiance$ True | PreCostDesc$ Radiance - | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature and each other creature that shares a color with it.
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/wojek_embermage.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/wojek_embermage.jpg
|
||||||
SetInfo:RAV|Uncommon|http://magiccards.info/scans/en/rav/152.jpg
|
SetInfo:RAV|Uncommon|http://magiccards.info/scans/en/rav/152.jpg
|
||||||
|
|||||||
@@ -6203,4 +6203,13 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
haunting = c;
|
haunting = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final int getDamageDoneThisTurn() {
|
||||||
|
int sum = 0;
|
||||||
|
for(Card c : dealtDamageToThisTurn.keySet()) {
|
||||||
|
sum += dealtDamageToThisTurn.get(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
} //end Card class
|
} //end Card class
|
||||||
|
|||||||
@@ -606,6 +606,23 @@ public class AbilityFactory_DealDamage {
|
|||||||
|
|
||||||
boolean targeted = (AF.getAbTgt() != null);
|
boolean targeted = (AF.getAbTgt() != null);
|
||||||
|
|
||||||
|
if(params.containsKey("Radiance") && targeted) {
|
||||||
|
Card origin = null;
|
||||||
|
for(int i = 0; i< tgts.size();i++)
|
||||||
|
{
|
||||||
|
if(tgts.get(i) instanceof Card) {
|
||||||
|
origin = (Card)tgts.get(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(origin != null) //Can't radiate from a player
|
||||||
|
{
|
||||||
|
for(Card c : CardUtil.getRadiance(AF.getHostCard(), origin, params.get("ValidTgts").split(","))) {
|
||||||
|
tgts.add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<Card> definedSources = AbilityFactory.getDefinedCards(saMe.getSourceCard(), params.get("DamageSource"), saMe);
|
ArrayList<Card> definedSources = AbilityFactory.getDefinedCards(saMe.getSourceCard(), params.get("DamageSource"), saMe);
|
||||||
Card source = definedSources.get(0);
|
Card source = definedSources.get(0);
|
||||||
|
|
||||||
|
|||||||
@@ -2931,6 +2931,10 @@ public class CardFactoryUtil {
|
|||||||
return doXMath(Phase.getStormCount() - 1, m, c);
|
return doXMath(Phase.getStormCount() - 1, m, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(sq[0].equals("DamageDoneThisTurn")) {
|
||||||
|
return doXMath(c.getDamageDoneThisTurn(), m, c);
|
||||||
|
}
|
||||||
|
|
||||||
CardList someCards = new CardList();
|
CardList someCards = new CardList();
|
||||||
|
|
||||||
// Complex counting methods
|
// Complex counting methods
|
||||||
@@ -4791,7 +4795,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
card.getKeyword().remove(hauntPos);
|
card.getKeyword().remove(hauntPos);
|
||||||
|
|
||||||
//First, create trigger that runs when the haunter dies (if it's a creature)
|
//First, create trigger that runs when the haunter goes to the graveyard
|
||||||
Trigger haunterDies = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Static$ True | Secondary$ True | TriggerDescription$ Blank", card, true);
|
Trigger haunterDies = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Static$ True | Secondary$ True | TriggerDescription$ Blank", card, true);
|
||||||
|
|
||||||
final Ability haunterDies_Work = new Ability(card,"0") {
|
final Ability haunterDies_Work = new Ability(card,"0") {
|
||||||
@@ -4871,7 +4875,7 @@ public class CardFactoryUtil {
|
|||||||
Trigger haunterETB = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ " + hauntSVarName + " | Secondary$ True | TriggerDescription$ " + hauntDescription, card, true);
|
Trigger haunterETB = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ " + hauntSVarName + " | Secondary$ True | TriggerDescription$ " + hauntDescription, card, true);
|
||||||
|
|
||||||
//Fourth, create a trigger that removes the haunting status if the haunter leaves the exile
|
//Fourth, create a trigger that removes the haunting status if the haunter leaves the exile
|
||||||
Trigger haunterUnExiled = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Origin$ Exile | ValidCard$ Card.Self | Static$ True | Secondary$ True | TriggerDescription$ Blank", card, true);
|
Trigger haunterUnExiled = forge.card.trigger.TriggerHandler.parseTrigger("Mode$ ChangesZone | Origin$ Exile | Destination$ Any | ValidCard$ Card.Self | Static$ True | Secondary$ True | TriggerDescription$ Blank", card, true);
|
||||||
|
|
||||||
Ability haunterUnExiled_Work = new Ability(card,"0") {
|
Ability haunterUnExiled_Work = new Ability(card,"0") {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -686,63 +686,6 @@ public class CardFactory_Creatures {
|
|||||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if (cardName.equals("Wojek Embermage")) {
|
|
||||||
Cost abCost = new Cost("T", cardName, true);
|
|
||||||
Target tgt = new Target(card, "TgtC");
|
|
||||||
final Ability_Activated ability = new Ability_Activated(card, abCost, tgt) {
|
|
||||||
private static final long serialVersionUID = -1208482961653326721L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return (CardFactoryUtil.AI_getHumanCreature(1, card, true).size() != 0)
|
|
||||||
&& (AllZone.getPhase().getPhase().equals(Constant.Phase.Main2));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
CardList list = CardFactoryUtil.AI_getHumanCreature(1, card, true);
|
|
||||||
list.shuffle();
|
|
||||||
setTargetCard(list.get(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
if (AllZoneUtil.isCardInPlay(getTargetCard())
|
|
||||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
|
||||||
CardList list = getRadiance(getTargetCard());
|
|
||||||
for (int i = 0; i < list.size(); i++) {
|
|
||||||
list.get(i).addDamage(1, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
//parameter Card c, is included in CardList
|
|
||||||
//no multi-colored cards
|
|
||||||
CardList getRadiance(Card c) {
|
|
||||||
if (CardUtil.getColors(c).contains(Constant.Color.Colorless)) {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.add(c);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
CardList sameColor = new CardList();
|
|
||||||
CardList list = AllZoneUtil.getCreaturesInPlay();
|
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); i++)
|
|
||||||
if (list.get(i).sharesColorWith(c)) sameColor.add(list.get(i));
|
|
||||||
|
|
||||||
return sameColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
};//SpellAbility
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
ability.setDescription("Radiance - " + abCost + cardName + " deals 1 damage to target creature and each other creature that shares a color with it.");
|
|
||||||
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if (cardName.equals("Adarkar Valkyrie")) {
|
else if (cardName.equals("Adarkar Valkyrie")) {
|
||||||
//tap ability - no cost - target creature - EOT
|
//tap ability - no cost - target creature - EOT
|
||||||
|
|||||||
Reference in New Issue
Block a user