* Fruit of the First Tree - Fixed that the life and card draw gained wronlgy the creature controller instead of Fruits controller.

This commit is contained in:
LevelX2 2015-01-30 13:28:22 +01:00
parent d8661113b4
commit d37f40a14e

View file

@ -28,7 +28,6 @@
package mage.sets.fatereforged;
import java.util.UUID;
import static javax.xml.bind.JAXBIntrospector.getValue;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.DiesAttachedTriggeredAbility;
@ -94,15 +93,13 @@ class FruitOfTheFirstTreeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent creature = (Permanent) getValue("attachedTo");
if (creature != null){
Player controller = game.getPlayer(creature.getOwnerId());
if (controller != null) {
if (controller != null && creature != null) {
controller.gainLife(creature.getToughness().getValue(), game);
controller.drawCards(creature.getToughness().getValue(), game);
return true;
}
}
return false;
}