mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[ZNR] fixed Leyline Tyrant only allowing user to pay what's in their pool (#7046)
This commit is contained in:
parent
5bd8debe91
commit
16e6d7b18b
1 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -107,11 +107,11 @@ class LeylineTyrantDamageEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || player.getManaPool().getRed() == 0) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int costX = player.announceXMana(
|
||||
0, player.getManaPool().getRed(),
|
||||
0, Integer.MAX_VALUE,
|
||||
"Announce the value for {X}", game, source
|
||||
);
|
||||
String manaString;
|
||||
|
@ -123,7 +123,7 @@ class LeylineTyrantDamageEffect extends OneShotEffect {
|
|||
manaString += "{R}";
|
||||
}
|
||||
}
|
||||
ManaCosts cost = new ManaCostsImpl(manaString);
|
||||
Cost cost = new ManaCostsImpl<>(manaString);
|
||||
cost.clearPaid();
|
||||
if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue