* Fixed a problem with stack abilities created by Designations eg. Monarch triggered ability (fixes #4457).

This commit is contained in:
LevelX2 2018-04-26 23:35:26 +02:00
parent c3934ae70b
commit 329116669a
6 changed files with 184 additions and 156 deletions

View file

@ -52,7 +52,7 @@ import mage.target.common.TargetTriggeredAbility;
public class StrionicResonator extends CardImpl {
public StrionicResonator(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// {2}, {T}: Copy target triggered ability you control. You may choose new targets for the copy.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StrionicResonatorEffect(), new ManaCostsImpl("{2}"));
@ -89,7 +89,7 @@ class StrionicResonatorEffect extends OneShotEffect {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (controller != null && sourcePermanent != null) {
stackAbility.createCopyOnStack(game, source, source.getControllerId(), true);
game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied triggered ability").toString());
game.informPlayers(sourcePermanent.getIdName() + ": " + controller.getLogName() + " copied triggered ability");
return true;
}
}