v0.6.4: bugfixes:

- fixed ethereal chains losing charge on load
- fixed missile weapons being lost in some cases
- fixed warden being able to exploit rotberry
This commit is contained in:
Evan Debenham 2018-03-27 21:12:23 -04:00
parent 296e1e68ab
commit 12f545dff9
3 changed files with 24 additions and 3 deletions

View File

@ -236,7 +236,8 @@ public class Artifact extends KindofMisc {
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle);
exp = bundle.getInt( EXP );
charge = Math.min( chargeCap, bundle.getInt( CHARGE ));
if (chargeCap > 0) charge = Math.min( chargeCap, bundle.getInt( CHARGE ));
else charge = bundle.getInt( CHARGE );
partialCharge = bundle.getFloat( PARTIALCHARGE );
}
}

View File

@ -152,8 +152,15 @@ abstract public class MissileWeapon extends Weapon {
durability -= durabilityPerUse();
}
if (durability > 0){
if (enemy.isAlive() && sticky) Buff.affect(enemy, PinCushion.class).stick(this);
else Dungeon.level.drop( this, enemy.pos).sprite.drop();
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
if (enemy.isAlive() && sticky) {
PinCushion p = Buff.affect(enemy, PinCushion.class);
if (p.target == enemy){
p.stick(this);
return;
}
}
Dungeon.level.drop( this, enemy.pos ).sprite.drop();
}
}

View File

@ -22,6 +22,8 @@
package com.shatteredpixel.shatteredpixeldungeon.plants;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@ -36,6 +38,17 @@ public class Rotberry extends Plant {
Dungeon.level.drop( new Seed(), pos ).sprite.drop();
}
@Override
public void wither() {
Dungeon.level.uproot( pos );
if (Dungeon.level.heroFOV[pos]) {
CellEmitter.get( pos ).burst( LeafParticle.GENERAL, 6 );
}
//no warden benefit
}
public static class Seed extends Plant.Seed {
{
image = ItemSpriteSheet.SEED_ROTBERRY;