Some minor fixes and improvements.

This commit is contained in:
LevelX2 2013-10-02 14:27:00 +02:00
parent d97ecc4ec0
commit a98683fc18
4 changed files with 20 additions and 5 deletions

View file

@ -115,7 +115,7 @@ class BloodlordOfVaasgothEffect extends ContinuousEffectImpl {
if (object != null) {
Permanent permanent = game.getPermanent(object.getSourceId());
if (permanent != null) {
permanent.addAbility(ability, game);
permanent.addAbility(ability, source.getSourceId(), game);
return true;
}
} else {

View file

@ -140,6 +140,7 @@ class XenagosManaEffect extends OneShotEffect <XenagosManaEffect> {
}
player.getManaPool().addMana(mana, game, source);
}
return true;
}
return false;
}

View file

@ -24,7 +24,7 @@ import mage.game.Game;
public class ConditionalActivatedAbility extends ActivatedAbilityImpl<ConditionalActivatedAbility> {
private Condition condition;
private String ruleText = "";
private String ruleText = null;
private static final Effects emptyEffects = new Effects();
@ -75,6 +75,9 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl<Conditiona
@Override
public String getRule() {
return ruleText;
if (ruleText != null && !ruleText.isEmpty()) {
return ruleText;
}
return new StringBuilder(super.getRule()).append(" Activate this ability only if ").append(condition.toString()).append(".").toString();
}
}

View file

@ -8,6 +8,7 @@ import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.util.CardUtil;
import mage.watchers.common.BloodthirstWatcher;
/**
@ -34,7 +35,15 @@ public class BloodthirstAbility extends EntersBattlefieldAbility {
@Override
public String getRule() {
return "Bloodthirst " + amount;
StringBuilder sb = new StringBuilder("Bloodthirst ").append(amount)
.append(" <i>(If an opponent was dealt damage this turn, this creature enters the battlefield with ");
if (amount == 1) {
sb.append("a +1/+1 counter");
} else {
sb.append(CardUtil.numberToText(amount)).append(" counters");
}
sb.append(" on it.)</i>");
return sb.toString();
}
}
@ -44,7 +53,7 @@ class BloodthirstEffect extends OneShotEffect<BloodthirstEffect> {
BloodthirstEffect(int amount) {
super(Outcome.BoostCreature);
this.amount = amount;
staticText = "this permanent comes into play with " + amount + " +1/+1 counters on it";
staticText = new StringBuilder("this permanent comes into play with ").append(this.amount).append(" +1/+1 counters on it").toString();
}
BloodthirstEffect(final BloodthirstEffect effect) {
@ -61,8 +70,10 @@ class BloodthirstEffect extends OneShotEffect<BloodthirstEffect> {
Permanent p = game.getPermanent(source.getSourceId());
if (p != null) {
p.addCounters(CounterType.P1P1.createInstance(amount), game);
}
}
return true;
}
return false;
}