v2.3.0: added a warning for spear gnoll range

This commit is contained in:
Evan Debenham
2023-12-20 13:41:56 -05:00
parent 777eb1b437
commit d3aab9e162
2 changed files with 11 additions and 0 deletions

View File

@@ -1228,6 +1228,7 @@ actors.mobs.gnollgeomancer.desc_armor_sapper=_A nearby gnoll sapper is holding a
actors.mobs.gnollgeomancer.desc_sleeping=This impressively tall gnoll shaman is surrounded by a layer of rock, and looks almost like a statue. Looking closely you can see the rock magically move in time with the senior gnoll's breathing. It can't be harmed while encased in rock like this, and it appears to be enjoying a literal dirt nap.\n\nYou can probably break through the layers of rock with your pickaxe, but _be sure you're ready for a fight when you do so._ The geomancer must be the source of the various earth-moving magic around here, and the organizer of all the gnoll activity. _Defeating the gnolls scattered around here before fighting it might be a good idea._
actors.mobs.gnollguard.name=gnoll guard
actors.mobs.gnollguard.spear_warn=The gnoll lands a vicious blow with the tip of its spear!
actors.mobs.gnollguard.desc=A large and tough looking gnoll wielding a spear and a shield, but no helmet. These guards are likely brutes in training, roped into helping protect the mine from encroaching wildlife.\n\nThe gnoll guard is strong enough to wield the spear in one hand, but can't use it very well. _It will need fairly open space to attack at a distance, and will do notably less damage to you if you get up close._
actors.mobs.gnollguard.desc_armor=_A nearby gnoll sapper is holding a device that is granting this guard earthen armor, heavily reducing the damage it takes._

View File

@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Spear;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollGuardSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
@@ -87,6 +88,15 @@ public class GnollGuard extends Mob {
}
}
@Override
public int attackProc(Char enemy, int damage) {
int dmg = super.attackProc(enemy, damage);
if (enemy == Dungeon.hero && !Dungeon.level.adjacent(pos, enemy.pos) && dmg > 12){
GLog.n(Messages.get(this, "spear_warn"));
}
return dmg;
}
@Override
public int attackSkill( Char target ) {
return 20;