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