free blocks option moved to PlayerControllerHuman

This commit is contained in:
Maxmtg
2014-01-24 05:44:23 +00:00
parent 68acaf77c5
commit e4fb939e91
4 changed files with 7 additions and 14 deletions

View File

@@ -13,9 +13,4 @@ public class PreferencesProvider implements Dependencies.PreferencesMethods {
// TODO Auto-generated method stub
return Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_MANABURN);
}
@Override
public boolean areBlocksFree() {
return Singletons.getModel().getPreferences().getPrefBoolean(FPref.MATCHPREF_PROMPT_FREE_BLOCKS);
}
}

View File

@@ -723,6 +723,10 @@ public class PlayerControllerHuman extends PlayerController {
*/
@Override
public boolean payManaOptional(Card c, Cost cost, SpellAbility sa, String prompt, ManaPaymentPurpose purpose) {
if ( sa == null && cost.isOnlyManaCost() && cost.getTotalMana().isZero()
&& !Singletons.getModel().getPreferences().getPrefBoolean(FPref.MATCHPREF_PROMPT_FREE_BLOCKS))
return true;
return HumanPlay.payCostDuringAbilityResolve(player, c, cost, sa, prompt);
}