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
|
||||
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);
|
||||
|
||||
@@ -60,7 +60,11 @@ public class WandOfDisintegration extends DamageWand {
|
||||
|
||||
@Override
|
||||
public int targetingPos(Hero user, int dst) {
|
||||
return dst;
|
||||
if (!cursed || !cursedKnown) {
|
||||
return dst;
|
||||
} else {
|
||||
return super.targetingPos(user, dst);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user