From 70d1ba96b3657cd5fcab138a67a7609d271b01be Mon Sep 17 00:00:00 2001 From: Samuel Braithwaite Date: Sat, 17 Oct 2020 11:42:59 +0100 Subject: [PATCH] Added descs, stat descs, etc for ranged weapons. --- .../assets/messages/items/items.properties | 37 ++++++++++++++++--- .../items/weapon/ranged/RangedWeapon.java | 11 ++++++ 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 63d1d0ff..33e10c5d 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1711,15 +1711,16 @@ items.weapon.enchantments.vampiric.desc=This powerful enchantment leeches life f ###melee weapons -items.weapon.melee.meleeweapon.ac_attack=ATTACK -items.weapon.melee.meleeweapon.select_cell=Choose an enemy to attack -items.weapon.melee.meleeweapon.no_enemy=No enemy is on this cell. -items.weapon.melee.meleeweapon.out_of_range=Your weapon can't hit that enemy. -items.weapon.melee.meleeweapon.not_equipped=Equip your weapon. items.weapon.melee.meleeweapon.causes_paralysis=This weapon may cause _paralysis_ to enemies items.weapon.melee.meleeweapon.causes_bleed=This weapon may cause _bleeding_ to enemies. items.weapon.melee.meleeweapon.causes_cripple=This weapon may _cripple_ enemies. +items.weapon.weapon.not_equipped=Equip your weapon. +items.weapon.weapon.ac_attack=ATTACK +items.weapon.weapon.select_cell=Choose an enemy to attack +items.weapon.weapon.no_enemy=No enemy is on this cell. +items.weapon.weapon.out_of_range=Your weapon can't hit that enemy. + items.weapon.melee.meleeweapon.delay_increase=This weapon increases your attack delay by _%s%%._ items.weapon.melee.meleeweapon.delay_decrease=This weapon decreases your attack delay by _%s%%._ @@ -1934,6 +1935,32 @@ items.weapon.melee.relic.enchants.drawing.name=drawing %s items.weapon.melee.relic.enchants.drawing.desc=This enchantment drains life energy from your enemy, fuelling it back into you and your allies. items.weapon.melee.relic.enchants.drawing.activated=Your sword sends your life energy into nearby allies! +###ranged weapons +items.weapon.ranged.rangedweapon.select_ammo=Reload your weapon +items.weapon.ranged.rangedweapon.ac_reload=RELOAD +items.weapon.ranged.rangedweapon.stats_known=This ranged weapon deals _%1$d-%2$d damage_. It will take _%3$d_ turns to reload. +items.weapon.ranged.rangedweapon.stats_unknown=Typically this ranged weapon deals _%1$d-%2$d damage_. It will take _%3$d_ turns to reload. + +items.weapon.ranged.bow.name=Bow +items.weapon.ranged.bow.desc=A medium-sized good-quality bow. + +items.weapon.ranged.crossbow.name=Crossbow +items.weapon.ranged.crossbow.desc=Crossbows are heavier and deal more damage than their counterparts, but have less ammo and a longer reload. + +items.weapon.ranged.firearm.name=Rifle +items.weapon.ranged.firearm.desc=Guns won't hurt you quite as much as crossbows, but their reload time is closer to that of a bow. + + +items.weapon.ranged.ammo.arrow.name=Arrow +items.weapon.ranged.ammo.arrow.desc=A long, straight arrow. Typically used by _bows_. + +items.weapon.ranged.ammo.bolt.name=Bolt +items.weapon.ranged.ammo.bolt.desc=A hard, powerful bolt of metal. Typically used by _crossbows_. + +items.weapon.ranged.ammo.bullet.name=Bullet +items.weapon.ranged.ammo.bullet.desc=A round, silver-looking bullet. Typically used by _guns_. + + ###missile weapons items.weapon.missiles.darts.adrenalinedart.name=adrenaline dart items.weapon.missiles.darts.adrenalinedart.desc=These darts are tipped with a swiftthistle-based compound which will give their target a boost in speed. This boost affects both speed of movement and of attacking, though movement is improved more. The dart itself is still harmful to enemies, but will not harm allies. diff --git a/core/src/main/java/com/shatteredpixel/yasd/general/items/weapon/ranged/RangedWeapon.java b/core/src/main/java/com/shatteredpixel/yasd/general/items/weapon/ranged/RangedWeapon.java index 3cfe0fd5..bcb8a50c 100644 --- a/core/src/main/java/com/shatteredpixel/yasd/general/items/weapon/ranged/RangedWeapon.java +++ b/core/src/main/java/com/shatteredpixel/yasd/general/items/weapon/ranged/RangedWeapon.java @@ -88,6 +88,17 @@ private void doReload(int amount) { gainAmmo(amount); } + @Override + public String info() { + String info = "\n\n"; + if (isIdentified()) { + info += Messages.get(this, "stats_known", min(), max(), Math.round(reloadTime)); + } else { + info += Messages.get(this, "stats_unknown", min(1), max(1), Math.round(reloadTime)); + } + return desc() + info + statsReqDesc(); + } + //Regular throw speed is 240f. Arrows, bolts and bullets should be faster than that. protected float speed = 300f;