mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
fixed issue 141
This commit is contained in:
parent
f2c44688d0
commit
15f75f8d11
7 changed files with 27 additions and 19 deletions
|
|
@ -91,16 +91,13 @@ class GhostlyPrisonReplacementEffect extends ReplacementEffectImpl<GhostlyPrison
|
|||
if ( player != null && event.getTargetId().equals(source.getControllerId())) {
|
||||
ManaCostsImpl propagandaTax = new ManaCostsImpl("{2}");
|
||||
if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) &&
|
||||
player.chooseUse(Constants.Outcome.Benefit, "Pay {2} to declare attacker?", game) )
|
||||
{
|
||||
propagandaTax.pay(source, game, this.getId(), event.getPlayerId(), false);
|
||||
|
||||
if ( propagandaTax.isPaid() ) {
|
||||
player.chooseUse(Constants.Outcome.Benefit, "Pay {2} to declare attacker?", game) ) {
|
||||
if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ class NornsAnnexReplacementEffect extends ReplacementEffectImpl<NornsAnnexReplac
|
|||
ManaCostsImpl propagandaTax = new ManaCostsImpl("{WP}");
|
||||
if (propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) &&
|
||||
player.chooseUse(Constants.Outcome.Benefit, "Pay {WP} to declare attacker?", game)) {
|
||||
propagandaTax.pay(source, game, this.getId(), event.getPlayerId(), false);
|
||||
|
||||
if (propagandaTax.isPaid()) {
|
||||
if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,9 +105,7 @@ class LeoninArbiterReplacementEffect extends ReplacementEffectImpl<LeoninArbiter
|
|||
if ( arbiterTax.canPay(source.getSourceId(), event.getPlayerId(), game) &&
|
||||
player.chooseUse(Outcome.Neutral, "Pay {2} to search your library?", game) )
|
||||
{
|
||||
arbiterTax.pay(source, game, this.getId(), event.getPlayerId(), false);
|
||||
|
||||
if ( arbiterTax.isPaid() ) {
|
||||
if (arbiterTax.payOrRollback(source, game, this.getId(), event.getPlayerId()) ) {
|
||||
paidPlayers.add(event.getPlayerId());
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class VigilForTheLostEffect extends OneShotEffect<VigilForTheLostEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
ManaCostsImpl cost = new ManaCostsImpl("{X}");
|
||||
cost.clearPaid();
|
||||
if (cost.pay(source, game, source.getId(), source.getControllerId(), false)) {
|
||||
if (cost.payOrRollback(source, game, source.getId(), source.getControllerId())) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
player.gainLife(cost.getX(), game);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -93,9 +93,7 @@ class PropagandaReplacementEffect extends ReplacementEffectImpl<PropagandaReplac
|
|||
if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) &&
|
||||
player.chooseUse(Constants.Outcome.Neutral, "Pay {2} to declare attacker?", game) )
|
||||
{
|
||||
propagandaTax.pay(source, game, this.getId(), event.getPlayerId(), false);
|
||||
|
||||
if ( propagandaTax.isPaid() ) {
|
||||
if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId()) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,9 +98,7 @@ class WindbornMuseReplacementEffect extends ReplacementEffectImpl<WindbornMuseRe
|
|||
if ( propagandaTax.canPay(source.getSourceId(), event.getPlayerId(), game) &&
|
||||
player.chooseUse(Constants.Outcome.Benefit, "Pay {2} to declare attacker?", game) )
|
||||
{
|
||||
propagandaTax.pay(source, game, this.getId(), event.getPlayerId(), false);
|
||||
|
||||
if ( propagandaTax.isPaid() ) {
|
||||
if (propagandaTax.payOrRollback(source, game, this.getId(), event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue