From 40a92bf3a415267dd646efb946a99358c90acd33 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 13 Oct 2017 19:56:58 -0400 Subject: [PATCH] v0.6.2: balance adjustments to cloak of shadows and sneak weapons --- .../items/artifacts/CloakOfShadows.java | 14 ++++++++++++-- .../items/weapon/melee/AssassinsBlade.java | 7 +++++-- .../items/weapon/melee/Dagger.java | 7 +++++-- .../items/weapon/melee/Dirk.java | 7 +++++-- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index 5c638336f..80a2432c3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -172,7 +172,7 @@ public class CloakOfShadows extends Artifact { LockedFloor lock = target.buff(LockedFloor.class); if (!stealthed && (lock == null || lock.regenOn())) { float turnsToCharge = (60 - 2*(chargeCap - charge)); - if (level() > 7) turnsToCharge -= 2 * (level() - 7); + if (level() > 7) turnsToCharge -= 10*(level() - 7)/3f; partialCharge += (1f / turnsToCharge); } @@ -232,7 +232,17 @@ public class CloakOfShadows extends Artifact { GLog.w(Messages.get(this, "no_charge")); ((Hero) target).interrupt(); } else { - exp += 10 + ((Hero) target).lvl; + //target hero level is 1 + 2*cloak level + int lvlDiffFromTarget = ((Hero) target).lvl - 1+level()*2; + //plus an extra one for each level after 6 + if (level() >= 7){ + lvlDiffFromTarget -= level()-6; + } + if (lvlDiffFromTarget >= 0){ + exp += Math.round(10f * Math.pow(1.1f, lvlDiffFromTarget)); + } else { + exp += Math.round(10f * Math.pow(0.75f, -lvlDiffFromTarget)); + } if (exp >= (level() + 1) * 50 && level() < levelCap) { upgrade(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java index 6074ab5e3..4068d2467 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/AssassinsBlade.java @@ -47,8 +47,11 @@ public class AssassinsBlade extends MeleeWeapon { Hero hero = (Hero)owner; Char enemy = hero.enemy(); if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) { - //deals avg damage to max on surprise, instead of min to max. - int damage = imbue.damageFactor(Random.NormalIntRange((min() + max()) / 2, max())); + //deals 50% toward max to max on surprise, instead of min to max. + int diff = max() - min(); + int damage = imbue.damageFactor(Random.NormalIntRange( + min() + Math.round(diff*0.50f), + max())); int exStr = hero.STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange(0, exStr); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java index c0fe6eb66..b45febbef 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dagger.java @@ -47,8 +47,11 @@ public class Dagger extends MeleeWeapon { Hero hero = (Hero)owner; Char enemy = hero.enemy(); if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) { - //deals avg damage to max on surprise, instead of min to max. - int damage = imbue.damageFactor(Random.NormalIntRange((min() + max()) / 2, max())); + //deals 75% toward max to max on surprise, instead of min to max. + int diff = max() - min(); + int damage = imbue.damageFactor(Random.NormalIntRange( + min() + Math.round(diff*0.75f), + max())); int exStr = hero.STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange(0, exStr); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java index bf02e8a7a..e48b08a30 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Dirk.java @@ -47,8 +47,11 @@ public class Dirk extends MeleeWeapon { Hero hero = (Hero)owner; Char enemy = hero.enemy(); if (enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)) { - //deals avg damage to max on surprise, instead of min to max. - int damage = imbue.damageFactor(Random.NormalIntRange((min() + max()) / 2, max())); + //deals 67% toward max to max on surprise, instead of min to max. + int diff = max() - min(); + int damage = imbue.damageFactor(Random.NormalIntRange( + min() + Math.round(diff*0.67f), + max())); int exStr = hero.STR() - STRReq(); if (exStr > 0) { damage += Random.IntRange(0, exStr);