v3.1.0: added gnoll exiles to the bestiary

This commit is contained in:
Evan Debenham
2025-05-05 17:01:16 -04:00
parent 278c80af57
commit 4cc6a4a299
2 changed files with 6 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ public class GnollExile extends Gnoll {
defenseSkill = 6;
HP = HT = 24;
loot = Generator.randomUsingDefaults();
loot = null; //see rollToDropLoot
lootChance = 1f;
}
@@ -98,15 +98,16 @@ public class GnollExile extends Gnoll {
if (Dungeon.hero.lvl > maxLvl + 2) return;
//in addition to normal drop drop, also drops 1 or 2 random extras
//drops 2 or 3 random items
ArrayList<Item> items = new ArrayList<>();
items.add(Generator.randomUsingDefaults());
items.add(Generator.randomUsingDefaults());
if (Random.Int(2) == 0) items.add(Generator.randomUsingDefaults());
for (Item item : items){
int ofs;
do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
ofs = PathFinder.NEIGHBOURS9[Random.Int(9)];
} while (Dungeon.level.solid[pos + ofs] && !Dungeon.level.passable[pos + ofs]);
Dungeon.level.drop( item, pos + ofs ).sprite.drop( pos );
}

View File

@@ -52,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.FetidRat;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Gnoll;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollExile;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGeomancer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGuard;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollSapper;
@@ -220,7 +221,7 @@ public enum Bestiary {
UNIVERSAL.addEntities(Wraith.class, Piranha.class, Mimic.class, GoldenMimic.class, EbonyMimic.class, Statue.class, GuardianTrap.Guardian.class, SentryRoom.Sentry.class);
RARE.addEntities(Albino.class, CausticSlime.class,
RARE.addEntities(Albino.class, GnollExile.class, CausticSlime.class,
Bandit.class, SpectralNecromancer.class,
ArmoredBrute.class, DM201.class,
Elemental.ChaosElemental.class, Senior.class,