mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +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;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -65,14 +64,14 @@ public final class FracturedLoyalty extends CardImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
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) {
|
if (enchantment != null) {
|
||||||
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
|
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
|
||||||
if (enchantedCreature != null) {
|
if (enchantedCreature != null) {
|
||||||
Player controller = game.getPlayer(enchantedCreature.getControllerId());
|
Player controller = game.getPlayer(enchantedCreature.getControllerId());
|
||||||
if (enchantment.getAttachedTo() != null) {
|
if (enchantment.getAttachedTo() != null) {
|
||||||
if (controller != null && !enchantedCreature.isControlledBy(this.getTargetPointer().getFirst(game, source))) {
|
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()));
|
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue