mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Merge branch 'patch' into 'master'
ELD cards See merge request core-developers/forge!2091
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package forge.game;
|
||||
|
||||
import forge.card.MagicColor;
|
||||
import forge.card.mana.ManaAtom;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.card.Card;
|
||||
@@ -16,6 +17,8 @@ import forge.util.Expressions;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
@@ -251,6 +254,16 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView {
|
||||
if ("True".equalsIgnoreCase(params.get("Blessing")) != hostController.hasBlessing()) return false;
|
||||
}
|
||||
|
||||
if (params.containsKey("Adamant")) {
|
||||
if (hostCard.getCastSA() == null) {
|
||||
return false;
|
||||
}
|
||||
final String payingMana = StringUtils.join(hostCard.getCastSA().getPayingMana());
|
||||
if (StringUtils.countMatches(payingMana, MagicColor.toShortString(params.get("Adamant"))) < 3) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (params.containsKey("Presence")) {
|
||||
if (hostCard.getCastFrom() == null || hostCard.getCastSA() == null)
|
||||
return false;
|
||||
|
||||
@@ -1623,6 +1623,13 @@ public class AbilityUtils {
|
||||
return count;
|
||||
}
|
||||
|
||||
// Count$Adamant.<Color>.<True>.<False>
|
||||
if (sq[0].startsWith("Adamant")) {
|
||||
final String payingMana = StringUtils.join(sa.getRootAbility().getPayingMana());
|
||||
final boolean adamant = StringUtils.countMatches(payingMana, MagicColor.toShortString(sq[1])) >= 3;
|
||||
return CardFactoryUtil.doXMath(Integer.parseInt(sq[adamant ? 2 : 3]), expr, c);
|
||||
}
|
||||
|
||||
if (l[0].startsWith("LastStateBattlefield")) {
|
||||
final String[] k = l[0].split(" ");
|
||||
CardCollectionView list = null;
|
||||
|
||||
9
forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/embereth_paladin.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Embereth Paladin
|
||||
ManaCost:3 R
|
||||
Types:Creature Human Knight
|
||||
PT:4/1
|
||||
K:Haste
|
||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Adamant$ Red | ReplaceWith$ ETBAddCounter | Description$ Adamant — If at least three red mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it.
|
||||
SVar:ETBAddCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToPlay
|
||||
SVar:MoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard
|
||||
Oracle:Haste\nAdamant — If at least three red mana was spent to cast this spell, Embereth Paladin enters the battlefield with a +1/+1 counter on it.
|
||||
@@ -0,0 +1,7 @@
|
||||
Name:Silverflame Ritual
|
||||
ManaCost:3 W
|
||||
Types:Sorcery
|
||||
A:SP$ PutCounterAll | Cost$ 3 W | ValidCards$ Creature.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBPumpAll | SpellDescription$ Put a +1/+1 counter on each creature you control. Adamant — If at least three white mana was spent to cast this spell, creatures you control gain vigilance until end of turn.
|
||||
SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | KW$ Vigilance | ConditionCheckSVar$ X | References$ X
|
||||
SVar:X:Count$Adamant.White.1.0
|
||||
Oracle:Put a +1/+1 counter on each creature you control.\nAdamant — If at least three white mana was spent to cast this spell, creatures you control gain vigilance until end of turn.
|
||||
6
forge-gui/res/cardsfolder/upcoming/slaying_fire.txt
Normal file
6
forge-gui/res/cardsfolder/upcoming/slaying_fire.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Name:Slaying Fire
|
||||
ManaCost:2 R
|
||||
Types:Instant
|
||||
A:SP$ DealDamage | Cost$ 2 R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals 3 damage to any target. Adamant — If at least three red mana was spent to cast this spell, it deals 4 damage instead.
|
||||
SVar:X:Count$Adamant.Red.4.3
|
||||
Oracle:Slaying Fire deals 3 damage to any target.\nAdamant — If at least three red mana was spent to cast this spell, it deals 4 damage instead.
|
||||
Reference in New Issue
Block a user