[C13] Added Sun Droplet and Lim-Dul's Vaul.

This commit is contained in:
LevelX2 2013-11-27 08:17:52 +01:00
parent 773500dadb
commit 16eee07a74
6 changed files with 381 additions and 3 deletions

View file

@ -40,7 +40,7 @@ import mage.game.permanent.Permanent;
*/
public class HasCounterCondition implements Condition {
private CounterType counterType;
private final CounterType counterType;
private int amount = 1;
private int from = -1;
private int to;
@ -61,6 +61,7 @@ public class HasCounterCondition implements Condition {
}
@Override
@SuppressWarnings("null")
public boolean apply(Game game, Ability source) {
Card card = null;
Permanent permanent = game.getPermanent(source.getSourceId());

View file

@ -35,7 +35,7 @@ public class DoIfCostPaid extends OneShotEffect<DoIfCostPaid> {
message = CardUtil.replaceSourceName(message, mageObject.getName());
if (player.chooseUse(executingEffect.getOutcome(), message, game)) {
cost.clearPaid();
if (cost.pay(source, game, source.getId(), source.getControllerId(), false)) {
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
executingEffect.setTargetPointer(this.targetPointer);
return executingEffect.apply(game, source);
}
@ -47,13 +47,19 @@ public class DoIfCostPaid extends OneShotEffect<DoIfCostPaid> {
@Override
public String getText(Mode mode) {
if (!staticText.isEmpty()) {
return staticText;
}
return new StringBuilder("you may ").append(getCostText()).append(". If you do, ").append(executingEffect.getText(mode)).toString();
}
private String getCostText() {
StringBuilder sb = new StringBuilder();
String costText = cost.getText();
if (costText != null && !costText.toLowerCase().startsWith("discard") && !costText.toLowerCase().startsWith("sacrifice")) {
if (costText != null &&
!costText.toLowerCase().startsWith("discard")
&& !costText.toLowerCase().startsWith("sacrifice")
&& !costText.toLowerCase().startsWith("remove")) {
sb.append("pay ");
}
return sb.append(costText).toString();