v0.2.3: tweaked hunger slightly, no longer interrupts movement.
This commit is contained in:
parent
1de8c8e9bf
commit
9a5f13b656
|
@ -66,11 +66,9 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||||
if (isStarving()) {
|
if (isStarving()) {
|
||||||
|
|
||||||
if (Random.Float() < 0.3f && (target.HP > 1 || !target.paralysed)) {
|
if (Random.Float() < 0.3f && (target.HP > 1 || !target.paralysed)) {
|
||||||
|
|
||||||
GLog.n( TXT_STARVING );
|
|
||||||
hero.damage( 1, this );
|
hero.damage( 1, this );
|
||||||
|
|
||||||
hero.interrupt();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -79,6 +77,7 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||||
if (newLevel >= STARVING) {
|
if (newLevel >= STARVING) {
|
||||||
|
|
||||||
GLog.n( TXT_STARVING );
|
GLog.n( TXT_STARVING );
|
||||||
|
hero.damage( 1, this );
|
||||||
statusUpdated = true;
|
statusUpdated = true;
|
||||||
|
|
||||||
hero.interrupt();
|
hero.interrupt();
|
||||||
|
|
|
@ -897,7 +897,9 @@ public class Hero extends Char {
|
||||||
@Override
|
@Override
|
||||||
public void damage( int dmg, Object src ) {
|
public void damage( int dmg, Object src ) {
|
||||||
restoreHealth = false;
|
restoreHealth = false;
|
||||||
if (damageInterrupt) interrupt();
|
|
||||||
|
if (!(src instanceof Hunger) && damageInterrupt)
|
||||||
|
interrupt();
|
||||||
|
|
||||||
if (this.buff(Drowsy.class) != null){
|
if (this.buff(Drowsy.class) != null){
|
||||||
Buff.detach(this, Drowsy.class);
|
Buff.detach(this, Drowsy.class);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user