mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
- Fixed Followed Footsteps. Related to Bug #6236
This commit is contained in:
parent
fcf27e55d6
commit
f320b5507b
1 changed files with 10 additions and 8 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -14,6 +13,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -29,7 +29,7 @@ import mage.target.targetpointer.FixedTarget;
|
||||||
public final class FollowedFootsteps extends CardImpl {
|
public final class FollowedFootsteps extends CardImpl {
|
||||||
|
|
||||||
public FollowedFootsteps(UUID ownerId, CardSetInfo setInfo) {
|
public FollowedFootsteps(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}");
|
||||||
this.subtype.add(SubType.AURA);
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
// Enchant creature
|
// Enchant creature
|
||||||
|
@ -71,12 +71,14 @@ class FollowedFootstepsEffect extends OneShotEffect {
|
||||||
|
|
||||||
@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);
|
||||||
Permanent target = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
|
if (enchantment != null) {
|
||||||
if (target != null) {
|
Permanent target = game.getPermanentOrLKIBattlefield(enchantment.getAttachedTo());
|
||||||
Effect effect = new CreateTokenCopyTargetEffect();
|
if (target != null) {
|
||||||
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
Effect effect = new CreateTokenCopyTargetEffect();
|
||||||
return effect.apply(game, source);
|
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
||||||
|
return effect.apply(game, source);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue