From 96e4c74ca833825f04196578156eec3c704ba3b4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 14 Jan 2024 15:15:59 -0500 Subject: [PATCH] v2.3.0: improved 'encased in rock' visuals for geomancer --- .../main/assets/sprites/gnoll_geomancer.png | Bin 963 -> 1190 bytes .../actors/mobs/GnollGeomancer.java | 1 + .../sprites/GnollGeomancerSprite.java | 59 ++++++++++-------- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/core/src/main/assets/sprites/gnoll_geomancer.png b/core/src/main/assets/sprites/gnoll_geomancer.png index 518f636f73ffb0914bb60ceb4be4d0167613bb4c..c6c557c8da95440c8b4b422e24e002766133ef35 100644 GIT binary patch delta 1161 zcmX@izKnB%c)bD#GXn#|sq(OEKx$opPlzj!7UyHz-efp8M@v(Z%SxHwK~JPELcTuB zetlnXL8!K$i9lL_@v3Qs0j7dL#br@?g%L&#IqvJ`w%yoPFsH&H)kUJIB&Iyk?bfk{ zchBvBmfAFY z4*^X9Is&5X*wMKAK$cZWkY6yvWJN})`hWj^e|rJP-~Ro6@&EU?|6uSJ2po32He_I6 z&h>P045?r|GbOP2iUCi{;yJ6o9Z-wVy29HU)WGEM^S?d+>5cx%E9Bp4-kTX?pFgGj z>Kg0L1vb3T*Bm~0<5@z))$hl}cLcxSZl4|=eq3CCZ7$!m*O$K^zusEUue;^L>eR}; zI@hi>r}EzYemtBX^SXFq@a`td9wr`TZ4!r%X%B)l1e$(^wKLtew5n#0**QhoOV4^DLuoA6Y2wxn=W&A#dcyFo$Pn+_AZ4E4&7z7=DmD|0TwC4TXg503oW`k{J9s1WF zK0dts{N;U28j2D;>4^_R3=GWKG#s7h71qs;WbB%MYdgn*LlLJp7u~v5mQ~;UWcuq5 zPhUUYo|&$AecLz5j+wpkEsPra&D%?aLiejm3b}pp`!2Czn_|!cfwqhTEsTct&kc7q zsd(JxW|=$DJc*lO$u_0;E4DFa{=Wa=@5AGN-*GeiEPVcvrNHT?+h&&66Z*_q8bW?Q zk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`Ly(ara8TTQi8CiMB7B-UUj*44$rjF6*2UngBjQ#bf{g diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java index 974ac2017..3b6ebbff2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java @@ -239,6 +239,7 @@ public class GnollGeomancer extends Mob { } if (buff(RockArmor.class) == null){ + Splash.around(sprite, 0x555555, 30); sprite.idle(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollGeomancerSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollGeomancerSprite.java index e3e888aac..c28ee7434 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollGeomancerSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GnollGeomancerSprite.java @@ -30,7 +30,7 @@ import com.watabou.noosa.particles.Emitter; public class GnollGeomancerSprite extends MobSprite { - private Animation statue; + boolean isStatue = false; private Emitter earthArmor; @@ -39,26 +39,7 @@ public class GnollGeomancerSprite extends MobSprite { texture(Assets.Sprites.GNOLL_GEOMANCER); - TextureFilm frames = new TextureFilm( texture, 12, 16 ); - - idle = new Animation( 2, true ); - idle.frames( frames, 1, 1, 1, 2, 1, 1, 2, 2 ); - - run = new Animation( 12, true ); - run.frames( frames, 5, 6, 7, 8 ); - - attack = new Animation( 12, false ); - attack.frames( frames, 3, 4, 1 ); - - zap = attack.clone(); - - die = new Animation( 12, false ); - die.frames( frames, 9, 10, 11 ); - - statue = new Animation(1, true); - statue.frames( frames, 0 ); - - play(idle); + updateAnims(); scale.set(1.25f); } @@ -70,11 +51,36 @@ public class GnollGeomancerSprite extends MobSprite { if (ch instanceof GnollGeomancer && ((GnollGeomancer) ch).hasSapper()){ setupArmor(); } - if (ch != null && ch.buff(GnollGeomancer.RockArmor.class) != null){ - play( statue ); + if (ch != null && (ch.buff(GnollGeomancer.RockArmor.class) != null != isStatue)){ + isStatue = !isStatue; + updateAnims(); } } + private void updateAnims(){ + + TextureFilm frames = new TextureFilm( texture, 12, 16 ); + + int ofs = isStatue ? 21 : 0; + idle = new Animation( isStatue ? 1 : 2, true ); + idle.frames( frames, ofs+0, ofs+0, ofs+0, ofs+1, ofs+0, ofs+0, ofs+1, ofs+1 ); + + run = new Animation( 12, true ); + run.frames( frames, ofs+4, ofs+5, ofs+6, ofs+7 ); + + attack = new Animation( 12, false ); + attack.frames( frames, ofs+2, ofs+3, ofs+0 ); + + zap = attack.clone(); + + die = new Animation( 12, false ); + die.frames( frames, ofs+8, ofs+9, ofs+10 ); + + play(idle); + + play(idle); + } + public void setupArmor(){ if (earthArmor == null) { earthArmor = emitter(); @@ -132,13 +138,14 @@ public class GnollGeomancerSprite extends MobSprite { @Override public void idle() { super.idle(); - if (ch != null && ch.buff(GnollGeomancer.RockArmor.class) != null){ - play( statue ); + if (ch != null && ch.buff(GnollGeomancer.RockArmor.class) != null != isStatue){ + isStatue = !isStatue; + updateAnims(); } } @Override public int blood() { - return curAnim == statue ? 0x555555 : super.blood(); + return isStatue ? 0x555555 : super.blood(); } }