From 4f56f630531b8ea9bf3b713c618faba09384f120 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 11 Aug 2014 17:17:05 -0400 Subject: [PATCH] V0.1.1: overhauled scroll of lullaby pt. 1 (currently untested) --- assets/buffs.png | Bin 19015 -> 4201 bytes assets/large_buffs.png | Bin 20079 -> 5724 bytes .../shatteredpixeldungeon/actors/Char.java | 3 + .../actors/buffs/Drowsy.java | 43 +++++++++++ .../actors/buffs/MagicalSleep.java | 70 ++++++++++++++++++ .../actors/hero/Hero.java | 5 ++ .../actors/mobs/Mob.java | 3 +- .../items/scrolls/ScrollOfLullaby.java | 22 ++---- .../ui/BuffIndicator.java | 2 + 9 files changed, 132 insertions(+), 16 deletions(-) create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java create mode 100644 src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java diff --git a/assets/buffs.png b/assets/buffs.png index 7c12ab545d99a634aa6aac1e00e9b286a1f41704..e809c1aa349600692391e753f7df3c9f219d7b4e 100644 GIT binary patch delta 4163 zcmV-J5WMfllmY1=kRt*LIgvUWe@MrjmUmQC*A|D*y?1({%`gH|hTglt0MdJtUPWP; z8DJ;_4l^{dA)*2iMMRn+NKnLp(NH8-M6nPQRImpm2q-ZaMN}+rM%Ih2ti1Q~^84eg zZ|$@9x%=$B&srA%lBX}1mj+7#kjfMAgFKw+5s^`J>;QlP9${Ff#{e35u39)87vVOh&UxnkS?~*ikKRg zEM^!bX1*vv5zC1=VUZ0!`z*4fnAxd3wur?!r?XSpV(u03woD;M#E7qm3p2T#ED_%l zu||q8l`G;m;@DIUGXnq=e@Sc?a9D{VHW4w29}?su;^hF~NC{tY+*d5%WDCTXa!E_i z;d2ub1#}&jF5T4HnnCyEWTkKf0>c0%E1Ah>(_PY1)0w;+02c53Su*0<(nUqKG_|(0 zG&D0Z{i;y^b@OjZ+}lNZ8Th$p5Uu}YB~8euXQVS(9J=A3hxi`{{&gM(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5Ls&a}z(g zahv@?-@tVSOqJGNs_<`DVErAXQo)|0Q2w;>GeP`WTi`b*?mIp2LVS$2LB5ur&f8Is zNTarSM8zamJ)LEZvBAd>!)rVdb-e7YzoumChRUW%jT>ruP6q1>Si?yc%Wg_{r?n_C z47-D#>M{)PI5eL+PoFR;T;2@4lmV5&2D0`@r-;wuiqq~my{~FH7$S03qvCU4WRqpF z+kBm6F!~@Owiwlv_=wl$8X~sKt=mgQ73=4cS3GyIo}?Uy95IMXzYQC4b9o1Id*0h| z`10>AduX&5b7|?V3X(l~EfV=n1<9{sE=a3S0o!`Fzot8==oI6pj*iOiRo3;V@x4-dz`KVE?@jbB-Xyv1*T^n;+vg@>VhGPx z+otPX9^5vYt#`}gNI+9S%EevBJ#MZ^B`O9gCzo0A*tW@fSdP@~yERyEGpVjOwA$9!sCjIDWo6BGZf0zJ z^=eG%@F4-iIX>(@kjF>efg7!t1CeCWa>xoAdl7f%pinPO@Jsjp-V zdJdX+N=fkn^X@0pr^RaOB`SHI?A))pY(4MOX&aT;1wo#&p|a1aiYKE`fXR*JgUeqY ryt&-GZ$2mWS-;FZo42seUS44Qc3F`{vu@nN`}pQ2*2V=!?uY&ZI#$!M diff --git a/assets/large_buffs.png b/assets/large_buffs.png index 42cd34ff878e391448bb4286baee8dd6d77512c9..bf930a9f94cdd7055db2ea256fb43f4493251b14 100644 GIT binary patch delta 5698 zcmV-I7QN~3oB`Y{kRt*LIgvUWe@MrjmUmQC*A|D*y?1({%`gH|hTglt0MdJtUPWP; z8DJ;_4l^{dA)*2iMMRn+NKnLp(NH8-M6nPQRImpm2q-ZaMN}+rM%Ih2ti1Q~^84eg zZ|$@9x%=$B&srA%lBX}1mj+7#kjfMAgFKw+5s^`J>;QlP9${Ff#{e35u39)87vVOh&UxnkS?~*ikKRg zEM^!bX1*vv5zC1=VUZ0!`z*4fnAxd3wur?!r?XSpV(u03woD;M#E7qm3p2T#ED_%l zu||q8l`G;m;@DIUGXnq=e@Sc?a9D{VHW4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nY!zsQGTakE`vQXc(*dA$r|Jj1++WKc4->S-&-F*~S z8lpxSn-7Gg<7g|2^6_)AH5fI8u*u;OSy0n7?8x2&fr=F>ya0;|{G^D^*qgW1TX9gS zdCp6A?T+HygjNX*mDDN-DCgy&1xyvgJ?$yXoyVsORUgUGg_h)W89O>T&2&^{o41B| zcofL3;sft1L>TQ|U6VCa0;R!u)ChazN9nk(2!UYJoYy|5xg(y(o}97SjsKRu4aG!N znw;^l?5~SF&IQ|oy~FIXXTIX$22z}Xhi}i0Lnwi|V6Ixn4>P`(*}yYlL3sWr7iQPL z7t9Vb~yj6$Sc0Dtc~)d?8%2OOj2Ft7^6HnXThhGhm%|Zfy}Uy3hI;7-XH)s zsFC<(I8hHNB&npt2mnS#Mgz`gL*~V@R}V^$307N(t-qqK`5^z6>X_)V!}-x9;qdC_ zh=$?ZbGCJ}BP-Wuw(X=&;=9`@3{Qpb!k1m6e&*7dTGtWAiKHkkEhW5_2~bi}?jP%e z+H%+7ef60Ahp!^4dG0g5;63O4s@QIEzK)vD;nkEx7jJ_@psma%zta>43N+T=e(!(7V zjK6TsLyj_@KIn0@P*es=FgPVS8Jzf1RVeYRdGP1GdGl7MYuu~M6><6#jI4kaMMit_ zsm8bq3pYOll;x+4URTt*kBG8YT`FEft}LZ5d-o);g^9ex0@wGfI&8EZ%c9j4N<6vL zoWH&_kn>I@D|x&1^NM=iS~t*td|^{zwD%f)h`{PN+*|V_a3g?KwRd|eEa-*x;{0^w z<@4KbFm7e4Q(4>idHg4>Je55ZXR?$)&@1pNPD#Vrdb+c~XWy|)vwDx1!N~`z{h!;l zFoT;Y?^A}oY3kivI@C>hM~26fC-Ay+T|^PvT1%#VtJWBc6b0Ou=4sAH>bh_AF{)fw zw7l?p4itl8dhV$fPrh-u2jYcwa^0l2ED srcClass = src.getClass(); if (immunities().contains( srcClass )) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java new file mode 100644 index 000000000..083ddb4c0 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Drowsy.java @@ -0,0 +1,43 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2014 Oleg Dolya + * + * 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 + */ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; + +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; + +public class Drowsy extends FlavourBuff { + + public static final float DURATION = 4f; + + @Override + public int icon() { + return BuffIndicator.DROWSY; + } + + @Override + public boolean act(){ + Buff.affect(target, MagicalSleep.class); + GLog.i("You fall into a deep magical sleep."); + return super.act(); + } + + @Override + public String toString() { + return "Drowsy"; + } +} diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java new file mode 100644 index 000000000..156cdd5f0 --- /dev/null +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicalSleep.java @@ -0,0 +1,70 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2014 Oleg Dolya + * + * 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 + */ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; + +public class MagicalSleep extends Buff { + + private static final float STEP = 1f; + public static final float SWS = 1.5f; + + @Override + public boolean attachTo( Char target ) { + if (super.attachTo( target )) { + + target.paralysed = true; + + return true; + } else { + return false; + } + } + + @Override + public boolean act(){ + if (target instanceof Hero) { + target.HP = Math.min(target.HP+1, target.HT); + if (target.HP == target.HT) { + GLog.p("You wake up feeling refreshed and healthy."); + detach(); + } + } + spend( STEP ); + return true; + } + + @Override + public void detach() { + target.paralysed = false; + super.detach(); + } + + @Override + public int icon() { + return BuffIndicator.MAGIC_SLEEP; + } + + @Override + public String toString() { + return "Magical Sleep"; + } +} \ No newline at end of file diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index a88276395..310e5049f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -20,6 +20,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero; import java.util.ArrayList; import java.util.HashSet; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.watabou.noosa.Camera; import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; @@ -821,6 +822,10 @@ public class Hero extends Char { @Override public void damage( int dmg, Object src ) { restoreHealth = false; + if (this.buff(Drowsy.class) != null){ + Buff.detach(this, Drowsy.class); + GLog.i("The pain helps you resist the urge to sleep."); + } super.damage( dmg, src ); if (subClass == HeroSubClass.BERSERKER && 0 < HP && HP <= HT * Fury.LEVEL) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index c92fbd38d..b571a2abc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; @@ -292,7 +293,7 @@ public abstract class Mob extends Char { state = State.HUNTING; } else if (buff instanceof Terror) { state = State.FLEEING; - } else if (buff instanceof Sleep) { + } else if (buff instanceof Sleep || buff instanceof MagicalSleep) { if (sprite != null) { new Flare( 4, 32 ).color( 0x44ffff, true ).show( sprite, 2f ) ; } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java index edd67e0f1..c74d3e7ea 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfLullaby.java @@ -17,6 +17,7 @@ */ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; import com.watabou.noosa.audio.Sample; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -45,24 +46,16 @@ public class ScrollOfLullaby extends Scroll { Mob affected = null; for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { if (Level.fieldOfView[mob.pos]) { - Buff.affect( mob, Sleep.class ); - if (mob.buff( Sleep.class ) != null) { + Buff.affect( mob, Drowsy.class ); + if (mob.buff( Drowsy.class ) != null) { affected = mob; count++; } } } - - switch (count) { - case 0: - GLog.i( "The scroll utters a soothing melody." ); - break; - case 1: - GLog.i( "The scroll utters a soothing melody and the " + affected.name + " falls asleep!" ); - break; - default: - GLog.i( "The scroll utters a soothing melody and the monsters fall asleep!" ); - } + + GLog.i( "The scroll utters a soothing melody. You feel very sleepy." ); + setKnown(); curUser.spendAndNext( TIME_TO_READ ); @@ -71,8 +64,7 @@ public class ScrollOfLullaby extends Scroll { @Override public String desc() { return - "A soothing melody will put all creatures in your field of view into a deep sleep, " + - "giving you a chance to flee or make a surprise attack on them."; + "A soothing melody will lull all who hear it into a deep magical sleep "; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java index dce94f300..2e26e817d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java @@ -62,6 +62,8 @@ public class BuffIndicator extends Component { public static final int BLEEDING = 26; public static final int MARK = 27; public static final int DEFERRED = 28; + public static final int DROWSY = 29; + public static final int MAGIC_SLEEP = 30; public static final int SIZE = 7;