forked from External/mage
add withQuotes chaining method to GainAbilityAttachedEffect
This commit is contained in:
parent
a740a2b2dc
commit
ace21c67c1
1 changed files with 8 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
|||
protected boolean independentEffect;
|
||||
protected String targetObjectName;
|
||||
protected boolean doesntRemoveItself = false;
|
||||
protected boolean useQuotes = false;
|
||||
|
||||
public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType) {
|
||||
this(ability, attachmentType, Duration.WhileOnBattlefield);
|
||||
|
|
@ -68,6 +69,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
|||
this.independentEffect = effect.independentEffect;
|
||||
this.targetObjectName = effect.targetObjectName;
|
||||
this.doesntRemoveItself = effect.doesntRemoveItself;
|
||||
this.useQuotes = effect.useQuotes;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -130,6 +132,11 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
|||
return this;
|
||||
}
|
||||
|
||||
public GainAbilityAttachedEffect withQuotes(boolean useQuotes) {
|
||||
this.useQuotes = useQuotes;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
|
|
@ -143,7 +150,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
|||
} else {
|
||||
sb.append("gains ");
|
||||
}
|
||||
boolean quotes = ability instanceof SimpleActivatedAbility
|
||||
boolean quotes = useQuotes || ability instanceof SimpleActivatedAbility
|
||||
|| ability instanceof TriggeredAbility
|
||||
|| ability instanceof LoyaltyAbility
|
||||
|| ability instanceof ManaAbility
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue