mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
Fixed message of snapcaster mage to be printed only once.
This commit is contained in:
parent
3386a2e983
commit
5a68ba33da
1 changed files with 8 additions and 1 deletions
|
|
@ -107,6 +107,14 @@ class SnapcasterMageEffect extends ContinuousEffectImpl<SnapcasterMageEffect> {
|
|||
public SnapcasterMageEffect copy() {
|
||||
return new SnapcasterMageEffect(this);
|
||||
}
|
||||
@Override
|
||||
public void init(Ability source, Game game) {
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (card != null && sourceObject != null) {
|
||||
game.informPlayers(new StringBuilder(sourceObject.getName()).append(" gained Flashback to ").append(card.getName()).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
|
@ -121,7 +129,6 @@ class SnapcasterMageEffect extends ContinuousEffectImpl<SnapcasterMageEffect> {
|
|||
ability.setSourceId(card.getId());
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card.getId(), ability);
|
||||
game.informPlayers(new StringBuilder(sourceObject.getName()).append(" gained Flashback to ").append(card.getName()).toString());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue