From f0b57406e941ec09039c50994bf00cdee51cfe60 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 7 Jun 2018 19:00:59 -0400 Subject: [PATCH] v0.7.0: adjusted rooms and spellbook to accomodate droprate changes --- .../items/scrolls/ScrollOfPsionicBlast.java | 39 +++++++++---------- .../items/scrolls/ScrollOfTransmutation.java | 2 + .../messages/items/items.properties | 3 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java index 2b61f4916..5012d3b80 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java @@ -26,20 +26,15 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; -import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; -import com.watabou.utils.Random; public class ScrollOfPsionicBlast extends Scroll { { initials = 4; - - bones = true; } @Override @@ -47,30 +42,30 @@ public class ScrollOfPsionicBlast extends Scroll { GameScene.flash( 0xFFFFFF ); + //scales from 2x to 5x power, maxing at ~10% HP + float hpPercent = (curUser.HT - curUser.HP)/(float)(curUser.HT); + float power = Math.min( 5f, 2f + 3.333f*hpPercent); + Sample.INSTANCE.play( Assets.SND_BLAST ); Invisibility.dispel(); for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { if (Dungeon.level.heroFOV[mob.pos]) { - mob.damage(mob.HP, this); + mob.damage(Math.round(mob.HP * power/5f), this); + if (mob.isAlive()) { + Buff.prolong(mob, Blindness.class, Math.round(2*power)); + } } } - - curUser.damage(Math.max(curUser.HT/5, curUser.HP/2), this); - if (curUser.isAlive()) { - Buff.prolong(curUser, Paralysis.class, Random.Int(4, 6)); - Buff.prolong(curUser, Blindness.class, Random.Int(6, 9)); - Dungeon.observe(); - } + + Buff.prolong(curUser, Weakness.class, Weakness.DURATION); + Buff.prolong(curUser, Blindness.class, Math.round(2*power)); + Dungeon.observe(); setKnown(); readAnimation(); - - if (!curUser.isAlive()) { - Dungeon.fail( getClass() ); - GLog.n( Messages.get(this, "ondeath") ); - } + } @Override @@ -80,9 +75,13 @@ public class ScrollOfPsionicBlast extends Scroll { Sample.INSTANCE.play( Assets.SND_BLAST ); Invisibility.dispel(); + //scales from 3x to 5x power, maxing at ~20% HP + float hpPercent = (curUser.HT - curUser.HP)/(float)(curUser.HT); + float power = Math.min( 5f, 3f + 2.5f*hpPercent); + for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { if (Dungeon.level.heroFOV[mob.pos]) { - mob.damage(mob.HT, this ); + mob.damage(Math.round(mob.HP * power/5f), this); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java index 937ff2ede..f647d7c49 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTransmutation.java @@ -48,6 +48,8 @@ public class ScrollOfTransmutation extends InventoryScroll { { initials = 10; mode = WndBag.Mode.TRANMSUTABLE; + + bones = true; } public static boolean canTransmute(Item item){ diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index d9d13394b..8753e4ebc 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -634,8 +634,7 @@ items.scrolls.scrollofmirrorimage.name=scroll of mirror image items.scrolls.scrollofmirrorimage.desc=The incantation on this scroll will create illusionary twins of the reader, which will chase their enemies. items.scrolls.scrollofpsionicblast.name=scroll of psionic blast -items.scrolls.scrollofpsionicblast.ondeath=The Psionic Blast tears your mind apart... -items.scrolls.scrollofpsionicblast.desc=This scroll contains destructive energy that can be channeled to tear apart the minds of all visible creatures. The power unleashed by the scroll will also temporarily blind, stun, and seriously harm the reader. +items.scrolls.scrollofpsionicblast.desc=This scroll contains destructive energy that can be channeled to assault the minds all visible creatures, blinding and damaging them. The power unleashed by the scroll is chaotic, so it will also blind and weaken the user.\n\n The more injured the user is, the more powerful the scroll will be. At very low health psionic blast can kill most enemies instantly. items.scrolls.scrollofrage.name=scroll of rage items.scrolls.scrollofrage.roar=The scroll emits an enraging roar that echoes throughout the dungeon!