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 ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
exp = bundle.getInt( EXP );
|
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 );
|
partialCharge = bundle.getFloat( PARTIALCHARGE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,8 +152,15 @@ abstract public class MissileWeapon extends Weapon {
|
||||||
durability -= durabilityPerUse();
|
durability -= durabilityPerUse();
|
||||||
}
|
}
|
||||||
if (durability > 0){
|
if (durability > 0){
|
||||||
if (enemy.isAlive() && sticky) Buff.affect(enemy, PinCushion.class).stick(this);
|
//attempt to stick the missile weapon to the enemy, just drop it if we can't.
|
||||||
else Dungeon.level.drop( this, enemy.pos).sprite.drop();
|
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;
|
package com.shatteredpixel.shatteredpixeldungeon.plants;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
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.items.potions.PotionOfStrength;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
|
||||||
|
@ -35,6 +37,17 @@ public class Rotberry extends Plant {
|
||||||
public void activate() {
|
public void activate() {
|
||||||
Dungeon.level.drop( new Seed(), pos ).sprite.drop();
|
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 {
|
public static class Seed extends Plant.Seed {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user