- [XLN] Added Jace, Cunning Castaway.

This commit is contained in:
Agetian
2017-08-28 18:35:31 +00:00
parent 0a5fe2e2af
commit c2a7f19d38
3 changed files with 36 additions and 0 deletions

View File

@@ -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()) {