v2.2.0: added the first enemy for the gnoll caves quest variant

This commit is contained in:
Evan Debenham
2023-10-06 17:18:26 -04:00
parent dfa2b1c16e
commit a1da9b9556
6 changed files with 131 additions and 0 deletions

View File

@@ -1208,6 +1208,9 @@ actors.mobs.ghoul.desc=As dwarven society slowly began to collapse, and the curr
actors.mobs.gnoll.name=gnoll scout
actors.mobs.gnoll.desc=Gnolls are hyena-like humanoids. They dwell in sewers and dungeons, venturing up to raid the surface from time to time. Gnoll scouts are regular members of their pack, they are not as strong as brutes and not as intelligent as shamans.
actors.mobs.gnollguard.name=gnoll guard
actors.mobs.gnollguard.desc=A large and tough looking gnoll wielding a spear and a shield. 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.gnolltrickster.name=gnoll trickster
actors.mobs.gnolltrickster.desc=A strange looking creature, even by gnoll standards. It hunches forward with a wicked grin, almost cradling the satchel hanging over its shoulder. Its eyes are wide with a strange mix of fear and excitement.\n\nThere is a large collection of poorly made darts in its satchel, they all seem to be tipped with various harmful substances.

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

View File

@@ -317,5 +317,6 @@ public class Assets {
public static final String CRYSTAL_WISP= "sprites/crystal_wisp.png";
public static final String CRYSTAL_GUARDIAN= "sprites/crystal_guardian.png";
public static final String CRYSTAL_SPIRE= "sprites/crystal_spire.png";
public static final String GNOLL_GUARD= "sprites/gnoll_guard.png";
}
}

View File

@@ -0,0 +1,73 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2023 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Spear;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollGuardSprite;
import com.watabou.utils.Random;
public class GnollGuard extends Mob {
{
spriteClass = GnollGuardSprite.class;
HP = HT = 35;
defenseSkill = 15;
EXP = 7;
maxLvl = -2;
loot = Spear.class;
lootChance = 0.1f;
}
@Override
public int damageRoll() {
if (enemy != null && !Dungeon.level.adjacent(pos, enemy.pos)){
return Random.NormalIntRange( 15, 25 );
} else {
return Random.NormalIntRange( 5, 15 );
}
}
@Override
public int attackSkill( Char target ) {
return 20;
}
@Override
public int drRoll() {
return super.drRoll() + Random.NormalIntRange(0, 6);
}
@Override
protected boolean canAttack( Char enemy ) {
//cannot 'curve' spear hits like the hero, requires fairly open space to hit at a distance
return Dungeon.level.distance(enemy.pos, pos) <= 2
&& new Ballistica( pos, enemy.pos, Ballistica.PROJECTILE).collisionPos == enemy.pos
&& new Ballistica( enemy.pos, pos, Ballistica.PROJECTILE).collisionPos == pos;
}
}

View File

@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bat;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.CrystalWisp;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGuard;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
@@ -141,6 +142,8 @@ public class MiningLevel extends CavesLevel {
return new Bat();
case Blacksmith.Quest.CRYSTAL:
return new CrystalWisp();
case Blacksmith.Quest.GNOLL:
return new GnollGuard();
}
}

View File

@@ -0,0 +1,51 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2023 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.sprites;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.watabou.noosa.TextureFilm;
public class GnollGuardSprite extends MobSprite {
public GnollGuardSprite() {
super();
texture(Assets.Sprites.GNOLL_GUARD );
TextureFilm frames = new TextureFilm( texture, 12, 16 );
idle = new Animation( 2, true );
idle.frames( frames, 0, 0, 0, 1, 0, 0, 1, 1 );
run = new Animation( 12, true );
run.frames( frames, 4, 5, 6, 7 );
attack = new Animation( 12, false );
attack.frames( frames, 2, 3, 0 );
die = new Animation( 12, false );
die.frames( frames, 8, 9, 10 );
play( idle );
}
}