mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Keyword V: Rise of the intrinsic
This commit is contained in:
@@ -414,13 +414,16 @@ public class CardFactory {
|
||||
}
|
||||
|
||||
private static void readCardFace(Card c, ICardFace face) {
|
||||
c.addIntrinsicKeywords(face.getKeywords());
|
||||
|
||||
for (String r : face.getReplacements()) c.addReplacementEffect(ReplacementHandler.parseReplacement(r, c, true));
|
||||
for (String s : face.getStaticAbilities()) c.addStaticAbility(s);
|
||||
for (String t : face.getTriggers()) c.addTrigger(TriggerHandler.parseTrigger(t, c, true));
|
||||
|
||||
for (Entry<String, String> v : face.getVariables()) c.setSVar(v.getKey(), v.getValue());
|
||||
|
||||
// keywords not before variables
|
||||
c.addIntrinsicKeywords(face.getKeywords());
|
||||
|
||||
c.setName(face.getName());
|
||||
c.setManaCost(face.getManaCost());
|
||||
c.setText(face.getNonAbilityText());
|
||||
|
||||
@@ -1949,10 +1949,6 @@ public class CardFactoryUtil {
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
|
||||
for (KeywordInterface inst : card.getKeywords()) {
|
||||
inst.createTraits(card, true);
|
||||
}
|
||||
|
||||
// AddCost
|
||||
if (card.hasSVar("FullCost")) {
|
||||
String k[] = card.getSVar("FullCost").split(":");
|
||||
|
||||
@@ -158,15 +158,18 @@ public class CardState extends GameObject {
|
||||
}
|
||||
public final void setIntrinsicKeywords(final Iterable<String> intrinsicKeyword0) {
|
||||
intrinsicKeywords.clear();
|
||||
intrinsicKeywords.addAll(intrinsicKeyword0);
|
||||
addIntrinsicKeywords(intrinsicKeyword0);
|
||||
}
|
||||
|
||||
public final KeywordInterface addIntrinsicKeyword(final String s) {
|
||||
if (s.trim().length() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return intrinsicKeywords.add(s);
|
||||
KeywordInterface inst = intrinsicKeywords.add(s);
|
||||
if (inst != null) {
|
||||
inst.createTraits(card, true);
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
public final boolean addIntrinsicKeywords(final Iterable<String> keywords) {
|
||||
boolean changed = false;
|
||||
|
||||
Reference in New Issue
Block a user