v3.2.0: reduced liquid metal cost scaling per lvl to 1.33x from 2x
This commit is contained in:
committed by
Evan Debenham
parent
6cc40bd07f
commit
38c59724b4
@@ -2369,7 +2369,7 @@ items.liquidmetal.ac_apply=APPLY
|
||||
items.liquidmetal.prompt=Select a thrown weapon
|
||||
items.liquidmetal.already_fixed=That thrown weapon is already in perfect condition!
|
||||
items.liquidmetal.apply=You use %d liquid metal to repair your thrown weapon.
|
||||
items.liquidmetal.desc=When poured over a thrown weapon, this magical liquid will fill into the cracks and tears from use, restoring the thrown weapon to perfect condition!\n\nA tier 1 weapon requires 10 liquid metal to be fully repaired, a tier 5 weapon requires 30. Each upgrade also doubles the amount of metal needed.\n\nLiquid metal cannot be used to repair the tips on tipped darts.
|
||||
items.liquidmetal.desc=When poured over a thrown weapon, this magical liquid will fill into the cracks and tears from use, restoring the thrown weapon to perfect condition!\n\nA tier 1 weapon requires 10 liquid metal to be fully repaired, a tier 5 weapon requires 30. Each upgrade also increases the amount of metal needed by 33%.\n\nLiquid metal cannot be used to repair the tips on tipped darts.
|
||||
items.liquidmetal.discover_hint=You can craft this item via alchemy.
|
||||
|
||||
items.lostbackpack.name=lost backpack
|
||||
|
||||
@@ -136,24 +136,24 @@ public class LiquidMetal extends Item {
|
||||
if (item != null && item instanceof MissileWeapon) {
|
||||
MissileWeapon m = (MissileWeapon)item;
|
||||
|
||||
int maxToUse = 5*(m.tier+1);
|
||||
maxToUse *= Math.pow(2, m.level());
|
||||
float maxToUse = 5*(m.tier+1);
|
||||
maxToUse *= Math.pow(1.35f, m.level());
|
||||
|
||||
float durabilityPerMetal = 100 / (float)maxToUse;
|
||||
float durabilityPerMetal = 100 / maxToUse;
|
||||
|
||||
//we remove a tiny amount here to account for rounding errors
|
||||
float percentDurabilityLost = 0.999f - (m.durabilityLeft()/100f);
|
||||
maxToUse = (int)Math.ceil(maxToUse*percentDurabilityLost);
|
||||
int toUse = (int)Math.ceil(maxToUse*percentDurabilityLost);
|
||||
float durPerUse = m.durabilityPerUse()/100f;
|
||||
if (maxToUse == 0 ||
|
||||
if (toUse == 0 ||
|
||||
Math.ceil(m.durabilityLeft()/ m.durabilityPerUse()) >= Math.ceil(m.MAX_DURABILITY/ m.durabilityPerUse()) ){
|
||||
GLog.w(Messages.get(LiquidMetal.class, "already_fixed"));
|
||||
return;
|
||||
} else if (maxToUse < quantity()) {
|
||||
Catalog.countUses(LiquidMetal.class, maxToUse);
|
||||
} else if (toUse < quantity()) {
|
||||
Catalog.countUses(LiquidMetal.class, toUse);
|
||||
m.repair(maxToUse*durabilityPerMetal);
|
||||
quantity(quantity()-maxToUse);
|
||||
GLog.i(Messages.get(LiquidMetal.class, "apply", maxToUse));
|
||||
quantity(quantity()-toUse);
|
||||
GLog.i(Messages.get(LiquidMetal.class, "apply", toUse));
|
||||
|
||||
} else {
|
||||
Catalog.countUses(LiquidMetal.class, quantity());
|
||||
@@ -215,7 +215,7 @@ public class LiquidMetal extends Item {
|
||||
if (m.defaultQuantity() != 3){
|
||||
quantityPerWeapon = 3f / m.defaultQuantity();
|
||||
}
|
||||
quantityPerWeapon += Math.pow(2, Math.min(3, m.level()));
|
||||
quantityPerWeapon *= Math.pow(1.33f, Math.min(5, m.level()));
|
||||
|
||||
float quantity = m.quantity()-1;
|
||||
quantity += 0.25f + 0.0075f*m.durabilityLeft();
|
||||
|
||||
Reference in New Issue
Block a user