Add Adamant cards

This commit is contained in:
swordshine
2019-09-06 12:34:53 +08:00
parent 632c4c2503
commit d3d41d7c1f
2 changed files with 20 additions and 0 deletions

View File

@@ -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;
@@ -250,6 +253,16 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView {
if (params.containsKey("Blessing")) {
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)

View File

@@ -0,0 +1,7 @@
Name:Embereth Paladin
ManaCost:3 R
Types:Creature Human Knight
PT:4/1
K:Haste
K:etbCounter:P1P1:1:Adamant$ Red:Adamant — If at least three red mana was spent to cast this spell, CARDNAME enters the battlefield with a +1/+1 counter on it.
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.