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