mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Fixed that soulbond arrow to paired card was not shown and improved soulbond text on permanent.
This commit is contained in:
parent
014c93e05e
commit
3b19304f64
4 changed files with 10 additions and 11 deletions
|
|
@ -32,7 +32,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.TargetController;
|
||||
|
|
@ -47,6 +46,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.util.GameLog;
|
||||
|
||||
/**
|
||||
* 702.94. Soulbond
|
||||
|
|
@ -168,7 +168,9 @@ class SoulboundEntersSelfEffect extends OneShotEffect {
|
|||
Permanent chosen = game.getPermanent(target.getFirstTarget());
|
||||
if (chosen != null) {
|
||||
chosen.setPairedCard(new MageObjectReference(permanent, game));
|
||||
chosen.addInfo("soulbond", "Soulbond to " + GameLog.getColoredObjectIdNameForTooltip(permanent), game);
|
||||
permanent.setPairedCard(new MageObjectReference(chosen, game));
|
||||
permanent.addInfo("soulbond", "Soulbond to " + GameLog.getColoredObjectIdNameForTooltip(chosen), game);
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + " soulbonds " + permanent.getLogName() + " with " + chosen.getLogName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1319,6 +1319,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
@Override
|
||||
public void setPairedCard(MageObjectReference pairedCard) {
|
||||
this.pairedPermanent = pairedCard;
|
||||
if (pairedCard == null) {
|
||||
// remove existing soulbond info text
|
||||
this.addInfo("soulbond", null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue