v2.5.0: fixed crash errors in catalogs
This commit is contained in:
+3
-2
@@ -112,8 +112,9 @@ public class Dart extends MissileWeapon {
|
|||||||
protected static Crossbow bow;
|
protected static Crossbow bow;
|
||||||
|
|
||||||
private void updateCrossbow(){
|
private void updateCrossbow(){
|
||||||
if (Dungeon.hero == null) return;
|
if (Dungeon.hero == null) {
|
||||||
if (Dungeon.hero.belongings.weapon() instanceof Crossbow){
|
bow = null;
|
||||||
|
} else if (Dungeon.hero.belongings.weapon() instanceof Crossbow){
|
||||||
bow = (Crossbow) Dungeon.hero.belongings.weapon();
|
bow = (Crossbow) Dungeon.hero.belongings.weapon();
|
||||||
} else if (Dungeon.hero.belongings.secondWep() instanceof Crossbow) {
|
} else if (Dungeon.hero.belongings.secondWep() instanceof Crossbow) {
|
||||||
//player can instant swap anyway, so this is just QoL
|
//player can instant swap anyway, so this is just QoL
|
||||||
|
|||||||
+1
-1
@@ -198,7 +198,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
float usages = Math.round(MAX_DURABILITY/use);
|
float usages = Math.round(MAX_DURABILITY/use);
|
||||||
|
|
||||||
//grants 3+lvl extra uses with charged shot
|
//grants 3+lvl extra uses with charged shot
|
||||||
if (bow != null && Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){
|
if (bow != null && Dungeon.hero != null && Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){
|
||||||
usages += 3 + bow.buffedLvl();
|
usages += 3 + bow.buffedLvl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,9 +147,11 @@ public class GooSprite extends MobSprite {
|
|||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
|
if (spray != null) {
|
||||||
spray.pos(center());
|
spray.pos(center());
|
||||||
spray.visible = visible;
|
spray.visible = visible;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static class GooParticle extends PixelParticle.Shrinking {
|
public static class GooParticle extends PixelParticle.Shrinking {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user