remove unnecessary null check

This commit is contained in:
xenohedron 2023-10-11 22:04:47 -04:00
parent 0d9121bf10
commit 578b6821b5

View file

@ -6,7 +6,6 @@ import mage.cards.Card;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.players.Player;
@ -41,8 +40,7 @@ public class GainAbilityControlledSpellsEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
if (player == null || permanent == null) {
if (player == null) {
return false;
}