Ones Subtract
added the option for the user to enable one subtract closes #35 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -35,5 +35,7 @@
|
||||
<string name="higlight_color">Highlight Color</string>
|
||||
<string name="higlight_color_msg">Highlights your last roll in a custom color</string>
|
||||
<string name="game_mode">Game Mode</string>
|
||||
<string name="ones_subtract">Ones Subtract</string>
|
||||
<string name="ones_subtract_msg">Ones count as -1 to your successes</string>
|
||||
|
||||
</resources>
|
||||
@@ -20,6 +20,10 @@
|
||||
android:key="tens_count_twice"
|
||||
android:summary="@string/tens_count_twice_msg"
|
||||
android:title="@string/tens_count_twice" />
|
||||
<CheckBoxPreference
|
||||
android:key="ones_subtract"
|
||||
android:summary="@string/ones_subtract_msg"
|
||||
android:title="@string/ones_subtract" />
|
||||
|
||||
<PreferenceCategory android:title="@string/contact_us" >
|
||||
<Preference
|
||||
|
||||
@@ -589,6 +589,11 @@ public class ExaltedDice extends Activity implements OnClickListener, OnItemClic
|
||||
if(mSettings.getBoolean(Settings.KEY_TENS_COUNT_TWICE, true))
|
||||
if (roll[i] == 10)
|
||||
intSuccesses++;
|
||||
if(mSettings.getBoolean(Settings.KEY_ONES_SUBRACT, false))
|
||||
if (roll[i] == 1)
|
||||
intSuccesses--;
|
||||
|
||||
|
||||
}
|
||||
return intSuccesses;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Settings extends PreferenceActivity implements OnPreferenceClickLis
|
||||
public static final String KEY_ROLL_AGAIN = "roll_again";
|
||||
public static final String KEY_TENS_COUNT_TWICE = "tens_count_twice";
|
||||
public static final String KEY_COLOR = "color";
|
||||
// public static final String KEY_ = "";
|
||||
public static final String KEY_ONES_SUBRACT = "ones_subtract";
|
||||
// public static final String KEY_ = "";
|
||||
// public static final String KEY_ = "";
|
||||
// public static final String KEY_ = "";
|
||||
|
||||
Reference in New Issue
Block a user