v2.0.0: fixed challenge having no text if targeting an empty space

This commit is contained in:
Evan Debenham
2023-02-27 18:41:40 -05:00
parent 76cddd5ac7
commit 83a017409e
@@ -81,19 +81,21 @@ public class Challenge extends ArmorAbility {
@Override
protected void activate(ClassArmor armor, Hero hero, Integer target) {
if (target == null || !Dungeon.level.heroFOV[target]){
if (target == null){
return;
}
Char targetCh = Actor.findChar(target);
if (targetCh == null || !Dungeon.level.heroFOV[target]){
GLog.w(Messages.get(this, "no_target"));
return;
}
if (hero.buff(DuelParticipant.class) != null){
GLog.w(Messages.get(this, "already_dueling"));
return;
}
if (targetCh != null){
if (targetCh.alignment == hero.alignment){
GLog.w(Messages.get(this, "ally_target"));
return;
@@ -180,7 +182,6 @@ public class Challenge extends ArmorAbility {
hero.buff(EliminationMatchTracker.class).detach();
}
}
}
@Override
public Talent[] talents() {