- little fixes Mindstorm Crown

This commit is contained in:
Jeff 2019-03-28 14:25:44 -05:00
parent 16efc350b4
commit 3b897f04d8

View file

@ -1,4 +1,3 @@
package mage.cards.m;
import java.util.UUID;
@ -44,7 +43,7 @@ class MindstormCrownEffect extends OneShotEffect {
MindstormCrownEffect() {
super(Outcome.Benefit);
this.staticText = "";
this.staticText = "draw a card if you had no cards in hand at the beginning of this turn. If you had a card in hand, {this} deals 1 damage to you";
}
MindstormCrownEffect(final MindstormCrownEffect effect) {
@ -58,17 +57,18 @@ class MindstormCrownEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (player == null) {
if (controller == null) {
return false;
}
MindstormCrownWatcher watcher = game.getState().getWatcher(MindstormCrownWatcher.class);
if (watcher != null && watcher.getCardsInHandCount() == 0) {
player.drawCards(1, game);
if (watcher != null
&& watcher.getCardsInHandCount() == 0) {
controller.drawCards(1, game);
} else {
if (permanent != null) {
player.damage(2, permanent.getId(), game, false, true);
controller.damage(1, permanent.getId(), game, false, true);
}
}
return true;