Modifying the texts displayed during a use of an ability.
This commit is contained in:
@@ -54,7 +54,7 @@ public class DefaultCostToEffectAction implements CostToEffectAction {
|
||||
public Effect nextEffect() {
|
||||
if (!_sentMessage && _physicalCard != null) {
|
||||
_sentMessage = true;
|
||||
return new SendMessageEffect(_physicalCard.getBlueprint().getName() + " is used");
|
||||
return new SendMessageEffect(getMessage());
|
||||
}
|
||||
|
||||
if (_costsNextIndex < _costs.size()) {
|
||||
@@ -72,6 +72,10 @@ public class DefaultCostToEffectAction implements CostToEffectAction {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String getMessage() {
|
||||
return _physicalCard.getBlueprint().getName() + " is used";
|
||||
}
|
||||
|
||||
private boolean checkNoFailedOrCancelledCost() {
|
||||
for (Effect cost : _costs) {
|
||||
if (cost.isCancelled() || cost.isFailed())
|
||||
|
||||
@@ -4,11 +4,19 @@ import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
|
||||
public class OptionalTriggerAction extends DefaultCostToEffectAction {
|
||||
private PhysicalCard _physicalCard;
|
||||
|
||||
public OptionalTriggerAction(PhysicalCard physicalCard, Keyword type, String actionText) {
|
||||
super(physicalCard, type, getActionText(physicalCard));
|
||||
_physicalCard = physicalCard;
|
||||
}
|
||||
|
||||
private static String getActionText(PhysicalCard card) {
|
||||
return "Activated action from " + card.getBlueprint().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getMessage() {
|
||||
return _physicalCard.getBlueprint().getName() + " optional triggered effect is used";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@ import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
|
||||
public class RequiredTriggerAction extends DefaultCostToEffectAction {
|
||||
private PhysicalCard _physicalCard;
|
||||
|
||||
public RequiredTriggerAction(PhysicalCard physicalCard, Keyword type, String actionText) {
|
||||
super(physicalCard, type, getActionText(physicalCard));
|
||||
_physicalCard = physicalCard;
|
||||
}
|
||||
|
||||
private static String getActionText(PhysicalCard card) {
|
||||
@@ -14,4 +17,9 @@ public class RequiredTriggerAction extends DefaultCostToEffectAction {
|
||||
else
|
||||
return "Required action from " + card.getBlueprint().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getMessage() {
|
||||
return _physicalCard.getBlueprint().getName() + " optional triggered effect is used";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user