v0.3.0: improved previous hunger mechanics changes, now better coded & clarified

This commit is contained in:
Evan Debenham
2015-04-05 12:40:01 -04:00
parent 80c591e64a
commit 4e34e81365
13 changed files with 63 additions and 15 deletions
@@ -136,7 +136,7 @@ public class Hunger extends Buff implements Hero.Doom {
@Override
public int icon() {
if (Dungeon.level.locked || level < HUNGRY) {
if (level < HUNGRY) {
return BuffIndicator.NONE;
} else if (level < STARVING) {
return BuffIndicator.HUNGER;
@@ -147,7 +147,7 @@ public class Hunger extends Buff implements Hero.Doom {
@Override
public String toString() {
if (Dungeon.level.locked || level < STARVING) {
if (level < STARVING) {
return "Hungry";
} else {
return "Starving";
@@ -0,0 +1,33 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
/**
* Created by Evan on 04/04/2015.
*/
public class LockedFloor extends Buff {
//this buff is purely meant as a visual indicator that the gameplay implications of a level seal are in effect.
@Override
public boolean act() {
spend(TICK);
if (!Dungeon.level.locked)
detach();
return true;
}
@Override
public int icon() {
return BuffIndicator.LOCKED_FLOOR;
}
@Override
public String toString() {
return "Floor is Locked";
}
}