mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[DTK] Some fixes to Dromoka's Command and Enduring Scalelord.
This commit is contained in:
parent
81d5d4145a
commit
aff5f9f2e7
3 changed files with 19 additions and 8 deletions
|
@ -58,8 +58,8 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
public class DromokasCommand extends CardImpl {
|
public class DromokasCommand extends CardImpl {
|
||||||
|
|
||||||
private static final FilterStackObject filterInstantOrSorcery = new FilterStackObject("instant or sorcery spell");
|
private static final FilterStackObject filterInstantOrSorcery = new FilterStackObject("instant or sorcery spell");
|
||||||
private static final FilterPermanent filterEnchantment = new FilterPermanent("enchantment");
|
private static final FilterPermanent filterEnchantment = new FilterPermanent("an enchantment");
|
||||||
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to put the +1/+1 counter on");
|
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to put a +1/+1 counter on it");
|
||||||
private static final FilterCreaturePermanent filterUncontrolledCreature = new FilterCreaturePermanent("creature you don't control");
|
private static final FilterCreaturePermanent filterUncontrolledCreature = new FilterCreaturePermanent("creature you don't control");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -82,19 +82,23 @@ public class DromokasCommand extends CardImpl {
|
||||||
|
|
||||||
// or Target player sacrifices an enchantment;
|
// or Target player sacrifices an enchantment;
|
||||||
Mode mode = new Mode();
|
Mode mode = new Mode();
|
||||||
mode.getEffects().add(new SacrificeEffect(filterEnchantment, 1, "target player"));
|
Effect effect = new SacrificeEffect(filterEnchantment, 1, "target player");
|
||||||
|
effect.setText("Target player sacrifices an enchantment");
|
||||||
|
mode.getEffects().add(effect);
|
||||||
mode.getTargets().add(new TargetPlayer());
|
mode.getTargets().add(new TargetPlayer());
|
||||||
this.getSpellAbility().getModes().addMode(mode);
|
this.getSpellAbility().getModes().addMode(mode);
|
||||||
|
|
||||||
// Put a +1/+1 counter on target creature;
|
// Put a +1/+1 counter on target creature;
|
||||||
mode = new Mode();
|
mode = new Mode();
|
||||||
mode.getEffects().add(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
|
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
|
||||||
|
effect.setText("Put a +1/+1 counter on target creature");
|
||||||
|
mode.getEffects().add(effect);
|
||||||
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
|
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
|
||||||
this.getSpellAbility().getModes().addMode(mode);
|
this.getSpellAbility().getModes().addMode(mode);
|
||||||
|
|
||||||
// or Target creature you control fights target creature you don't control.
|
// or Target creature you control fights target creature you don't control.
|
||||||
mode = new Mode();
|
mode = new Mode();
|
||||||
Effect effect = new FightTargetsEffect();
|
effect = new FightTargetsEffect();
|
||||||
effect.setText("Target creature you control fights target creature you don't control");
|
effect.setText("Target creature you control fights target creature you don't control");
|
||||||
mode.getEffects().add(effect);
|
mode.getEffects().add(effect);
|
||||||
mode.getTargets().add(new TargetControlledCreaturePermanent());
|
mode.getTargets().add(new TargetControlledCreaturePermanent());
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class EnduringScalelord extends CardImpl {
|
||||||
class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl {
|
class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
EnduringScalelordTriggeredAbility() {
|
EnduringScalelordTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
|
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
EnduringScalelordTriggeredAbility(final EnduringScalelordTriggeredAbility ability) {
|
EnduringScalelordTriggeredAbility(final EnduringScalelordTriggeredAbility ability) {
|
||||||
|
@ -87,10 +87,15 @@ class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
return new EnduringScalelordTriggeredAbility(this);
|
return new EnduringScalelordTriggeredAbility(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.COUNTERS_ADDED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == GameEvent.EventType.COUNTER_ADDED
|
if (event.getData().equals(CounterType.P1P1.getName())) {
|
||||||
&& event.getData().equals(CounterType.P1P1.getName())) {
|
|
||||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
|
||||||
return (!event.getTargetId().equals(this.getSourceId())
|
return (!event.getTargetId().equals(this.getSourceId())
|
||||||
&& permanent.getCardType().contains(CardType.CREATURE)
|
&& permanent.getCardType().contains(CardType.CREATURE)
|
||||||
|
|
|
@ -316,6 +316,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER_ADDED, objectId, controllerId, name, 1));
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER_ADDED, objectId, controllerId, name, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERS_ADDED, objectId, controllerId, name, amount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,6 +336,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER_ADDED, objectId, controllerId, counter.getName(), 1));
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTER_ADDED, objectId, controllerId, counter.getName(), 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERS_ADDED, objectId, controllerId, counter.getName(), amount));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue