mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 20:29:19 -08:00
* Fixed must be blocked by all creatures if able target effects to be not abilities of the targeted creatures (so e.g. a turn to frog does not neutralize the effect).
This commit is contained in:
parent
81c4259cfe
commit
3cf53810d9
3 changed files with 14 additions and 55 deletions
|
|
@ -33,7 +33,9 @@ import mage.constants.Duration;
|
|||
import mage.constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.RequirementEffect;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.MiracleAbility;
|
||||
|
|
@ -59,7 +61,9 @@ public class RevengeOfTheHunted extends CardImpl<RevengeOfTheHunted> {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(6, 6, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new RevengeOfTheHuntedEffect());
|
||||
Effect effect = new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn);
|
||||
effect.setText("and all creatures able to block it this turn do so");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
this.addAbility(new MiracleAbility(new ManaCostsImpl("{G}")));
|
||||
}
|
||||
|
|
@ -73,44 +77,3 @@ public class RevengeOfTheHunted extends CardImpl<RevengeOfTheHunted> {
|
|||
return new RevengeOfTheHunted(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RevengeOfTheHuntedEffect extends RequirementEffect<RevengeOfTheHuntedEffect> {
|
||||
|
||||
public RevengeOfTheHuntedEffect() {
|
||||
this(Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
public RevengeOfTheHuntedEffect(Duration duration) {
|
||||
super(duration);
|
||||
staticText = "All creatures able to block it this turn do so";
|
||||
}
|
||||
|
||||
public RevengeOfTheHuntedEffect(final RevengeOfTheHuntedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
return permanent.canBlock(source.getFirstTarget(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mustAttack(Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mustBlock(Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID mustBlockAttacker(Ability source, Game game) {
|
||||
return source.getFirstTarget();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RevengeOfTheHuntedEffect copy() {
|
||||
return new RevengeOfTheHuntedEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import mage.constants.Zone;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
|
|
@ -67,10 +68,7 @@ public class ArmedDangerous extends SplitCard<ArmedDangerous> {
|
|||
// Dangerous
|
||||
// All creatures able to block target creature this turn do so.
|
||||
getRightHalfCard().getColor().setGreen(true);
|
||||
Effect effect = new GainAbilityTargetEffect(
|
||||
new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAllSourceEffect(Duration.EndOfCombat)), Duration.EndOfTurn,
|
||||
"All creatures able to block target creature this turn do so");
|
||||
getRightHalfCard().getSpellAbility().addEffect(effect);
|
||||
getRightHalfCard().getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn));
|
||||
getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,15 +28,11 @@
|
|||
package mage.sets.mirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -49,8 +45,10 @@ public class Bloodscent extends CardImpl<Bloodscent> {
|
|||
super(ownerId, 114, "Bloodscent", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}");
|
||||
this.expansionSetCode = "MRD";
|
||||
this.color.setGreen(true);
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAllSourceEffect()), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// All creatures able to block target creature this turn do so.
|
||||
this.getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
}
|
||||
|
||||
public Bloodscent(final Bloodscent card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue