forked from External/mage
[FIN] Implement Gogo, Master of Mimicry (#13686)
* [FIN] Implement Gogo, Master of Mimicry * add test * fix text * move abstract method definition to interface where it belongs
This commit is contained in:
parent
70b1f23248
commit
56e9986b06
9 changed files with 149 additions and 0 deletions
|
|
@ -534,6 +534,10 @@ public interface Ability extends Controllable, Serializable {
|
|||
|
||||
boolean canFizzle();
|
||||
|
||||
Ability withCanBeCopied(boolean canBeCopied);
|
||||
|
||||
boolean canBeCopied();
|
||||
|
||||
/**
|
||||
* Adds a target adjuster to this ability.
|
||||
* If using a generic adjuster, only use after adding the blueprint target!
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
private List<Watcher> watchers = new ArrayList<>(); // access to it by GetWatchers only (it can be overridden by some abilities)
|
||||
private List<Ability> subAbilities = null;
|
||||
private boolean canFizzle = true; // for Gilded Drake
|
||||
private boolean canBeCopied = true;
|
||||
private TargetAdjuster targetAdjuster = null;
|
||||
private CostAdjuster costAdjuster = null;
|
||||
private List<Hint> hints = new ArrayList<>();
|
||||
|
|
@ -129,6 +130,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
this.flavorWord = ability.flavorWord;
|
||||
this.sourceObjectZoneChangeCounter = ability.sourceObjectZoneChangeCounter;
|
||||
this.canFizzle = ability.canFizzle;
|
||||
this.canBeCopied = ability.canBeCopied;
|
||||
this.targetAdjuster = ability.targetAdjuster;
|
||||
this.costAdjuster = ability.costAdjuster;
|
||||
this.hints = CardUtil.deepCopyObject(ability.hints);
|
||||
|
|
@ -1733,6 +1735,17 @@ public abstract class AbilityImpl implements Ability {
|
|||
this.canFizzle = canFizzle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCopied() {
|
||||
return canBeCopied;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability withCanBeCopied(boolean canBeCopied) {
|
||||
this.canBeCopied = canBeCopied;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbilityImpl setTargetAdjuster(TargetAdjuster targetAdjuster) {
|
||||
if (targetAdjuster instanceof GenericTargetAdjuster && this.getTargets().isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue