mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
* Scale Up - fixed that creatures doesn't lose types after overload pay;
This commit is contained in:
parent
55ee8a7b70
commit
ecdc47ad68
2 changed files with 13 additions and 2 deletions
|
|
@ -22,19 +22,25 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
protected String theyAreStillType;
|
||||
private final FilterPermanent filter;
|
||||
private boolean loseColor = true;
|
||||
private boolean loseTypes = false;
|
||||
protected boolean loseName = false;
|
||||
|
||||
public BecomesCreatureAllEffect(Token token, String theyAreStillType, FilterPermanent filter, Duration duration, boolean loseColor) {
|
||||
this(token, theyAreStillType, filter, duration, loseColor, false);
|
||||
this(token, theyAreStillType, filter, duration, loseColor, false, false);
|
||||
}
|
||||
|
||||
public BecomesCreatureAllEffect(Token token, String theyAreStillType, FilterPermanent filter, Duration duration, boolean loseColor, boolean loseName) {
|
||||
this(token, theyAreStillType, filter, duration, loseColor, loseName, false);
|
||||
}
|
||||
|
||||
public BecomesCreatureAllEffect(Token token, String theyAreStillType, FilterPermanent filter, Duration duration, boolean loseColor, boolean loseName, boolean loseTypes) {
|
||||
super(duration, Outcome.BecomeCreature);
|
||||
this.token = token;
|
||||
this.theyAreStillType = theyAreStillType;
|
||||
this.filter = filter;
|
||||
this.loseColor = loseColor;
|
||||
this.loseName = loseName;
|
||||
this.loseTypes = loseTypes;
|
||||
}
|
||||
|
||||
public BecomesCreatureAllEffect(final BecomesCreatureAllEffect effect) {
|
||||
|
|
@ -44,6 +50,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
this.filter = effect.filter.copy();
|
||||
this.loseColor = effect.loseColor;
|
||||
this.loseName = effect.loseName;
|
||||
this.loseTypes = effect.loseTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -89,6 +96,10 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl {
|
|||
permanent.getSubtype(game).retainAll(SubType.getLandTypes());
|
||||
permanent.getSubtype(game).addAll(token.getSubtype(game));
|
||||
} else {
|
||||
if (loseTypes) {
|
||||
permanent.getSubtype(game).retainAll(SubType.getLandTypes());
|
||||
}
|
||||
|
||||
for (SubType t : token.getSubtype(game)) {
|
||||
if (!permanent.hasSubtype(t, game)) {
|
||||
permanent.getSubtype(game).add(t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue