forked from External/mage
multiple changes:
* refactor: improved target pointer init code and logic, added docs and runtime checks; * game: fixed miss or wrong init calls in some continuous effects; * game: fixed wrong usage of target pointers (miss copy code, miss npe checks);
This commit is contained in:
parent
b2aa4ecc08
commit
78612ddc91
115 changed files with 466 additions and 355 deletions
|
|
@ -3,7 +3,6 @@ package mage.abilities.effects;
|
|||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.CompoundAbility;
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.constants.*;
|
||||
import mage.filter.Filter;
|
||||
|
|
@ -154,6 +153,11 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
|||
this.discarded = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void initNewTargetPointer() {
|
||||
// continuous effect uses init code, so do nothing here
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
init(source, game, game.getActivePlayerId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue