[IKO] Jubilant Skybonder - fixed text;

This commit is contained in:
Oleg Agafonov 2020-04-19 23:18:34 +04:00
parent 0aced5669f
commit dfdc1e5e06
2 changed files with 15 additions and 3 deletions

View file

@ -49,7 +49,7 @@ public final class JubilantSkybonder extends CardImpl {
ContinuousEffect effect = new GainAbilityAllEffect( ContinuousEffect effect = new GainAbilityAllEffect(
new SimpleStaticAbility(new JubilantSkybonderEffect()), new SimpleStaticAbility(new JubilantSkybonderEffect()),
Duration.WhileOnBattlefield, filter Duration.WhileOnBattlefield, filter
); ).withForceQuotes();
effect.setDependedToType(DependencyType.AddingAbility); effect.setDependedToType(DependencyType.AddingAbility);
this.addAbility(new SimpleStaticAbility(effect)); this.addAbility(new SimpleStaticAbility(effect));
} }

View file

@ -12,7 +12,10 @@ import mage.filter.FilterPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import java.util.*; import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
/** /**
* @author Loki * @author Loki
@ -22,6 +25,7 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
protected Ability ability; protected Ability ability;
protected boolean excludeSource; protected boolean excludeSource;
protected FilterPermanent filter; protected FilterPermanent filter;
protected boolean forceQuotes = false;
public GainAbilityAllEffect(Ability ability, Duration duration) { public GainAbilityAllEffect(Ability ability, Duration duration) {
this(ability, duration, new FilterPermanent()); this(ability, duration, new FilterPermanent());
@ -143,7 +147,7 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
boolean quotes = (ability instanceof SimpleActivatedAbility) || (ability instanceof TriggeredAbility); boolean quotes = forceQuotes || (ability instanceof SimpleActivatedAbility) || (ability instanceof TriggeredAbility);
if (excludeSource) { if (excludeSource) {
sb.append("Other "); sb.append("Other ");
} }
@ -171,4 +175,12 @@ public class GainAbilityAllEffect extends ContinuousEffectImpl {
} }
return sb.toString(); return sb.toString();
} }
/**
* Add quotes to gains abilities (by default static abilities don't have it)
*/
public GainAbilityAllEffect withForceQuotes() {
this.forceQuotes = true;
return this;
}
} }