v3.2.0: fixed dart duplication when tips wear off
This commit is contained in:
@@ -107,7 +107,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
hero.sprite.operate(hero.pos);
|
hero.sprite.operate(hero.pos);
|
||||||
} else if (index == 1 && quantity() > 1){
|
} else if (index == 1 && quantity() > 1){
|
||||||
detach(hero.belongings.backpack);
|
detach(hero.belongings.backpack);
|
||||||
if (!new Dart().collect()) Dungeon.level.drop(new Dart(), hero.pos).sprite.drop();
|
if (!new Dart().quantity(1).collect()) Dungeon.level.drop(new Dart().quantity(1), hero.pos).sprite.drop();
|
||||||
|
|
||||||
//reset durability if there are darts left in the stack
|
//reset durability if there are darts left in the stack
|
||||||
durability = MAX_DURABILITY;
|
durability = MAX_DURABILITY;
|
||||||
@@ -133,6 +133,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
if (durability <= 0 && !spawnedForEffect){
|
if (durability <= 0 && !spawnedForEffect){
|
||||||
//attempt to stick the dart to the enemy, just drop it if we can't.
|
//attempt to stick the dart to the enemy, just drop it if we can't.
|
||||||
Dart d = new Dart();
|
Dart d = new Dart();
|
||||||
|
d.quantity(1);
|
||||||
Catalog.countUse(getClass());
|
Catalog.countUse(getClass());
|
||||||
if (sticky && enemy != null && enemy.isAlive() && enemy.alignment != Char.Alignment.ALLY){
|
if (sticky && enemy != null && enemy.isAlive() && enemy.alignment != Char.Alignment.ALLY){
|
||||||
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
PinCushion p = Buff.affect(enemy, PinCushion.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user