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:
parent
296e1e68ab
commit
12f545dff9
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -35,6 +37,17 @@ public class Rotberry extends Plant {
|
|||
public void activate() {
|
||||
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 {
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user