mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
[C13] Added Sun Droplet and Lim-Dul's Vaul.
This commit is contained in:
parent
773500dadb
commit
16eee07a74
6 changed files with 381 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue