mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Fixed Issue#59: Reassembling Skeleton's log message incomplete
This commit is contained in:
parent
a3b99c7ff0
commit
399cad1836
1 changed files with 16 additions and 4 deletions
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.abilities;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.AbilityType;
|
||||
import mage.Constants.TimingRule;
|
||||
import mage.Constants.Zone;
|
||||
|
@ -41,8 +40,11 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.Effects;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.target.Target;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
@ -177,10 +179,20 @@ public abstract class ActivatedAbilityImpl<T extends ActivatedAbilityImpl<T>> ex
|
|||
protected String getMessageText(Game game) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
MageObject object = game.getObject(this.sourceId);
|
||||
if (object != null)
|
||||
sb.append(object.getName());
|
||||
else
|
||||
if (object != null) {
|
||||
if (object instanceof StackAbility) {
|
||||
Card card = game.getCard(((StackAbility) object).getSourceId());
|
||||
if (card != null) {
|
||||
sb.append(card.getName());
|
||||
} else {
|
||||
sb.append(object.getName());
|
||||
}
|
||||
} else {
|
||||
sb.append(object.getName());
|
||||
}
|
||||
} else {
|
||||
sb.append("unknown");
|
||||
}
|
||||
if (getTargets().size() > 0) {
|
||||
sb.append(" targeting ");
|
||||
for (Target target: getTargets()) {
|
||||
|
|
Loading…
Reference in a new issue