Some changes to framework functions, some minor changes to existing cards.

This commit is contained in:
LevelX2 2014-12-20 18:17:12 +01:00
parent 0ef340d108
commit e4dbb3c9fc
9 changed files with 76 additions and 20 deletions

View file

@ -23,4 +23,11 @@ public class CastFromHandCondition implements Condition {
}
return false;
}
@Override
public String toString() {
return "you cast it from your hand";
}
}

View file

@ -93,7 +93,7 @@ public class ConditionalOneShotEffect extends OneShotEffect {
return staticText;
}
if (otherwiseEffect == null) {
return "If " + condition.toString() + ", " + effect.getText(mode);
return "if " + condition.toString() + ", " + effect.getText(mode);
}
return effect.getText(mode) + ". If " + condition.toString() + ", " + otherwiseEffect.getText(mode);
}

View file

@ -43,18 +43,21 @@ public class BushidoAbility extends BlocksOrBecomesBlockedTriggeredAbility {
public BushidoAbility(int value) {
this(new StaticValue(value));
rule = new StringBuilder("Bushido ").append(value).toString();
rule = "Bushido " + value + getReminder(Integer.toString(value));
}
public BushidoAbility(DynamicValue value) {
super(new BoostSourceEffect(value, value, Duration.EndOfTurn, true), false);
if (rule == null) {
rule = new StringBuilder("{this} has bushido X, where X is ").append(value.getMessage()).toString();
if (!(value instanceof StaticValue)) {
rule = "{this} has bushido X, where X is " + value.getMessage() + getReminder(value.toString());
}
rule = new StringBuilder(rule).append(" <i>(When this blocks or becomes blocked, it gets +").append(value.toString()).append("/+").append(value.toString()).append(" until end of turn.)</i>").toString();
this.value = value;
}
static String getReminder(String xValue) {
return " <i>(When this blocks or becomes blocked, it gets +" + xValue+ "/+" + xValue + " until end of turn.)</i>";
}
public BushidoAbility(final BushidoAbility ability) {
super(ability);
this.value = ability.value;

View file

@ -201,7 +201,11 @@ class SpliceOntoArcaneEffect extends SpliceCardEffectImpl {
// check if spell can be activated (protection problem not solved because effect will be used from the base spell?)
Card card = game.getCard(source.getSourceId());
if (card != null) {
return card.getSpellAbility().canActivate(source.getControllerId(), game);
if (card.getManaCost().isEmpty()) { // e.g. Evermind
return card.getSpellAbility().spellCanBeActivatedRegularlyNow(source.getControllerId(), game);
} else {
return card.getSpellAbility().canActivate(source.getControllerId(), game);
}
}
return false;
}