v2.0.0: fixed challenge having no text if targeting an empty space
This commit is contained in:
+5
-4
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user