- Added Evangelize

This commit is contained in:
swordshine
2014-03-10 13:32:03 +00:00
parent a0b26dfe02
commit 2b14baabb5
11 changed files with 57 additions and 5 deletions

View File

@@ -6,8 +6,6 @@ import forge.game.card.Card;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.Random;

View File

@@ -65,6 +65,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private String stackDescription = "";
private ManaCost multiKickerManaCost = null;
private Player activatingPlayer = null;
private Player targetingPlayer = null;
private boolean basicLandAbility; // granted by basic land type
@@ -263,6 +264,20 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
}
/**
* @return the targetingPlayer
*/
public Player getTargetingPlayer() {
return targetingPlayer;
}
/**
* @param targetingPlayer the targetingPlayer to set
*/
public void setTargetingPlayer(Player targetingPlayer) {
this.targetingPlayer = targetingPlayer;
}
/**
* <p>
* isSpell.
@@ -1031,6 +1046,12 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
}
}
if (hasParam("TargetingPlayerControls") && entity instanceof Card) {
final Card c = (Card) entity;
if (!c.getController().equals(targetingPlayer)) {
return false;
}
}
String[] validTgt = tr.getValidTgts();
if (entity instanceof GameEntity && !((GameEntity) entity).isValid(validTgt, this.getActivatingPlayer(), this.getHostCard()))