v0.4.3b: fixed bugs with cornish pasty holiday values

This commit is contained in:
Evan Debenham 2016-11-05 03:06:38 -04:00
parent f9d51ab02f
commit 0f30fb19ce

View File

@ -45,11 +45,11 @@ public class Pasty extends Food {
private static Holiday holiday; private static Holiday holiday;
static{ static{
holiday = Holiday.NONE;
final Calendar calendar = Calendar.getInstance(); final Calendar calendar = Calendar.getInstance();
switch(calendar.get(Calendar.MONTH)){ switch(calendar.get(Calendar.MONTH)){
default:
holiday = Holiday.NONE;
break;
case Calendar.JANUARY: case Calendar.JANUARY:
if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) if (calendar.get(Calendar.WEEK_OF_MONTH) == 1)
holiday = Holiday.XMAS; holiday = Holiday.XMAS;
@ -98,7 +98,7 @@ public class Pasty extends Food {
if (action.equals(AC_EAT)){ if (action.equals(AC_EAT)){
switch(holiday){ switch(holiday){
case NONE: default: case NONE:
break; //do nothing extra break; //do nothing extra
case HWEEN: case HWEEN:
//heals for 10% max hp //heals for 10% max hp