v0.6.3: reworked/adjusted huntress and ring of sharpshooting

This commit is contained in:
Evan Debenham 2018-01-01 05:39:12 -05:00
parent 4d91ba2a24
commit 7b72a53393
6 changed files with 58 additions and 38 deletions

View File

@ -30,7 +30,12 @@ public class RingOfSharpshooting extends Ring {
return new Aim();
}
public static float accuracyMultiplier( Char target ){
//roughly in line with the boost a weapon gets from an upgrade
public static float damageMultiplier( Char target ){
return 1f + 0.2f * getBonus(target, Aim.class);
}
public static float durabilityMultiplier( Char target ){
return (float)(Math.pow(1.2, getBonus(target, Aim.class)));
}

View File

@ -25,11 +25,9 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfFuror;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Annoying;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Displacing;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Exhausting;
@ -49,8 +47,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Unstab
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vampiric;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Venomous;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vorpal;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -148,10 +144,6 @@ abstract public class Weapon extends KindOfWeapon {
encumbrance = Math.max(3, encumbrance+3);
float ACC = this.ACC;
if (this instanceof MissileWeapon) {
ACC *= RingOfSharpshooting.accuracyMultiplier( owner );
}
return encumbrance > 0 ? (float)(ACC / Math.pow( 1.5, encumbrance )) : ACC;
}
@ -162,9 +154,6 @@ abstract public class Weapon extends KindOfWeapon {
int encumbrance = 0;
if (owner instanceof Hero) {
encumbrance = STRReq() - ((Hero)owner).STR();
if (this instanceof MissileWeapon && ((Hero)owner).heroClass == HeroClass.HUNTRESS) {
encumbrance -= 2;
}
}
float DLY = imbue.delayFactor(this.DLY);
@ -179,23 +168,6 @@ abstract public class Weapon extends KindOfWeapon {
return hasEnchant(Projecting.class) ? RCH+1 : RCH;
}
@Override
public int damageRoll( Char owner ) {
int damage = super.damageRoll( owner );
if (owner instanceof Hero &&
(this instanceof MeleeWeapon
|| (this instanceof MissileWeapon && ((Hero)owner).heroClass == HeroClass.HUNTRESS))) {
int exStr = ((Hero)owner).STR() - STRReq();
if (exStr > 0) {
damage += Random.IntRange( 0, exStr );
}
}
return imbue.damageFactor(damage);
}
public int STRReq(){
return STRReq(level());
}

View File

@ -22,8 +22,11 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.utils.Random;
public class MeleeWeapon extends Weapon {
@ -47,6 +50,20 @@ public class MeleeWeapon extends Weapon {
return (8 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
}
@Override
public int damageRoll(Char owner) {
int damage = super.damageRoll( owner );
if (owner instanceof Hero) {
int exStr = ((Hero)owner).STR() - STRReq();
if (exStr > 0) {
damage += Random.IntRange( 0, exStr );
}
}
return imbue.damageFactor(damage);
}
@Override
public String info() {

View File

@ -30,10 +30,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SnipersMark;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Projecting;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
import java.util.ArrayList;
@ -136,7 +138,28 @@ abstract public class MissileWeapon extends Weapon {
}
protected float durabilityPerUse(){
return MAX_DURABILITY/10f;
float usage = Dungeon.hero.heroClass == HeroClass.HUNTRESS ?
MAX_DURABILITY/15f:
MAX_DURABILITY/10f;
usage /= RingOfSharpshooting.durabilityMultiplier( Dungeon.hero );
return usage;
}
@Override
public int damageRoll(Char owner) {
int damage = super.damageRoll( owner );
if (owner instanceof Hero &&
((Hero)owner).heroClass == HeroClass.HUNTRESS) {
int exStr = ((Hero)owner).STR() - STRReq();
if (exStr > 0) {
damage += Random.IntRange( 0, exStr );
}
}
return (int)(imbue.damageFactor(damage) * RingOfSharpshooting.damageMultiplier( owner ));
}
@Override
@ -195,7 +218,10 @@ abstract public class MissileWeapon extends Weapon {
String info = desc();
info += "\n\n" + Messages.get( MissileWeapon.class, "stats", imbue.damageFactor(min()), imbue.damageFactor(max()), STRReq());
info += "\n\n" + Messages.get( MissileWeapon.class, "stats",
(int)(imbue.damageFactor(min()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
(int)(imbue.damageFactor(max()) * RingOfSharpshooting.damageMultiplier( Dungeon.hero )),
STRReq());
if (STRReq() > Dungeon.hero.STR()) {
info += " " + Messages.get(Weapon.class, "too_heavy");

View File

@ -250,28 +250,28 @@ actors.hero.heroclass.warrior_perk1=The Warrior starts with a broken seal which
actors.hero.heroclass.warrior_perk2=The Warrior will slowly generate a shield while he is wearing armor with the seal affixed.
actors.hero.heroclass.warrior_perk3=The seal can be moved between armor, carrying a single upgrade with it.
actors.hero.heroclass.warrior_perk4=Any piece of food restores some health when eaten.
actors.hero.heroclass.warrior_perk5=Potions of Healing are identified from the beginning.
actors.hero.heroclass.warrior_perk5=Potions of Healing are automatically identified.
actors.hero.heroclass.mage=mage
actors.hero.heroclass.mage_perk1=The Mage starts with a unique Staff, which can be imbued with the properties of a wand.
actors.hero.heroclass.mage_perk2=The Mage's staff can be used as a melee weapon or a more powerful wand.
actors.hero.heroclass.mage_perk3=The Mage partially identifies wands after using them.
actors.hero.heroclass.mage_perk4=When eaten, any piece of food restores 1 charge for all wands in the inventory.
actors.hero.heroclass.mage_perk5=Scrolls of Upgrade are identified from the beginning.
actors.hero.heroclass.mage_perk5=Scrolls of Upgrade are automatically identified.
actors.hero.heroclass.rogue=rogue
actors.hero.heroclass.rogue_perk1=The Rogue starts with a unique Cloak of Shadows, which he can use to become invisible at will.
actors.hero.heroclass.rogue_perk2=The Rogue's cloak is an artifact, it becomes more powerful as he uses it.
actors.hero.heroclass.rogue_perk3=The Rogue detects secrets and traps from farther away than other heroes.
actors.hero.heroclass.rogue_perk4=The Rogue is able to find more secrets hidden in the dungeon than other heroes.
actors.hero.heroclass.rogue_perk5=Scrolls of Magic Mapping are identified from the beginning.
actors.hero.heroclass.rogue_perk5=Scrolls of Magic Mapping are automatically identified.
actors.hero.heroclass.huntress=huntress
actors.hero.heroclass.huntress_perk1=The Huntress starts with a unique upgradeable boomerang.
actors.hero.heroclass.huntress_perk2=The Huntress is proficient with missile weapons, getting bonus damage from excess strength.
actors.hero.heroclass.huntress_perk3=The Huntress has a chance to recover a single used missile weapon from each enemy.
actors.hero.heroclass.huntress_perk2=The Huntress gains bonus damage from excess strength on thrown weapons.
actors.hero.heroclass.huntress_perk3=The Huntress can use thrown weapons for longer before they break.
actors.hero.heroclass.huntress_perk4=The Huntress senses neighbouring monsters even if they are hidden behind obstacles.
actors.hero.heroclass.huntress_perk5=Potions of Mind Vision are identified from the beginning.
actors.hero.heroclass.huntress_perk5=Potions of Mind Vision are automatically identified.
actors.hero.herosubclass.gladiator=gladiator
actors.hero.herosubclass.gladiator_desc=A successful attack with a melee weapon allows the _Gladiator_ to start a combo. Building combo allows him to use unique finisher moves.

View File

@ -560,7 +560,7 @@ items.rings.ringofmight.name=ring of might
items.rings.ringofmight.desc=This ring enhances the physical traits of the wearer, granting them greater physical strength and constitution. A cursed ring will weaken the wearer.
items.rings.ringofsharpshooting.name=ring of sharpshooting
items.rings.ringofsharpshooting.desc=This ring enhances the wearer's precision and aim, which will make all projectile weapons more accurate and durable. A cursed ring will have the opposite effect.
items.rings.ringofsharpshooting.desc=This ring enhances the wearer's precision and aim, which will make all projectile weapons more damaging and durable. A cursed ring will have the opposite effect.
items.rings.ringoftenacity.name=ring of tenacity
items.rings.ringoftenacity.desc=When worn, this ring will allow the wearer to resist normally mortal strikes. The more injured the user is, the more resistant they will be to damage. A cursed ring will instead make it easier for enemies to execute the wearer.