Fixed GainAbilitySourceEffect

This commit is contained in:
Plopman 2014-01-22 18:09:35 +01:00
parent b0f137ffec
commit b0b57fd475

View file

@ -41,7 +41,7 @@ import mage.game.permanent.Permanent;
*
* @author BetaSteward_at_googlemail.com
*/
public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySourceEffect> {
public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySourceEffect> implements SourceEffect {
protected Ability ability;
// shall a card gain the ability (otherwise permanent)
@ -87,6 +87,12 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
return new GainAbilitySourceEffect(this);
}
@Override
public void init(Ability source, Game game) {
super.init(source, game);
getAffectedObjects().add(source.getSourceId());
}
@Override
public boolean apply(Game game, Ability source) {
if (onCard) {