mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Emblem fixed startwith
This commit is contained in:
@@ -337,9 +337,9 @@ public abstract class SpellAbilityEffect {
|
|||||||
eff.setTimestamp(game.getNextTimestamp());
|
eff.setTimestamp(game.getNextTimestamp());
|
||||||
eff.setName(name);
|
eff.setName(name);
|
||||||
// if name includes emblem then it should be one
|
// if name includes emblem then it should be one
|
||||||
eff.addType(name.startsWith("emblem") ? "Emblem" : "Effect");
|
eff.addType(name.startsWith("Emblem") ? "Emblem" : "Effect");
|
||||||
// add Planeswalker types into Emblem for fun
|
// add Planeswalker types into Emblem for fun
|
||||||
if (name.startsWith("emblem") && hostCard.isPlaneswalker()) {
|
if (name.startsWith("Emblem") && hostCard.isPlaneswalker()) {
|
||||||
for (final String type : hostCard.getType().getSubtypes()) {
|
for (final String type : hostCard.getType().getSubtypes()) {
|
||||||
if (CardType.isAPlaneswalkerType(type)) {
|
if (CardType.isAPlaneswalkerType(type)) {
|
||||||
eff.addType(type);
|
eff.addType(type);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class EffectEffect extends SpellAbilityEffect {
|
|||||||
String image;
|
String image;
|
||||||
if (sa.hasParam("Image")) {
|
if (sa.hasParam("Image")) {
|
||||||
image = ImageKeys.getTokenKey(sa.getParam("Image"));
|
image = ImageKeys.getTokenKey(sa.getParam("Image"));
|
||||||
} else if (name.startsWith("emblem")) { // try to get the image from name
|
} else if (name.startsWith("Emblem")) { // try to get the image from name
|
||||||
image = ImageKeys.getTokenKey(name.replace(",", "").replace(" ", "_").toLowerCase());
|
image = ImageKeys.getTokenKey(name.replace(",", "").replace(" ", "_").toLowerCase());
|
||||||
} else { // use host image
|
} else { // use host image
|
||||||
image = hostCard.getImageKey();
|
image = hostCard.getImageKey();
|
||||||
|
|||||||
Reference in New Issue
Block a user