v1.1.0: tipped darts now correctly no longer stick to allies if they run out of tip uses

This commit is contained in:
Evan Debenham
2021-11-29 22:08:54 -05:00
parent b5bce7f80c
commit c3080696a1

View File

@@ -115,7 +115,7 @@ public abstract class TippedDart extends Dart {
if (durability <= 0){
//attempt to stick the dart to the enemy, just drop it if we can't.
Dart d = new Dart();
if (enemy.isAlive() && sticky) {
if (sticky && enemy != null && enemy.isAlive() && enemy.alignment != Char.Alignment.ALLY){
PinCushion p = Buff.affect(enemy, PinCushion.class);
if (p.target == enemy){
p.stick(d);