v3.3.0: heavy crossbow now more directly shows dart boosting amount

This commit is contained in:
Evan Debenham
2025-10-07 18:40:32 -04:00
parent ce0dd8706c
commit 05c52bdc1f
5 changed files with 47 additions and 11 deletions

View File

@@ -1819,7 +1819,8 @@ items.weapon.melee.battleaxe.ability_desc=The Duelist can perform a _heavy blow_
items.weapon.melee.battleaxe.desc=The enormous steel head of this battle axe puts considerable heft behind each wide stroke.
items.weapon.melee.crossbow.name=crossbow
items.weapon.melee.crossbow.stats_desc=This weapon enhances the damage of thrown darts when equipped, and will even grant its enchantment to them.
items.weapon.melee.crossbow.typical_stats_desc=Typically this weapon enhances thrown darts to deal _%1$d-%2$d damage_ when it is equipped, and will even grant its enchantment to them.
items.weapon.melee.crossbow.stats_desc=This weapon enhances thrown darts to deal _%1$d-%2$d damage_ when it is equipped, and will even grant its enchantment to them.
items.weapon.melee.crossbow.ability_name=charged shot
items.weapon.melee.crossbow.typical_ability_desc=The Duelist can _charge_ her crossbow, causing her next regular attack with it to always hit and apply one of three effects: melee attacks will knock enemies away, untipped darts will typically deal _+%1$d damage_, and tipped darts will apply their effect in a 7x7 area and typically last for _%2$d more uses_.
items.weapon.melee.crossbow.ability_desc=The Duelist can _charge_ her crossbow, causing her next regular attack with it to always hit and apply one of three effects: melee attacks will knock enemies away, untipped darts will deal _+%1$d damage_, and tipped darts will apply their effect in a 7x7 area and last for _%2$d more uses_.

View File

@@ -372,6 +372,7 @@ windows.wndupgrade.harden=Upgrading this item also has a %d%% chance to break it
windows.wndupgrade.resin=This wand has been enhanced with arcane resin, normal upgrades will override resin upgrades!
windows.wndupgrade.thrown_dust=Weapons from this set that aren't in your inventory will crumble to dust.
windows.wndupgrade.damage=Damage
windows.wndupgrade.dart_damage=Dart Damage
windows.wndupgrade.blocking=Blocking
windows.wndupgrade.weight=Weight
windows.wndupgrade.durability=Durability

View File

@@ -112,6 +112,32 @@ public class Crossbow extends MeleeWeapon {
lvl*(tier); //+4 per level, down from +5
}
public int dartMin(){
return dartMin(buffedLvl());
}
public int dartMin(int lvl){
return 4 + //4 base, up from dart base of 1
lvl; //+1 per level
}
public int dartMax(){
return dartMax(buffedLvl());
}
public int dartMax(int lvl){
return 12 + //12 base, up from dart base of 2
3*lvl; //+3 per crossbow level
}
public String statsInfo(){
if (isIdentified()){
return Messages.get(this, "stats_desc", dartMin(), dartMax());
} else {
return Messages.get(this, "typical_stats_desc", dartMin(0), dartMax(0));
}
}
@Override
protected void duelistAbility(Hero hero, Integer target) {
if (hero.buff(ChargedShot.class) != null){

View File

@@ -84,12 +84,12 @@ public class Dart extends MissileWeapon {
public int min(int lvl) {
if (bow != null){
if (!(this instanceof TippedDart) && Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){
//ability increases base dmg by 50%, scaling by 50%
return 8 + //8 base
2*bow.buffedLvl() + lvl;//+2 per bow level, +1 per level
return bow.dartMin() //crossbow dart damage
+ 4 + bow.buffedLvl() //ability increases base dmg by 50%, scaling by 50%
+ lvl; //another +1 per level (ring of sharpshooting)
} else {
return 4 + //4 base
bow.buffedLvl() + lvl; //+1 per level or bow level
return bow.dartMin() //crossbow dart damage
+ lvl; //another +1 per level (ring of sharpshooting)
}
} else {
return 1 + //1 base, down from 2
@@ -101,12 +101,12 @@ public class Dart extends MissileWeapon {
public int max(int lvl) {
if (bow != null){
if (!(this instanceof TippedDart) && Dungeon.hero.buff(Crossbow.ChargedShot.class) != null){
//ability increases base dmg by 50%, scaling by 50%
return 16 + //16 base
4*bow.buffedLvl() + 2*lvl; //+4 per bow level, +2 per level
return bow.dartMax() //crossbow dart damage
+ 4 + bow.buffedLvl() //ability increases base dmg by 50%, scaling by 50%
+ 2*lvl; //another +2 per level (ring of sharpshooting)
} else {
return 12 + //12 base
3*bow.buffedLvl() + 2*lvl; //+3 per bow level, +2 per level
return bow.dartMax() //crossbow dart damage
+ 2*lvl; //another +2 per level (ring of sharpshooting)
}
} else {
return 2 + //2 base, down from 5

View File

@@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Crossbow;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatshield;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
@@ -203,6 +204,13 @@ public class WndUpgrade extends Window {
bottom);
}
if (toUpgrade instanceof Crossbow){
bottom = fillFields(Messages.get(this, "dart_damage"),
((Crossbow) toUpgrade).dartMin(levelFrom) + "-" + ((Crossbow) toUpgrade).dartMax(levelFrom),
((Crossbow) toUpgrade).dartMin(levelTo) + "-" + ((Crossbow) toUpgrade).dartMax(levelTo),
bottom);
}
if (Dungeon.hero != null && Dungeon.hero.heroClass == HeroClass.DUELIST
&& toUpgrade instanceof MeleeWeapon && ((MeleeWeapon) toUpgrade).upgradeAbilityStat(levelFrom) != null){
bottom = fillFields(Messages.get(toUpgrade, "upgrade_ability_stat_name"),