[SLD] fixe Holga, Relentless Rager not requiring blocks (fixes #10325)

This commit is contained in:
theelk801 2023-05-07 14:45:18 -04:00
parent 3503513c4e
commit 46f6593da8
4 changed files with 20 additions and 25 deletions

View file

@ -10,6 +10,7 @@ import mage.abilities.effects.keyword.TheRingTemptsYouEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
@ -44,7 +45,7 @@ public final class FrodoBaggins extends CardImpl {
// As long as Frodo is your Ring-bearer, it must be blocked if able.
this.addAbility(new SimpleStaticAbility(new ConditionalRequirementEffect(
new MustBeBlockedByAtLeastOneSourceEffect(), SourceIsRingBearerCondition.instance,
new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield), SourceIsRingBearerCondition.instance,
"as long as {this} is your Ring-bearer, it must be blocked if able"
)));
}

View file

@ -39,7 +39,7 @@ public final class HolgaRelentlessRager extends CardImpl {
this.addAbility(HasteAbility.getInstance());
// Holga, Relentless Rager must be blocked if able.
this.addAbility(new SimpleStaticAbility(new MustBeBlockedByAtLeastOneSourceEffect()));
this.addAbility(new SimpleStaticAbility(new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield)));
// Whenever Holga attacks, each creature you control attacking a player gets +1/+0 until end of turn for each creature that player controls.
this.addAbility(new AttacksTriggeredAbility(new HolgaRelentlessRagerEffect()));

View file

@ -1,7 +1,5 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
@ -12,34 +10,33 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import mage.constants.SubType;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class LoathsomeCatoblepas extends CardImpl {
public LoathsomeCatoblepas(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// {2}{G}: Loathsome Catoblepas must be blocked this turn if able.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(), new ManaCostsImpl<>("{2}{G}")));
// When Loathsome Catoblepas dies, target creature an opponent controls gets -3/-3 until end of turn.
Ability ability = new DiesSourceTriggeredAbility(new BoostTargetEffect(-3,-3, Duration.EndOfTurn), false);
Target target = new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE);
ability.addTarget(target);
this.addAbility(ability);
this.addAbility(new SimpleActivatedAbility(
new MustBeBlockedByAtLeastOneSourceEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{2}{G}")
));
// When Loathsome Catoblepas dies, target creature an opponent controls gets -3/-3 until end of turn.
Ability ability = new DiesSourceTriggeredAbility(new BoostTargetEffect(-3, -3));
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
}
private LoathsomeCatoblepas(final LoathsomeCatoblepas card) {

View file

@ -1,19 +1,20 @@
package mage.abilities.effects.common.combat;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.RequirementEffect;
import mage.constants.Duration;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* http://tappedout.net/mtg-questions/must-be-blocked-if-able-effect-makes-other-attacking-creatures-essentially-unblockable/
*
* <p>
* When you Declare Blockers, you choose an arrangement for your blockers, then
* check to see if there are any restrictions or requirements.
*
* <p>
* If any restrictions are violated, the block is illegal. (For example, trying
* to block with Sightless Ghoul) If any requirements are violated, the least
* possible number of requirements must be violated, otherwise the block is
@ -35,12 +36,8 @@ import mage.game.permanent.Permanent;
* @author LevelX2
*/
public class MustBeBlockedByAtLeastOneSourceEffect extends RequirementEffect {
private int minNumberOfBlockers;
public MustBeBlockedByAtLeastOneSourceEffect() {
this(Duration.EndOfTurn);
}
private int minNumberOfBlockers;
public MustBeBlockedByAtLeastOneSourceEffect(Duration duration) {
this(duration, 1);