Update BlazingSalvo.java

This commit is contained in:
cbt33 2013-10-16 14:36:31 -04:00
parent 8ed1bff72c
commit e86f2433a1

View file

@ -52,8 +52,8 @@ public class BlazingSalvo extends CardImpl<BlazingSalvo> {
this.color.setRed(true); this.color.setRed(true);
// Blazing Salvo deals 3 damage to target creature unless that creature's controller has Blazing Salvo deal 5 damage to him or her. // Blazing Salvo deals 3 damage to target creature unless that creature's controller has Blazing Salvo deal 5 damage to him or her.
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
this.getSpellAbility().addEffect(new BlazingSalvoEffect()); this.getSpellAbility().addEffect(new BlazingSalvoEffect());
} }
public BlazingSalvo(final BlazingSalvo card) { public BlazingSalvo(final BlazingSalvo card) {
@ -82,23 +82,23 @@ class BlazingSalvoEffect extends OneShotEffect<BlazingSalvoEffect> {
return new BlazingSalvoEffect(this); return new BlazingSalvoEffect(this);
} }
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget()); Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
if (permanent != null) { if (permanent != null) {
Player player = game.getPlayer(permanent.getControllerId()); Player player = game.getPlayer(permanent.getControllerId());
if (player != null) { if (player != null) {
String message = "Have Blazing Salvo do 5 damage to you?"; String message = "Have Blazing Salvo do 5 damage to you?";
if (player.chooseUse(Outcome.Damage, message, game)){ if (player.chooseUse(Outcome.Damage, message, game)){
player.damage(5, source.getSourceId(), game, true, false); player.damage(5, source.getSourceId(), game, true, false);
} else { } else {
permanent.damage(3, source.getSourceId(), game, true, false); permanent.damage(3, source.getSourceId(), game, true, false);
} }
return true; return true;
}
} }
} return false;
return false; }
}
} }