Fixed some bugs and added a AI Test player class.

This commit is contained in:
LevelX2 2015-06-08 18:31:54 +02:00
parent 9da44a547d
commit 3b61a10237
25 changed files with 1732 additions and 388 deletions

View file

@ -78,7 +78,7 @@ public class DevoutChaplain extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {tap}, Tap two untapped Humans you control: Exile target artifact or enchantment.
// {T}, Tap two untapped Humans you control: Exile target artifact or enchantment.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost());
ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false)));
ability.addTarget(new TargetPermanent(filter));

View file

@ -102,11 +102,11 @@ class SewerNemesisChoosePlayerEffect extends OneShotEffect {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
if (player != null && permanent != null) {
TargetPlayer target = new TargetPlayer();
TargetPlayer target = new TargetPlayer(1,1,true);
if (player.choose(this.outcome, target, source.getSourceId(), game)) {
Player chosenPlayer = game.getPlayer(target.getFirstTarget());
if (chosenPlayer != null) {
game.informPlayers(permanent.getName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
game.informPlayers(permanent.getLogName() + ": " + player.getLogName() + " has chosen " + chosenPlayer.getLogName());
game.getState().setValue(permanent.getId() + "_player", target.getFirstTarget());
return true;
}

View file

@ -58,10 +58,16 @@ public class SheoldredWhisperingOne extends CardImpl {
this.power = new MageInt(6);
this.toughness = new MageInt(6);
// Swampwalk
this.addAbility(new SwampwalkAbility());
// At the beginning of your upkeep, return target creature card from your graveyard to the battlefield.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false), TargetController.YOU, false);
ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
this.addAbility(ability);
// At the beginning of each opponent's upkeep, that player sacrifices a creature.
ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(new FilterCreaturePermanent(), 1, "that player "), TargetController.OPPONENT, false);
this.addAbility(ability);
}

View file

@ -45,6 +45,7 @@ public class DiabolicEdict extends CardImpl {
super(ownerId, 22, "Diabolic Edict", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}");
this.expansionSetCode = "TMP";
// Target player sacrifices a creature.
this.getSpellAbility().addEffect(new SacrificeEffect(new FilterCreaturePermanent(), 1, "Target player"));
this.getSpellAbility().addTarget(new TargetPlayer());
}