1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-03 17:00:16 -09:00

- Duelist's Heritage will no longer give an opponent's creature Double-Strike. (JayDi85)

This commit is contained in:
jeffwadsworth 2020-07-16 10:12:10 -05:00
parent 6b26c40d1d
commit e149e9ef95

View file

@ -23,7 +23,7 @@ import mage.target.common.TargetCreaturePermanent;
* @author fireshoes * @author fireshoes
*/ */
public final class DuelistsHeritage extends CardImpl { public final class DuelistsHeritage extends CardImpl {
public DuelistsHeritage(UUID ownerId, CardSetInfo setInfo) { public DuelistsHeritage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
@ -37,11 +37,11 @@ public final class DuelistsHeritage extends CardImpl {
ability.addTarget(new TargetCreaturePermanent(new FilterAttackingCreature())); ability.addTarget(new TargetCreaturePermanent(new FilterAttackingCreature()));
this.addAbility(ability); this.addAbility(ability);
} }
public DuelistsHeritage(final DuelistsHeritage card) { public DuelistsHeritage(final DuelistsHeritage card) {
super(card); super(card);
} }
@Override @Override
public DuelistsHeritage copy() { public DuelistsHeritage copy() {
return new DuelistsHeritage(this); return new DuelistsHeritage(this);
@ -49,25 +49,25 @@ public final class DuelistsHeritage extends CardImpl {
} }
class DuelistsHeritageTriggeredAbility extends TriggeredAbilityImpl { class DuelistsHeritageTriggeredAbility extends TriggeredAbilityImpl {
public DuelistsHeritageTriggeredAbility(Zone zone, Effect effect) { public DuelistsHeritageTriggeredAbility(Zone zone, Effect effect) {
super(zone, effect, true); super(zone, effect, true);
} }
public DuelistsHeritageTriggeredAbility(final DuelistsHeritageTriggeredAbility ability) { public DuelistsHeritageTriggeredAbility(final DuelistsHeritageTriggeredAbility ability) {
super(ability); super(ability);
} }
@Override @Override
public DuelistsHeritageTriggeredAbility copy() { public DuelistsHeritageTriggeredAbility copy() {
return new DuelistsHeritageTriggeredAbility(this); return new DuelistsHeritageTriggeredAbility(this);
} }
@Override @Override
public boolean checkEventType(GameEvent event, Game game) { public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == EventType.DECLARED_ATTACKERS; return event.getType() == EventType.DECLARED_ATTACKERS;
} }
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
// AI workaround to disable it on opponent's attacks - JayDi85 // AI workaround to disable it on opponent's attacks - JayDi85
@ -76,10 +76,9 @@ class DuelistsHeritageTriggeredAbility extends TriggeredAbilityImpl {
} else { } else {
this.addCustomOutcome(Outcome.AIDontUseIt); this.addCustomOutcome(Outcome.AIDontUseIt);
} }
return !game.getCombat().getAttackers().isEmpty(); return !game.getCombat().getAttackers().isEmpty();
} }
@Override @Override
public String getRule() { public String getRule() {
return "Whenever one or more creatures attack, " + super.getRule(); return "Whenever one or more creatures attack, " + super.getRule();