v2.5.0: fixed auto-aim not correctly interacting with cursed wands
This commit is contained in:
@@ -122,8 +122,12 @@ public abstract class Wand extends Item {
|
||||
|
||||
@Override
|
||||
public int targetingPos(Hero user, int dst) {
|
||||
if (cursed && cursedKnown){
|
||||
return new Ballistica(user.pos, dst, Ballistica.MAGIC_BOLT).collisionPos;
|
||||
} else {
|
||||
return new Ballistica(user.pos, dst, collisionProperties).collisionPos;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void onZap(Ballistica attack);
|
||||
|
||||
|
||||
+4
@@ -60,7 +60,11 @@ public class WandOfDisintegration extends DamageWand {
|
||||
|
||||
@Override
|
||||
public int targetingPos(Hero user, int dst) {
|
||||
if (!cursed || !cursedKnown) {
|
||||
return dst;
|
||||
} else {
|
||||
return super.targetingPos(user, dst);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user