v0.3.0: improved previous hunger mechanics changes, now better coded & clarified
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user