mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- [XLN] Added Jace, Cunning Castaway.
This commit is contained in:
@@ -67,6 +67,7 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
|
||||
final List<String> svars = Lists.newArrayList();
|
||||
final List<String> triggers = Lists.newArrayList();
|
||||
final List<String> pumpKeywords = Lists.newArrayList();
|
||||
boolean asNonLegendary = false;
|
||||
|
||||
final long timestamp = game.getNextTimestamp();
|
||||
|
||||
@@ -84,6 +85,9 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
|
||||
if (sa.hasParam("AddTypes")) {
|
||||
types.addAll(Arrays.asList(sa.getParam("AddTypes").split(" & ")));
|
||||
}
|
||||
if (sa.hasParam("NonLegendary")) {
|
||||
asNonLegendary = true;
|
||||
}
|
||||
if (sa.hasParam("AddSVars")) {
|
||||
svars.addAll(Arrays.asList(sa.getParam("AddSVars").split(" & ")));
|
||||
}
|
||||
@@ -188,6 +192,23 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
|
||||
for (final String kw : keywords) {
|
||||
copy.addIntrinsicKeyword(kw);
|
||||
}
|
||||
if (asNonLegendary) {
|
||||
String typeLine = "";
|
||||
for (CardType.Supertype st : copy.getType().getSupertypes()) {
|
||||
if (!st.equals(CardType.Supertype.Legendary)) {
|
||||
typeLine += st.name() + " ";
|
||||
}
|
||||
}
|
||||
for (CardType.CoreType ct : copy.getType().getCoreTypes()) {
|
||||
typeLine += ct.name() + " ";
|
||||
}
|
||||
for (String subt: copy.getType().getSubtypes()) {
|
||||
typeLine += subt + " ";
|
||||
}
|
||||
|
||||
StringBuilder newType = new StringBuilder(typeLine);
|
||||
copy.setType(CardType.parse(newType.toString()));
|
||||
}
|
||||
if (sa.hasParam("SetCreatureTypes")) {
|
||||
String typeLine = "";
|
||||
for (CardType.Supertype st : copy.getType().getSupertypes()) {
|
||||
|
||||
Reference in New Issue
Block a user