Cards can now add extra information to be displayed in the card information window.
This commit is contained in:
@@ -231,6 +231,11 @@ public abstract class AbstractLotroCardBlueprint implements LotroCardBlueprint {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtraDisplayableInformation(PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Direction getSiteDirection() {
|
||||
throw new UnsupportedOperationException("This method should not be called on this card");
|
||||
|
||||
@@ -197,6 +197,11 @@ public class SimpleLotroCardBlueprint implements LotroCardBlueprint {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtraDisplayableInformation(PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUnique() {
|
||||
return false;
|
||||
|
||||
@@ -56,6 +56,13 @@ public class Card11_050 extends AbstractPermanent {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtraDisplayableInformation(PhysicalCard self) {
|
||||
if (self.getWhileInZoneData() != null)
|
||||
return "Selected keyword is: " + ((Keyword) self.getWhileInZoneData()).getHumanReadable();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.movesTo(game, effectResult, (Keyword) self.getWhileInZoneData())
|
||||
|
||||
@@ -53,4 +53,11 @@ public class Card15_076 extends AbstractPermanent {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExtraDisplayableInformation(PhysicalCard self) {
|
||||
if (self.getWhileInZoneData() != null)
|
||||
return "Random site name is: " + self.getWhileInZoneData();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,8 @@ public interface LotroCardBlueprint {
|
||||
|
||||
public Direction getSiteDirection();
|
||||
|
||||
public String getExtraDisplayableInformation(PhysicalCard self);
|
||||
|
||||
public enum Direction {
|
||||
LEFT, RIGHT
|
||||
}
|
||||
|
||||
@@ -132,6 +132,12 @@ public class LotroGameMediator {
|
||||
sb.append("<br>" + GameUtils.getAppendedNames(stackedCards));
|
||||
}
|
||||
|
||||
final String extraDisplayableInformation = card.getBlueprint().getExtraDisplayableInformation(card);
|
||||
if (extraDisplayableInformation != null) {
|
||||
sb.append("<br><b>Extra information:</b>");
|
||||
sb.append("<br>" + extraDisplayableInformation);
|
||||
}
|
||||
|
||||
sb.append("<br><br><b>Effective stats:</b>");
|
||||
try {
|
||||
int twilightCost = _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card, false);
|
||||
|
||||
Reference in New Issue
Block a user