mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
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 boolean independentEffect;
|
||||||
protected String targetObjectName;
|
protected String targetObjectName;
|
||||||
protected boolean doesntRemoveItself = false;
|
protected boolean doesntRemoveItself = false;
|
||||||
|
protected boolean useQuotes = false;
|
||||||
|
|
||||||
public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType) {
|
public GainAbilityAttachedEffect(Ability ability, AttachmentType attachmentType) {
|
||||||
this(ability, attachmentType, Duration.WhileOnBattlefield);
|
this(ability, attachmentType, Duration.WhileOnBattlefield);
|
||||||
|
|
@ -68,6 +69,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
||||||
this.independentEffect = effect.independentEffect;
|
this.independentEffect = effect.independentEffect;
|
||||||
this.targetObjectName = effect.targetObjectName;
|
this.targetObjectName = effect.targetObjectName;
|
||||||
this.doesntRemoveItself = effect.doesntRemoveItself;
|
this.doesntRemoveItself = effect.doesntRemoveItself;
|
||||||
|
this.useQuotes = effect.useQuotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -130,6 +132,11 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GainAbilityAttachedEffect withQuotes(boolean useQuotes) {
|
||||||
|
this.useQuotes = useQuotes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getText(Mode mode) {
|
public String getText(Mode mode) {
|
||||||
if (staticText != null && !staticText.isEmpty()) {
|
if (staticText != null && !staticText.isEmpty()) {
|
||||||
|
|
@ -143,7 +150,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl {
|
||||||
} else {
|
} else {
|
||||||
sb.append("gains ");
|
sb.append("gains ");
|
||||||
}
|
}
|
||||||
boolean quotes = ability instanceof SimpleActivatedAbility
|
boolean quotes = useQuotes || ability instanceof SimpleActivatedAbility
|
||||||
|| ability instanceof TriggeredAbility
|
|| ability instanceof TriggeredAbility
|
||||||
|| ability instanceof LoyaltyAbility
|
|| ability instanceof LoyaltyAbility
|
||||||
|| ability instanceof ManaAbility
|
|| ability instanceof ManaAbility
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue