mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
- Null check added
This commit is contained in:
parent
c76b6ece7b
commit
ce1ff40ca0
1 changed files with 6 additions and 3 deletions
|
|
@ -134,11 +134,14 @@ class MindsDesireCastFromExileEffect extends AsThoughEffectImpl {
|
|||
@Override
|
||||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||
UUID targetId = getTargetPointer().getFirst(game, source);
|
||||
if (targetId != null && targetId.equals(sourceId)) {
|
||||
Player player = game.getPlayer(affectedControllerId);
|
||||
if (targetId != null
|
||||
&& targetId.equals(sourceId)
|
||||
&& player != null) {
|
||||
if (affectedControllerId.equals(source.getControllerId())) {
|
||||
Card card = game.getCard(sourceId);
|
||||
if (card != null && game.getState().getZone(sourceId) == Zone.EXILED) {
|
||||
Player player = game.getPlayer(affectedControllerId);
|
||||
if (card != null
|
||||
&& game.getState().getZone(sourceId) == Zone.EXILED) {
|
||||
player.setCastSourceIdWithAlternateMana(sourceId, null, card.getSpellAbility().getCosts());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue