mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
- Fixed #5770
This commit is contained in:
parent
9cab9bc429
commit
6f150b4fe0
1 changed files with 19 additions and 19 deletions
|
@ -7,20 +7,18 @@ import mage.abilities.common.GodEternalDiesTriggeredAbility;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
|
||||||
import mage.abilities.keyword.DeathtouchAbility;
|
import mage.abilities.keyword.DeathtouchAbility;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
|
@ -58,16 +56,12 @@ public final class GodEternalRhonas extends CardImpl {
|
||||||
|
|
||||||
class GodEternalRhonasEffect extends OneShotEffect {
|
class GodEternalRhonasEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
GodEternalRhonasEffect() {
|
GodEternalRhonasEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
staticText = "double the power of each other creature you control until end of turn. " +
|
staticText = "double the power of each other creature you control until end of turn. "
|
||||||
"Those creatures gain vigilance until end of turn.";
|
+ "Those creatures gain vigilance until end of turn.";
|
||||||
}
|
}
|
||||||
|
|
||||||
private GodEternalRhonasEffect(final GodEternalRhonasEffect effect) {
|
private GodEternalRhonasEffect(final GodEternalRhonasEffect effect) {
|
||||||
|
@ -81,8 +75,11 @@ class GodEternalRhonasEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
Permanent godEternalRhonas = game.getPermanent(source.getSourceId());
|
||||||
if (permanent == null) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
|
if (permanent == null
|
||||||
|
|| godEternalRhonas != null
|
||||||
|
&& permanent == godEternalRhonas) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ContinuousEffect effect = new BoostTargetEffect(
|
ContinuousEffect effect = new BoostTargetEffect(
|
||||||
|
@ -91,11 +88,14 @@ class GodEternalRhonasEffect extends OneShotEffect {
|
||||||
);
|
);
|
||||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
|
||||||
|
ContinuousEffect effect2 = new GainAbilityTargetEffect(
|
||||||
|
VigilanceAbility.getInstance(),
|
||||||
|
Duration.EndOfTurn
|
||||||
|
);
|
||||||
|
effect2.setTargetPointer(new FixedTarget(permanent, game));
|
||||||
|
game.addEffect(effect2, source);
|
||||||
}
|
}
|
||||||
game.addEffect(new GainAbilityControlledEffect(
|
|
||||||
VigilanceAbility.getInstance(),
|
|
||||||
Duration.EndOfTurn, filter
|
|
||||||
), source);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue