mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
Little fixes
This commit is contained in:
parent
ca521751cd
commit
fb4065ba66
7 changed files with 14 additions and 16 deletions
|
|
@ -21,10 +21,10 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class SpellsCostReductionAllEffect extends CostModificationEffectImpl {
|
||||
|
||||
private FilterCard filter;
|
||||
private int amount;
|
||||
private final FilterCard filter;
|
||||
private final int amount;
|
||||
private final boolean upTo;
|
||||
private boolean onlyControlled;
|
||||
private final boolean onlyControlled;
|
||||
private UUID controllerId;
|
||||
|
||||
public SpellsCostReductionAllEffect(int amount) {
|
||||
|
|
@ -72,8 +72,8 @@ public class SpellsCostReductionAllEffect extends CostModificationEffectImpl {
|
|||
}
|
||||
Mana mana = abilityToModify.getManaCostsToPay().getMana();
|
||||
int reduceMax = mana.getGeneric();
|
||||
if (reduceMax > 2) {
|
||||
reduceMax = 2;
|
||||
if (reduceMax > this.amount) {
|
||||
reduceMax = this.amount;
|
||||
}
|
||||
if (reduceMax > 0) {
|
||||
Player controller = game.getPlayer(abilityToModify.getControllerId());
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI
|
|||
if (upTo) {
|
||||
Mana mana = abilityToModify.getManaCostsToPay().getMana();
|
||||
int reduceMax = mana.getGeneric();
|
||||
if (reduceMax > amount) {
|
||||
reduceMax = amount;
|
||||
if (reduceMax > this.amount) {
|
||||
reduceMax = this.amount;
|
||||
}
|
||||
if (reduceMax > 0) {
|
||||
Player controller = game.getPlayer(abilityToModify.getControllerId());
|
||||
|
|
@ -83,7 +83,7 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI
|
|||
if (!game.inCheckPlayableState()) {
|
||||
ChoiceImpl choice = new ChoiceImpl(false);
|
||||
Set<String> set = new LinkedHashSet<>();
|
||||
for (int i = 0; i <= amount; i++) {
|
||||
for (int i = 0; i <= reduceMax; i++) {
|
||||
set.add(String.valueOf(i));
|
||||
}
|
||||
choice.setChoices(set);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue