mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
0f0f7a9f85
1 changed files with 11 additions and 4 deletions
|
@ -27,8 +27,8 @@
|
|||
*/
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
|
@ -47,7 +47,6 @@ import mage.constants.SubLayer;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -103,10 +102,18 @@ class TheAntiquitiesWarEffect extends ContinuousEffectImpl {
|
|||
return new TheAntiquitiesWarEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
for (Permanent perm : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, source.getControllerId(), source.getSourceId(), game)) {
|
||||
affectedObjectList.add(new MageObjectReference(perm, game));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
List<Permanent> permanents = game.getBattlefield().getAllActivePermanents(new FilterArtifactPermanent(), source.getControllerId(), game);
|
||||
for (Permanent permanent : permanents) {
|
||||
for (MageObjectReference mor : affectedObjectList) {
|
||||
Permanent permanent = mor.getPermanent(game);
|
||||
if (permanent != null) {
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
|
|
Loading…
Reference in a new issue