mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
[STX] added null check to Selfless Glyphweaver
This commit is contained in:
parent
37a58299a6
commit
763fdbd6f7
1 changed files with 11 additions and 6 deletions
|
@ -26,14 +26,17 @@ import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author htrajan
|
* @author htrajan
|
||||||
*/
|
*/
|
||||||
public final class SelflessGlyphweaver extends ModalDoubleFacesCard {
|
public final class SelflessGlyphweaver extends ModalDoubleFacesCard {
|
||||||
|
|
||||||
public SelflessGlyphweaver(UUID ownerId, CardSetInfo setInfo) {
|
public SelflessGlyphweaver(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.CLERIC}, "{2}{W}",
|
super(
|
||||||
"Deadly Vanity", new CardType[]{CardType.SORCERY}, new SubType[]{}, "{5}{B}{B}{B}");
|
ownerId, setInfo,
|
||||||
|
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.CLERIC}, "{2}{W}",
|
||||||
|
"Deadly Vanity",
|
||||||
|
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{5}{B}{B}{B}"
|
||||||
|
);
|
||||||
|
|
||||||
// 1.
|
// 1.
|
||||||
// Selfless Glyphweaver
|
// Selfless Glyphweaver
|
||||||
|
@ -73,10 +76,12 @@ class DeadlyVanityEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
TargetPermanent target = new TargetCreatureOrPlaneswalker();
|
TargetPermanent target = new TargetCreatureOrPlaneswalker();
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
|
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
|
||||||
controller.choose(outcome, target, source.getId(), game);
|
controller.choose(outcome, target, source.getId(), game);
|
||||||
|
|
||||||
FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent();
|
FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent();
|
||||||
|
@ -91,4 +96,4 @@ class DeadlyVanityEffect extends OneShotEffect {
|
||||||
public DeadlyVanityEffect copy() {
|
public DeadlyVanityEffect copy() {
|
||||||
return new DeadlyVanityEffect(this);
|
return new DeadlyVanityEffect(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue