diff --git a/assets/crab.png b/assets/crab.png index f80950592..ecca05df6 100644 Binary files a/assets/crab.png and b/assets/crab.png differ diff --git a/assets/gnoll.png b/assets/gnoll.png index 9fa644a9e..a19acdbbc 100644 Binary files a/assets/gnoll.png and b/assets/gnoll.png differ diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index 07f6f750d..8e05160c8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -34,9 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.CurareDart; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; -import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.CrabSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.*; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; import com.shatteredpixel.shatteredpixeldungeon.Assets; @@ -61,8 +59,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.shatteredpixel.shatteredpixeldungeon.sprites.FetidRatSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndSadGhost; import com.watabou.utils.Bundle; @@ -407,7 +403,7 @@ public class Ghost extends Mob.NPC { @Override public int defenseProc( Char enemy, int damage ) { - GameScene.add( Blob.seed( pos, 100, StenchGas.class ) ); + GameScene.add( Blob.seed( pos, 20, StenchGas.class ) ); return super.defenseProc(enemy, damage); } @@ -422,18 +418,18 @@ public class Ghost extends Mob.NPC { @Override public String description() { return - "Something is clearly wrong with this rat. Its matted fur and rotting skin are very " + - "different from the healthy rats you've seen previously. It's bright orange eyes " + - "and larger size make it especially menacing.\n\n" + + "Something is clearly wrong with this rat. Its greasy black fur and rotting skin are very " + + "different from the healthy rats you've seen previously. It's blood red eyes " + + "make it seem especially menacing.\n\n" + "The rat carries a cloud of horrible stench with it, it's overpoweringly strong up close.\n\n" + - "Dark ooze drips from the rat's teeth, it eats through the floor but seems to dissolve in water."; + "Dark ooze dribbles from the rat's mouth, it eats through the floor but seems to dissolve in water."; } } public static class GnollTrickster extends Gnoll { { name = "gnoll trickster"; - spriteClass = GnollSprite.class; + spriteClass = GnollTricksterSprite.class; HP = HT = 20; defenseSkill = 4; @@ -521,8 +517,8 @@ public class Ghost extends Mob.NPC { @Override public void storeInBundle( Bundle bundle ) { - super.storeInBundle( bundle ); - bundle.put( COMBO , combo ); + super.storeInBundle(bundle); + bundle.put(COMBO, combo); } @Override @@ -536,7 +532,7 @@ public class Ghost extends Mob.NPC { public static class GreatCrab extends Crab { { name = "great crab"; - spriteClass = CrabSprite.class; + spriteClass = GreatCrabSprite.class; HP = HT = 30; defenseSkill = 0; //see damage() diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java index a6485a045..41ce1969a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/CrabSprite.java @@ -21,29 +21,29 @@ import com.watabou.noosa.TextureFilm; import com.shatteredpixel.shatteredpixeldungeon.Assets; public class CrabSprite extends MobSprite { - + public CrabSprite() { super(); - + texture( Assets.CRAB ); - - TextureFilm frames = new TextureFilm( texture, 16 ); - + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + idle = new Animation( 5, true ); idle.frames( frames, 0, 1, 0, 2 ); - + run = new Animation( 15, true ); run.frames( frames, 3, 4, 5, 6 ); - + attack = new Animation( 12, false ); attack.frames( frames, 7, 8, 9 ); - + die = new Animation( 12, false ); die.frames( frames, 10, 11, 12, 13 ); - + play( idle ); } - + @Override public int blood() { return 0xFFFFEA80; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java new file mode 100644 index 000000000..a39d6f17a --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollTricksterSprite.java @@ -0,0 +1,62 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.IncendiaryDart; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; +import com.watabou.utils.Callback; + +/** + * Created by Evan on 09/10/2014. + */ +public class GnollTricksterSprite extends MobSprite { + + private Animation cast; + + public GnollTricksterSprite() { + super(); + + texture( Assets.GNOLL ); + + TextureFilm frames = new TextureFilm( texture, 12, 15 ); + + idle = new MovieClip.Animation( 2, true ); + idle.frames( frames, 21, 21, 21, 22, 21, 21, 22, 22 ); + + run = new MovieClip.Animation( 12, true ); + run.frames( frames, 25, 26, 27, 28 ); + + attack = new MovieClip.Animation( 12, false ); + attack.frames( frames, 23, 24, 21 ); + + cast = attack.clone(); + + die = new MovieClip.Animation( 12, false ); + die.frames( frames, 29, 30, 31 ); + + play( idle ); + } + + @Override + public void attack( int cell ) { + if (!Level.adjacent(cell, ch.pos)) { + + ((MissileSprite)parent.recycle( MissileSprite.class )). + reset( ch.pos, cell, new IncendiaryDart(), new Callback() { + @Override + public void call() { + ch.onAttackComplete(); + } + } ); + + play( cast ); + turnTo( ch.pos , cell ); + + } else { + + super.attack( cell ); + + } + } +} diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java new file mode 100644 index 000000000..e2b8adf06 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/sprites/GreatCrabSprite.java @@ -0,0 +1,38 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +/** + * Created by Evan on 09/10/2014. + */ +public class GreatCrabSprite extends MobSprite { + + public GreatCrabSprite() { + super(); + + texture( Assets.CRAB ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new MovieClip.Animation( 5, true ); + idle.frames( frames, 16, 17, 16, 18 ); + + run = new MovieClip.Animation( 15, true ); + run.frames( frames, 19, 20, 21, 22 ); + + attack = new MovieClip.Animation( 12, false ); + attack.frames( frames, 23, 24, 25 ); + + die = new MovieClip.Animation( 12, false ); + die.frames( frames, 26, 27, 28, 29 ); + + play( idle ); + } + + @Override + public int blood() { + return 0xFFFFEA80; + } +}