[DTK] Some fixes to Dromoka's Command and Enduring Scalelord.

This commit is contained in:
LevelX2 2015-03-19 00:29:36 +01:00
parent 81d5d4145a
commit aff5f9f2e7
3 changed files with 19 additions and 8 deletions

View file

@ -58,8 +58,8 @@ import mage.target.common.TargetCreaturePermanent;
public class DromokasCommand extends CardImpl {
private static final FilterStackObject filterInstantOrSorcery = new FilterStackObject("instant or sorcery spell");
private static final FilterPermanent filterEnchantment = new FilterPermanent("enchantment");
private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to put the +1/+1 counter on");
private static final FilterPermanent filterEnchantment = new FilterPermanent("an enchantment");
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");
static {
@ -82,19 +82,23 @@ public class DromokasCommand extends CardImpl {
// or Target player sacrifices an enchantment;
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());
this.getSpellAbility().getModes().addMode(mode);
// Put a +1/+1 counter on target creature;
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));
this.getSpellAbility().getModes().addMode(mode);
// or Target creature you control fights target creature you don't control.
mode = new Mode();
Effect effect = new FightTargetsEffect();
effect = new FightTargetsEffect();
effect.setText("Target creature you control fights target creature you don't control");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetControlledCreaturePermanent());

View file

@ -75,7 +75,7 @@ public class EnduringScalelord extends CardImpl {
class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl {
EnduringScalelordTriggeredAbility() {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true);
}
EnduringScalelordTriggeredAbility(final EnduringScalelordTriggeredAbility ability) {
@ -87,10 +87,15 @@ class EnduringScalelordTriggeredAbility extends TriggeredAbilityImpl {
return new EnduringScalelordTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.COUNTERS_ADDED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.COUNTER_ADDED
&& event.getData().equals(CounterType.P1P1.getName())) {
if (event.getData().equals(CounterType.P1P1.getName())) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
return (!event.getTargetId().equals(this.getSourceId())
&& permanent.getCardType().contains(CardType.CREATURE)

View file

@ -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.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.COUNTERS_ADDED, objectId, controllerId, counter.getName(), amount));
}
}