mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Do if cost paid - added logs message if the player decided to pay the cost;
This commit is contained in:
parent
b89c1c03ca
commit
9dc3d514bd
1 changed files with 7 additions and 2 deletions
|
|
@ -20,8 +20,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
protected Effects executingEffects = new Effects();
|
||||
protected Effects otherwiseEffects = new Effects(); // used for Imprison
|
||||
private final Cost cost;
|
||||
private String chooseUseText;
|
||||
private boolean optional;
|
||||
private final String chooseUseText;
|
||||
private final boolean optional;
|
||||
|
||||
public DoIfCostPaid(Effect effectOnPaid, Cost cost) {
|
||||
this(effectOnPaid, cost, null);
|
||||
|
|
@ -97,6 +97,7 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
cost.clearPaid();
|
||||
int bookmark = game.bookmarkState();
|
||||
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
|
||||
game.informPlayers(player.getLogName() + " paid for " + mageObject.getLogName() + " - " + executingEffects.getText(source.getModes().getMode()));
|
||||
for (Effect effect : executingEffects) {
|
||||
effect.setTargetPointer(this.targetPointer);
|
||||
if (effect instanceof OneShotEffect) {
|
||||
|
|
@ -178,4 +179,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
public DoIfCostPaid copy() {
|
||||
return new DoIfCostPaid(this);
|
||||
}
|
||||
|
||||
public boolean isOptional() {
|
||||
return optional;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue