forked from External/mage
refactors: common class for "return all xxx from your graveyard to the battlefield" (#13034)
* refactor: new ReturnFromYourGraveyardToBattlefieldAllEffect * refactor: new ShuffleYourGraveyardIntoLibraryEffect also new PutIntoGraveFromLibrarySourceTriggeredAbility
This commit is contained in:
parent
001f9e866f
commit
2969ba58be
32 changed files with 308 additions and 1024 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -13,8 +12,8 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class DestroyAllEffect extends OneShotEffect {
|
||||
|
||||
private FilterPermanent filter;
|
||||
private boolean noRegen;
|
||||
private final FilterPermanent filter;
|
||||
private final boolean noRegen;
|
||||
|
||||
public DestroyAllEffect(FilterPermanent filter) {
|
||||
this(filter, false);
|
||||
|
|
@ -24,11 +23,7 @@ public class DestroyAllEffect extends OneShotEffect {
|
|||
super(Outcome.DestroyPermanent);
|
||||
this.filter = filter;
|
||||
this.noRegen = noRegen;
|
||||
if (noRegen) {
|
||||
staticText = "destroy all " + filter.getMessage() + ". They can't be regenerated";
|
||||
} else {
|
||||
staticText = "destroy all " + filter.getMessage();
|
||||
}
|
||||
this.staticText = "destroy all " + filter.getMessage() + (noRegen ? ". They can't be regenerated" : "");
|
||||
}
|
||||
|
||||
protected DestroyAllEffect(final DestroyAllEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue