forked from External/mage
Fixed spelling bug of import mage.abilities.effects.common.continuous package.
This commit is contained in:
parent
d71abab00c
commit
6b0f6be574
92 changed files with 99 additions and 99 deletions
|
|
@ -1,60 +0,0 @@
|
|||
package mage.abilities.effects.common.continious;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
public class ControlEnchantedEffect extends ContinuousEffectImpl {
|
||||
|
||||
public ControlEnchantedEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.GainControl);
|
||||
staticText = "You control enchanted creature";
|
||||
}
|
||||
|
||||
public ControlEnchantedEffect(final ControlEnchantedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControlEnchantedEffect copy() {
|
||||
return new ControlEnchantedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
Permanent permanent = game.getPermanent(enchantment.getAttachedTo());
|
||||
if (permanent != null) {
|
||||
switch (layer) {
|
||||
case ControlChangingEffects_2:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.changeControllerId(source.getControllerId(), game);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasLayer(Layer layer) {
|
||||
return layer == Layer.ControlChangingEffects_2;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue