mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
Some minor fixes and improvements.
This commit is contained in:
parent
d97ecc4ec0
commit
a98683fc18
4 changed files with 20 additions and 5 deletions
|
|
@ -115,7 +115,7 @@ class BloodlordOfVaasgothEffect extends ContinuousEffectImpl {
|
||||||
if (object != null) {
|
if (object != null) {
|
||||||
Permanent permanent = game.getPermanent(object.getSourceId());
|
Permanent permanent = game.getPermanent(object.getSourceId());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.addAbility(ability, game);
|
permanent.addAbility(ability, source.getSourceId(), game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ class XenagosManaEffect extends OneShotEffect <XenagosManaEffect> {
|
||||||
}
|
}
|
||||||
player.getManaPool().addMana(mana, game, source);
|
player.getManaPool().addMana(mana, game, source);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import mage.game.Game;
|
||||||
public class ConditionalActivatedAbility extends ActivatedAbilityImpl<ConditionalActivatedAbility> {
|
public class ConditionalActivatedAbility extends ActivatedAbilityImpl<ConditionalActivatedAbility> {
|
||||||
|
|
||||||
private Condition condition;
|
private Condition condition;
|
||||||
private String ruleText = "";
|
private String ruleText = null;
|
||||||
|
|
||||||
private static final Effects emptyEffects = new Effects();
|
private static final Effects emptyEffects = new Effects();
|
||||||
|
|
||||||
|
|
@ -75,6 +75,9 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl<Conditiona
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import mage.counters.CounterType;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
import mage.util.CardUtil;
|
||||||
import mage.watchers.common.BloodthirstWatcher;
|
import mage.watchers.common.BloodthirstWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -34,7 +35,15 @@ public class BloodthirstAbility extends EntersBattlefieldAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
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) {
|
BloodthirstEffect(int amount) {
|
||||||
super(Outcome.BoostCreature);
|
super(Outcome.BoostCreature);
|
||||||
this.amount = amount;
|
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) {
|
BloodthirstEffect(final BloodthirstEffect effect) {
|
||||||
|
|
@ -61,8 +70,10 @@ class BloodthirstEffect extends OneShotEffect<BloodthirstEffect> {
|
||||||
Permanent p = game.getPermanent(source.getSourceId());
|
Permanent p = game.getPermanent(source.getSourceId());
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
p.addCounters(CounterType.P1P1.createInstance(amount), game);
|
p.addCounters(CounterType.P1P1.createInstance(amount), game);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue