v0.7.4a: autotargeting will now never go for allies

This commit is contained in:
Evan Debenham 2019-07-24 18:26:09 -04:00
parent ccfeee504c
commit f6d4a08811
2 changed files with 1 additions and 2 deletions

View File

@ -76,7 +76,6 @@ public class WandOfWarding extends Wand {
GameScene.add(ward, 1f); GameScene.add(ward, 1f);
Dungeon.level.press(ward.pos, ward); Dungeon.level.press(ward.pos, ward);
ward.sprite.emitter().burst(MagicMissile.WardParticle.UP, ward.tier); ward.sprite.emitter().burst(MagicMissile.WardParticle.UP, ward.tier);
QuickSlotButton.target(ward);
} else { } else {
GLog.w( Messages.get(this, "no_more_wards")); GLog.w( Messages.get(this, "no_more_wards"));
} }

View File

@ -227,7 +227,7 @@ public class QuickSlotButton extends Button implements WndBag.Listener {
} }
public static void target( Char target ) { public static void target( Char target ) {
if (target != Dungeon.hero) { if (target != null && target.alignment != Char.Alignment.ALLY) {
lastTarget = target; lastTarget = target;
TargetHealthIndicator.instance.target( target ); TargetHealthIndicator.instance.target( target );