v0.7.0: bugfixes:

- fixed well fed buff not being reset by eating additional feasts
- fixed prismatic images being corruptable
- fixed exotic scrolls not correctly IDing themselves
This commit is contained in:
Evan Debenham 2018-10-02 22:09:19 -04:00
parent 0eef27efd8
commit 6e3097724a
4 changed files with 10 additions and 4 deletions

View File

@ -32,8 +32,7 @@ public class WellFed extends Buff {
announced = true;
}
//heals one HP every 10 turns for 450 turns
int left = (int)Hunger.STARVING;
int left;
@Override
public boolean act() {
@ -49,6 +48,11 @@ public class WellFed extends Buff {
return true;
}
public void reset(){
//heals one HP every 10 turns for 450 turns
left = (int)Hunger.STARVING;
}
@Override
public int icon() {
return BuffIndicator.WELL_FED;

View File

@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PrismaticGuard;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
@ -231,6 +232,7 @@ public class PrismaticImage extends NPC {
immunities.add( ToxicGas.class );
immunities.add( CorrosiveGas.class );
immunities.add( Burning.class );
immunities.add( Corruption.class );
}
private class Wandering extends Mob.Wandering{

View File

@ -40,7 +40,7 @@ public class Feast extends Food {
@Override
protected void satisfy(Hero hero) {
super.satisfy( hero );
Buff.affect(hero, WellFed.class);
Buff.affect(hero, WellFed.class).reset();
}
@Override

View File

@ -95,7 +95,7 @@ public abstract class ExoticScroll extends Scroll {
@Override
public void setKnown() {
if (isKnown()) {
if (!isKnown()) {
handler.know(exoToReg.get(this.getClass()));
updateQuickslot();
}