v3.2.0: fixed thrown wep value logic
This commit is contained in:
@@ -631,7 +631,20 @@ abstract public class MissileWeapon extends Weapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int value() {
|
public int value() {
|
||||||
return 6 * tier * quantity * (level() + 1);
|
int price = 5 * tier * quantity;
|
||||||
|
if (hasGoodEnchant()) {
|
||||||
|
price *= 1.5;
|
||||||
|
}
|
||||||
|
if (cursedKnown && (cursed || hasCurseEnchant())) {
|
||||||
|
price /= 2;
|
||||||
|
}
|
||||||
|
if (levelKnown && level() > 0) {
|
||||||
|
price *= (level() + 1);
|
||||||
|
}
|
||||||
|
if (price < 1) {
|
||||||
|
price = 1;
|
||||||
|
}
|
||||||
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String SET_ID = "set_id";
|
private static final String SET_ID = "set_id";
|
||||||
|
|||||||
@@ -40,6 +40,6 @@ public class ThrowingStone extends MissileWeapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int value() {
|
public int value() {
|
||||||
return super.value()/2; //half normal value
|
return Math.round(super.value()/2f); //half normal value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ public class Dart extends MissileWeapon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int value() {
|
public int value() {
|
||||||
return super.value()/2; //half normal value
|
return Math.round(super.value()/2f); //half normal value
|
||||||
}
|
}
|
||||||
|
|
||||||
private final WndBag.ItemSelector itemSelector = new WndBag.ItemSelector() {
|
private final WndBag.ItemSelector itemSelector = new WndBag.ItemSelector() {
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public abstract class TippedDart extends Dart {
|
|||||||
@Override
|
@Override
|
||||||
public int value() {
|
public int value() {
|
||||||
//value of regular dart plus half of the seed
|
//value of regular dart plus half of the seed
|
||||||
return 8 * quantity;
|
return Math.round(7.5f * quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final LinkedHashMap<Class<?extends Plant.Seed>, Class<?extends TippedDart>> types = new LinkedHashMap<>();
|
public static final LinkedHashMap<Class<?extends Plant.Seed>, Class<?extends TippedDart>> types = new LinkedHashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user