mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
* Renegade Doppelganger - Fixed a bug that the copy effect did not end at end of turn and the copy was permanently renewed.
This commit is contained in:
parent
eeca9a66ca
commit
fb0d9c0f9d
4 changed files with 41 additions and 23 deletions
|
|
@ -50,7 +50,11 @@ public class CopyEffect extends ContinuousEffectImpl<CopyEffect> {
|
|||
private UUID sourceId;
|
||||
|
||||
public CopyEffect(Permanent target, UUID sourceId) {
|
||||
super(Duration.Custom, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature);
|
||||
this(Duration.Custom, target, sourceId);
|
||||
}
|
||||
|
||||
public CopyEffect(Duration duration, Permanent target, UUID sourceId) {
|
||||
super(duration, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature);
|
||||
this.target = target;
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ import mage.util.functions.ApplyToPermanent;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import mage.Constants.Duration;
|
||||
|
||||
public interface Game extends MageItem, Serializable {
|
||||
|
||||
|
|
@ -189,6 +190,8 @@ public interface Game extends MageItem, Serializable {
|
|||
* @param applier
|
||||
*/
|
||||
Permanent copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier);
|
||||
|
||||
Permanent copyPermanent(Duration duration, Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier);
|
||||
|
||||
Card copyCard(Card cardToCopy, Ability source, UUID newController);
|
||||
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
|
||||
@Override
|
||||
public Permanent copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier) {
|
||||
return copyPermanent(Duration.Custom, copyFromPermanent, copyToPermanent, source, applier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Permanent copyPermanent(Duration duration, Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier) {
|
||||
Permanent permanent = copyFromPermanent.copy();
|
||||
|
||||
//getState().addCard(permanent);
|
||||
|
|
@ -1009,7 +1014,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
|
||||
Ability newAbility = source.copy();
|
||||
|
||||
CopyEffect newEffect = new CopyEffect(permanent, copyToPermanent.getId());
|
||||
CopyEffect newEffect = new CopyEffect(duration, permanent, copyToPermanent.getId());
|
||||
newEffect.newId();
|
||||
newEffect.setTimestamp();
|
||||
newEffect.init(newAbility, this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue