various text fixes

This commit is contained in:
xenohedron 2024-11-03 21:40:07 -05:00
parent a5d2338c5a
commit a98ff3867c
39 changed files with 153 additions and 116 deletions

View file

@ -17,7 +17,7 @@ public class EntersBattlefieldThisOrAnotherTriggeredAbility extends EntersBattle
public EntersBattlefieldThisOrAnotherTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional, SetTargetPointer setTargetPointer, boolean onlyControlled) {
super(Zone.BATTLEFIELD, effect, new FilterPermanentThisOrAnother(filter, onlyControlled), optional, setTargetPointer);
setTriggerPhrase("Whenever " + this.filter.getMessage() + " enters the battlefield" + (onlyControlled ? " under your control, " : ", "));
setTriggerPhrase("Whenever " + this.filter.getMessage() + (onlyControlled ? " you control" : "") + " enters, ");
}
protected EntersBattlefieldThisOrAnotherTriggeredAbility(final EntersBattlefieldThisOrAnotherTriggeredAbility ability) {

View file

@ -21,6 +21,7 @@ public class ConditionalOneShotEffect extends OneShotEffect {
private final Effects effects = new Effects();
private final Effects otherwiseEffects = new Effects();
private final Condition condition;
private boolean withConditionTextAtEnd = false;
public ConditionalOneShotEffect(OneShotEffect effect, Condition condition) {
this(effect, null, condition, null);
@ -57,6 +58,7 @@ public class ConditionalOneShotEffect extends OneShotEffect {
this.effects.addAll(effect.effects.copy());
this.otherwiseEffects.addAll(effect.otherwiseEffects.copy());
this.condition = effect.condition;
this.withConditionTextAtEnd = effect.withConditionTextAtEnd;
}
@Override
@ -81,6 +83,11 @@ public class ConditionalOneShotEffect extends OneShotEffect {
return this;
}
public ConditionalOneShotEffect withConditionTextAtEnd(boolean withConditionTextAtEnd) {
this.withConditionTextAtEnd = withConditionTextAtEnd;
return this;
}
@Override
public void setValue(String key, Object value) {
super.setValue(key, value);
@ -105,8 +112,13 @@ public class ConditionalOneShotEffect extends OneShotEffect {
}
if (otherwiseEffects.isEmpty()) {
return "if " + conditionText + ", "
+ CardUtil.getTextWithFirstCharLowerCase(effects.getText(mode));
if (withConditionTextAtEnd) {
return CardUtil.getTextWithFirstCharLowerCase(effects.getText(mode))
+ " if " + conditionText;
} else {
return "if " + conditionText + ", "
+ CardUtil.getTextWithFirstCharLowerCase(effects.getText(mode));
}
}
return effects.getText(mode) + ". If " + conditionText + ", "
+ CardUtil.getTextWithFirstCharLowerCase(otherwiseEffects.getText(mode));

View file

@ -18,7 +18,7 @@ public class KaitoCunningInfiltratorEmblem extends Emblem {
super("Emblem Kaito");
this.getAbilities().add(new SpellCastAllTriggeredAbility(
Zone.COMMAND, new CreateTokenEffect(new NinjaToken2()), new FilterSpell(), false, SetTargetPointer.NONE
));
).setTriggerPhrase("Whenever a player casts a spell, you "));
}
private KaitoCunningInfiltratorEmblem(final KaitoCunningInfiltratorEmblem card) {