v3.0.0: turned off autotarget in cases where it's almost always wrong
This commit is contained in:
@@ -48,6 +48,11 @@ public class BlessSpell extends TargetedClericSpell {
|
||||
return HeroIcon.BLESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesTargeting() {
|
||||
return false; //targeting behaviour is often wrong
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTargetSelected(HolyTome tome, Hero hero, Integer target) {
|
||||
if (target == null){
|
||||
|
||||
@@ -59,6 +59,10 @@ public abstract class ClericSpell {
|
||||
return Messages.get(this, "desc") + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
|
||||
}
|
||||
|
||||
public boolean usesTargeting(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public int icon(){
|
||||
return HeroIcon.NONE;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ public abstract class TargetedClericSpell extends ClericSpell {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesTargeting() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String targetingPrompt(){
|
||||
return Messages.get(this, "prompt");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.TargetedClericSpell;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
||||
@@ -343,7 +342,7 @@ public class HolyTome extends Artifact {
|
||||
} else {
|
||||
quickSpell.onCast(HolyTome.this, Dungeon.hero);
|
||||
|
||||
if (quickSpell instanceof TargetedClericSpell && Dungeon.quickslot.contains(HolyTome.this)){
|
||||
if (quickSpell.usesTargeting() && Dungeon.quickslot.contains(HolyTome.this)){
|
||||
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(HolyTome.this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public class WandOfWarding extends Wand {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.WAND_WARDING;
|
||||
usesTargeting = false; //player usually targets wards or spaces, not enemies
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,6 +31,7 @@ public class HealingDart extends TippedDart {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.HEALING_DART;
|
||||
usesTargeting = false; //you never want to throw this at an enemy
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.TargetedClericSpell;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
@@ -180,7 +179,7 @@ public class WndClericSpells extends Window {
|
||||
spell.onCast(tome, Dungeon.hero);
|
||||
|
||||
//TODO, probably need targeting logic here
|
||||
if (spell instanceof TargetedClericSpell && Dungeon.quickslot.contains(tome)){
|
||||
if (spell.usesTargeting() && Dungeon.quickslot.contains(tome)){
|
||||
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(tome));
|
||||
}
|
||||
}
|
||||
@@ -217,7 +216,7 @@ public class WndClericSpells extends Window {
|
||||
spell.onCast(tome, Dungeon.hero);
|
||||
|
||||
//TODO, probably need targeting logic here
|
||||
if (spell instanceof TargetedClericSpell && Dungeon.quickslot.contains(tome)){
|
||||
if (spell.usesTargeting() && Dungeon.quickslot.contains(tome)){
|
||||
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(tome));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user