[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(
new SimpleStaticAbility(new JubilantSkybonderEffect()),
Duration.WhileOnBattlefield, filter
);
).withForceQuotes();
effect.setDependedToType(DependencyType.AddingAbility);
this.addAbility(new SimpleStaticAbility(effect));
}

View file

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