v0.7.5: polish work on slimes, including new exotic variant

This commit is contained in:
Evan Debenham 2019-09-04 23:28:53 -04:00
parent 4a92607020
commit 1ba139e845
6 changed files with 125 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 367 B

View File

@ -0,0 +1,61 @@
/*
* 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.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CausticSlimeSprite;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
public class CausticSlime extends Slime {
{
spriteClass = CausticSlimeSprite.class;
}
@Override
public int attackProc( Char enemy, int damage ) {
if (Random.Int( 2 ) == 0) {
Buff.affect( enemy, Ooze.class ).set( 20f );
enemy.sprite.burst( 0x000000, 5 );
}
return super.attackProc( enemy, damage );
}
@Override
public void rollToDropLoot() {
if (Dungeon.hero.lvl > maxLvl + 2) return;
super.rollToDropLoot();
int ofs;
do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
} while (!Dungeon.level.passable[pos + ofs]);
Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos );
}
}

View File

@ -55,17 +55,6 @@ public class Slime extends Mob {
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);

View File

@ -0,0 +1,53 @@
/*
* 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;
public class CausticSlimeSprite extends MobSprite {
public CausticSlimeSprite() {
super();
texture( Assets.SLIME );
TextureFilm frames = new TextureFilm( texture, 14, 12 );
int c = 9;
idle = new Animation( 3, true );
idle.frames( frames, c+0, c+1, c+1, c+0 );
run = new Animation( 10, true );
run.frames( frames, c+0, c+2, c+3, c+3, c+2, c+0 );
attack = new Animation( 10, false );
attack.frames( frames, c+2, c+3, c+4, c+5, c+2 );
die = new Animation( 10, false );
die.frames( frames, c+0, c+5, c+6, c+7 );
play(idle);
}
}

View File

@ -24,7 +24,6 @@ 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() {
@ -32,19 +31,19 @@ public class SlimeSprite extends MobSprite {
texture( Assets.SLIME );
TextureFilm frames = new TextureFilm( texture, 20, 14 );
TextureFilm frames = new TextureFilm( texture, 14, 12 );
idle = new Animation( 10, true );
idle.frames( frames, 2, 1, 0, 0, 1 );
idle = new Animation( 3, true );
idle.frames( frames, 0, 1, 1, 0 );
run = new Animation( 15, true );
run.frames( frames, 3, 2, 1, 2 );
run = new Animation( 10, true );
run.frames( frames, 0, 2, 3, 3, 2, 0 );
attack = new Animation( 10, false );
attack.frames( frames, 8, 9, 10 );
attack.frames( frames, 2, 3, 4, 5, 2 );
die = new Animation( 10, false );
die.frames( frames, 5, 6, 7 );
die.frames( frames, 0, 5, 6, 7 );
play(idle);
}

View File

@ -448,6 +448,9 @@ actors.mobs.brute.name=gnoll brute
actors.mobs.brute.enraged=enraged
actors.mobs.brute.desc=Brutes are the largest, strongest and toughest of all gnolls. When severely wounded, they go berserk, inflicting even more damage to their enemies.
actors.mobs.causticslime.name=caustic slime
actors.mobs.causticslime.desc=This slime seems to have been tainted by the dark magic emanating from below. It has lost its usual green color, and drips with caustic ooze.
actors.mobs.crab.name=sewer crab
actors.mobs.crab.def_verb=parried
actors.mobs.crab.desc=These huge crabs are at the top of the food chain in the sewers. They are extremely fast and their thick carapace can withstand heavy blows.
@ -558,7 +561,7 @@ 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.slime.desc=Slimes are strange, slightly magical creatures with a rubbery outer body and a liquid core. The city sewers provide them with an ample supply of water and nutrients.\n\nBecause of their elastic outer membrane, slimes will not take more than _6 damage_ from any one attack.
actors.mobs.snake.name=sewer snake
actors.mobs.snake.desc=These oversized serpents are capable of quickly slithering around blows, making them quite hard to hit. Magical attacks or surprise attacks are capable of catching them off-guard however.\n\nYou can perform a surprise attack by attacking while out of the snake's vision. One way is to let a snake chase you through a doorway and then _strike just as it moves into the door._