mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Fixed Fractured Loyalty. Related to Bug #6236
This commit is contained in:
parent
f320b5507b
commit
e9930504f6
1 changed files with 2 additions and 3 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -65,14 +64,14 @@ public final class FracturedLoyalty extends CardImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
Permanent enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
if (enchantment != null) {
|
||||
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
|
||||
if (enchantedCreature != null) {
|
||||
Player controller = game.getPlayer(enchantedCreature.getControllerId());
|
||||
if (enchantment.getAttachedTo() != null) {
|
||||
if (controller != null && !enchantedCreature.isControlledBy(this.getTargetPointer().getFirst(game, source))) {
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, this.getTargetPointer().getFirst(game, source));
|
||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, this.getTargetPointer().getFirst(game, source));
|
||||
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue