v0.7.5: added two new enemies to the sewers, lots of polish still needed
This commit is contained in:
parent
7f13e1cefa
commit
368ff47b8e
BIN
android/src/main/assets/slime.png
Normal file
BIN
android/src/main/assets/slime.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
android/src/main/assets/snake.png
Normal file
BIN
android/src/main/assets/snake.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
|
@ -99,6 +99,8 @@ public class Assets {
|
|||
public static final String GUARD = "guard.png";
|
||||
public static final String WARDS = "wards.png";
|
||||
public static final String GUARDIAN = "guardian.png";
|
||||
public static final String SLIME = "slime.png";
|
||||
public static final String SNAKE = "snake.png";
|
||||
|
||||
public static final String ITEMS = "items.png";
|
||||
public static final String TERRAIN_FEATURES = "terrain_features.png";
|
||||
|
|
|
@ -42,25 +42,28 @@ public class Bestiary {
|
|||
|
||||
// Sewers
|
||||
case 1: default:
|
||||
//10x rat
|
||||
return new ArrayList<Class<? extends Mob>>(Arrays.asList(
|
||||
Rat.class, Rat.class, Rat.class, Rat.class, Rat.class,
|
||||
Rat.class, Rat.class, Rat.class, Rat.class, Rat.class));
|
||||
//6x rat, 2x snake
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Rat.class, Rat.class, Rat.class, Rat.class,
|
||||
Snake.class, Snake.class));
|
||||
case 2:
|
||||
//3x rat, 3x gnoll
|
||||
return new ArrayList<>(Arrays.asList(Rat.class, Rat.class, Rat.class,
|
||||
Gnoll.class, Gnoll.class, Gnoll.class));
|
||||
case 3:
|
||||
//2x rat, 4x gnoll, 1x crab, 1x swarm
|
||||
//2x rat, 1x snake, 2x gnoll
|
||||
return new ArrayList<>(Arrays.asList(Rat.class, Rat.class,
|
||||
Gnoll.class, Gnoll.class, Gnoll.class, Gnoll.class,
|
||||
Crab.class, Swarm.class));
|
||||
case 4: case 5:
|
||||
//1x rat, 2x gnoll, 3x crab, 1x swarm
|
||||
Snake.class,
|
||||
Gnoll.class, Gnoll.class));
|
||||
case 3:
|
||||
//1x rat, 1x snake, 3x gnoll, 1x swarm, 1x crab
|
||||
return new ArrayList<>(Arrays.asList(Rat.class,
|
||||
Gnoll.class, Gnoll.class,
|
||||
Crab.class, Crab.class, Crab.class,
|
||||
Swarm.class));
|
||||
Snake.class,
|
||||
Gnoll.class, Gnoll.class, Gnoll.class,
|
||||
Swarm.class,
|
||||
Crab.class));
|
||||
case 4: case 5:
|
||||
//1x gnoll, 1x swarm, 2x crab, 2x slime
|
||||
return new ArrayList<>(Arrays.asList(Gnoll.class,
|
||||
Swarm.class,
|
||||
Crab.class, Crab.class,
|
||||
Slime.class, Slime.class));
|
||||
|
||||
// Prison
|
||||
case 6:
|
||||
|
@ -173,8 +176,7 @@ public class Bestiary {
|
|||
default:
|
||||
return;
|
||||
case 4:
|
||||
if (Random.Float() < 0.01f) rotation.add(Skeleton.class);
|
||||
if (Random.Float() < 0.01f) rotation.add(Thief.class);
|
||||
if (Random.Float() < 0.025f) rotation.add(Thief.class);
|
||||
return;
|
||||
|
||||
// Prison
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2019 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.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SlimeSprite;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Slime extends Mob {
|
||||
|
||||
{
|
||||
spriteClass = SlimeSprite.class;
|
||||
|
||||
HP = HT = 25;
|
||||
defenseSkill = 5;
|
||||
|
||||
EXP = 4;
|
||||
maxLvl = 9;
|
||||
|
||||
lootChance = 0.1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return Random.NormalIntRange( 4, 5 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackSkill( Char target ) {
|
||||
return 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
if (Dungeon.level.water[pos] && HP < HT) {
|
||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
HP++;
|
||||
}
|
||||
|
||||
return super.act();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damage(int dmg, Object src) {
|
||||
super.damage(Math.min(dmg, 6), src);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int defenseProc(Char enemy, int damage) {
|
||||
return super.defenseProc(enemy, Math.min(damage, 6));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Item createLoot() {
|
||||
try {
|
||||
Generator.Category c = Generator.Category.WEP_T2;
|
||||
MeleeWeapon w = (MeleeWeapon)c.classes[Random.chances(c.probs)].newInstance();
|
||||
w.random();
|
||||
w.level(0);
|
||||
return w;
|
||||
} catch (Exception e) {
|
||||
ShatteredPixelDungeon.reportException(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2019 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.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SnakeSprite;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Snake extends Mob {
|
||||
|
||||
{
|
||||
spriteClass = SnakeSprite.class;
|
||||
|
||||
HP = HT = 6;
|
||||
defenseSkill = 20;
|
||||
|
||||
EXP = 2;
|
||||
maxLvl = 7;
|
||||
|
||||
//TODO loot?
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return Random.NormalIntRange( 1, 5 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackSkill( Char target ) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
}
|
|
@ -180,8 +180,8 @@ public abstract class RegularLevel extends Level {
|
|||
|
||||
@Override
|
||||
protected void createMobs() {
|
||||
//on floor 1, 10 rats are created so the player can get level 2.
|
||||
int mobsToSpawn = Dungeon.depth == 1 ? 10 : nMobs();
|
||||
//on floor 1, 8 pre-set mobs are created so the player can get level 2.
|
||||
int mobsToSpawn = Dungeon.depth == 1 ? 8 : nMobs();
|
||||
|
||||
ArrayList<Room> stdRooms = new ArrayList<>();
|
||||
for (Room room : rooms) {
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2019 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;
|
||||
|
||||
//TODO currently just a recolor of goo
|
||||
public class SlimeSprite extends MobSprite {
|
||||
|
||||
public SlimeSprite() {
|
||||
super();
|
||||
|
||||
texture( Assets.SLIME );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 20, 14 );
|
||||
|
||||
idle = new Animation( 10, true );
|
||||
idle.frames( frames, 2, 1, 0, 0, 1 );
|
||||
|
||||
run = new Animation( 15, true );
|
||||
run.frames( frames, 3, 2, 1, 2 );
|
||||
|
||||
attack = new Animation( 10, false );
|
||||
attack.frames( frames, 8, 9, 10 );
|
||||
|
||||
die = new Animation( 10, false );
|
||||
die.frames( frames, 5, 6, 7 );
|
||||
|
||||
play(idle);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2019 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;
|
||||
|
||||
//TODO placeholder graphics atm
|
||||
public class SnakeSprite extends MobSprite {
|
||||
|
||||
public SnakeSprite() {
|
||||
super();
|
||||
|
||||
texture( Assets.SNAKE );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 12, 12 );
|
||||
|
||||
idle = new Animation( 10, true );
|
||||
idle.frames( frames, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1 );
|
||||
|
||||
run = new Animation( 10, true );
|
||||
run.frames( frames, 3, 4 );
|
||||
|
||||
attack = new Animation( 15, false );
|
||||
attack.frames( frames, 5, 6, 7, 7, 0 );
|
||||
|
||||
die = new Animation( 10, false );
|
||||
die.frames( frames, 8, 9, 10 );
|
||||
|
||||
play(idle);
|
||||
}
|
||||
|
||||
}
|
|
@ -557,6 +557,12 @@ actors.mobs.skeleton.explo_kill=You were killed by the explosion of bones...
|
|||
actors.mobs.skeleton.def_verb=blocked
|
||||
actors.mobs.skeleton.desc=Skeletons are composed of corpses bones from unlucky adventurers and inhabitants of the dungeon, animated by emanations of evil magic from the depths below. After they have been damaged enough, they disintegrate in an explosion of bones.
|
||||
|
||||
actors.mobs.slime.name=slime
|
||||
actors.mobs.slime.desc=TODO
|
||||
|
||||
actors.mobs.snake.name=sewer snake
|
||||
actors.mobs.snake.desc=TODO
|
||||
|
||||
actors.mobs.spinner.name=cave spinner
|
||||
actors.mobs.spinner.desc=These greenish furry cave spiders try to avoid direct combat, preferring to wait in the distance while their victim, entangled in the spinner's excreted cobweb, slowly dies from their poisonous bite.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user