mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
This commit is contained in:
parent
28902e5616
commit
dc4168efae
5 changed files with 18 additions and 14 deletions
|
@ -31,7 +31,6 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SpellCastAllTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -42,7 +41,6 @@ import mage.constants.Duration;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterArtifactSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -139,7 +137,7 @@ public class DroolingOgre extends CardImpl {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a player casts an artifact spell, that player gains control of {this}";
|
||||
return "Whenever a player casts an artifact spell, that player gains control of {this}.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,11 +75,11 @@ class EmissaryOfDespairCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
if (sourceAbility.getFirstTarget() == null) {
|
||||
if (effect.getTargetPointer().getFirst(game, sourceAbility) == null) {
|
||||
return 0;
|
||||
}
|
||||
FilterArtifactPermanent filter = new FilterArtifactPermanent();
|
||||
filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget()));
|
||||
filter.add(new ControllerIdPredicate(effect.getTargetPointer().getFirst(game, sourceAbility)));
|
||||
return game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,8 +105,8 @@ class MurderousSpoilsEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
for (Permanent p : attachments) {
|
||||
ContinuousEffect gainControl = new GainControlTargetEffect(Duration.EndOfGame);
|
||||
gainControl.setTargetPointer(new FixedTarget(p.getId()));
|
||||
ContinuousEffect gainControl = new GainControlTargetEffect(Duration.Custom);
|
||||
gainControl.setTargetPointer(new FixedTarget(p, game));
|
||||
game.addEffect(gainControl, source);
|
||||
}
|
||||
target.destroy(source.getId(), game, true);
|
||||
|
|
|
@ -28,23 +28,25 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.costs.common.DiscardXTargetCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
||||
import mage.abilities.effects.common.TapEnchantedEffect;
|
||||
import mage.abilities.effects.common.UntapEnchantedEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterArtifactCard;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
@ -70,8 +72,11 @@ public class PsychicOverload extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()));
|
||||
// Enchanted permanent doesn't untap during its controller's untap step.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect()));
|
||||
|
||||
// Enchanted permanent has "Discard two artifact cards: Untap this permanent."
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new DiscardTargetCost(new TargetCardInHand(2, new FilterArtifactCard("two artifact cards")))));
|
||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new DiscardTargetCost(new TargetCardInHand(2, new FilterArtifactCard("two artifact cards"))));
|
||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted permanent has \"Discard two artifact cards: Untap this permanent.\"");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
||||
public PsychicOverload(final PsychicOverload card) {
|
||||
|
|
|
@ -76,7 +76,7 @@ class PulseOfTheTangleReturnToHandEffect extends OneShotEffect {
|
|||
|
||||
PulseOfTheTangleReturnToHandEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Then if an opponent controls more creatures than you, return Pulse of the Tangle to its owner's hand";
|
||||
this.staticText = "Then if an opponent controls more creatures than you, return {this} to its owner's hand";
|
||||
}
|
||||
|
||||
PulseOfTheTangleReturnToHandEffect(final PulseOfTheTangleReturnToHandEffect effect) {
|
||||
|
@ -93,6 +93,7 @@ class PulseOfTheTangleReturnToHandEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
FilterControlledCreaturePermanent controllerFilter = new FilterControlledCreaturePermanent();
|
||||
PermanentsOnBattlefieldCount controllerCount = new PermanentsOnBattlefieldCount(controllerFilter);
|
||||
int controllerAmount = controllerCount.calculate(game, source, this);
|
||||
boolean check = false;
|
||||
if (controller != null) {
|
||||
for (UUID opponentID : game.getOpponents(controller.getId())) {
|
||||
|
@ -100,7 +101,7 @@ class PulseOfTheTangleReturnToHandEffect extends OneShotEffect {
|
|||
FilterCreaturePermanent opponentFilter = new FilterCreaturePermanent();
|
||||
opponentFilter.add(new ControllerIdPredicate(opponentID));
|
||||
PermanentsOnBattlefieldCount opponentCreatureCount = new PermanentsOnBattlefieldCount(opponentFilter);
|
||||
check = opponentCreatureCount.calculate(game, source, this) > controllerCount.calculate(game, source, this);
|
||||
check = opponentCreatureCount.calculate(game, source, this) > controllerAmount;
|
||||
if (check) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue