mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Fecundity - Fixed that not always LKI was retrieved to check if a creature died (fixes #6867).
This commit is contained in:
parent
ba7a8ecb82
commit
73395aabd4
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -21,7 +20,7 @@ import mage.players.Player;
|
|||
public final class Fecundity extends CardImpl {
|
||||
|
||||
public Fecundity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
// Whenever a creature dies, that creature's controller may draw a card.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(new FecundityEffect(), false, false, true));
|
||||
|
@ -55,7 +54,9 @@ class FecundityEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD);
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(this.getTargetPointer()
|
||||
// Card can be moved again (e.g. commander replacement) so we need the row id from fixed target to check
|
||||
.getFixedTarget(game, source).getTarget(), Zone.BATTLEFIELD);
|
||||
if (permanent != null) {
|
||||
Player controller = game.getPlayer(permanent.getControllerId());
|
||||
if (controller != null) {
|
||||
|
|
Loading…
Reference in a new issue