1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 09:11:04 -09:00

Fixed Desolation Angel.

This commit is contained in:
magenoxx 2011-09-14 00:35:59 +04:00
parent cc415c586d
commit 62748c511b

View file

@ -42,17 +42,17 @@ import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author Loki
*/
public class DesolationAngel extends CardImpl<DesolationAngel> {
public DesolationAngel (UUID ownerId) {
public DesolationAngel(UUID ownerId) {
super(ownerId, 38, "Desolation Angel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.expansionSetCode = "APC";
this.subtype.add("Angel");
@ -63,7 +63,7 @@ public class DesolationAngel extends CardImpl<DesolationAngel> {
this.addAbility(new EntersBattlefieldTriggeredAbility(new DesolationAngelEntersBattlefieldEffect()));
}
public DesolationAngel (final DesolationAngel card) {
public DesolationAngel(final DesolationAngel card) {
super(card);
}
@ -105,16 +105,19 @@ class DesolationAngelEntersBattlefieldEffect extends OneShotEffect<DesolationAng
@Override
public boolean apply(Game game, Ability source) {
Permanent p = game.getPermanent(source.getSourceId());
if (p != null) {
Card p = game.getCard(source.getSourceId());
boolean kicked = false;
for (Object cost: p.getSpellAbility().getOptionalCosts()) {
if (p != null) {
for (Object cost : p.getSpellAbility().getOptionalCosts()) {
if (cost instanceof ManaCost) {
if (((ManaCost)cost).isPaid()) {
if (((ManaCost) cost).isPaid()) {
kicked = true;
}
}
}
}
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
if (permanent.getCardType().contains(CardType.LAND)) {
if ((!kicked && permanent.getControllerId() == source.getControllerId()) || kicked) {
@ -122,10 +125,9 @@ class DesolationAngelEntersBattlefieldEffect extends OneShotEffect<DesolationAng
}
}
}
return true;
}
return false;
}
@Override
public DesolationAngelEntersBattlefieldEffect copy() {