Adjust shield sizes to account for increasing levels and placed vs on-person

This commit is contained in:
Sollace 2022-09-16 22:14:24 +02:00
parent 0250d8875a
commit 4fde8400c5

View file

@ -118,11 +118,9 @@ public class ShieldSpell extends AbstractSpell {
*/ */
public double getDrawDropOffRange(Caster<?> source) { public double getDrawDropOffRange(Caster<?> source) {
float multiplier = source instanceof Pony pony && pony.getMaster().isSneaking() ? 1 : 2; float multiplier = source instanceof Pony pony && pony.getMaster().isSneaking() ? 1 : 2;
float min = 4 + getTraits().get(Trait.POWER); float min = (source instanceof Pony ? 4 : 6) + getTraits().get(Trait.POWER);
double range = (min + (source.getLevel().getScaled(4) * 2)) / multiplier; double range = (min + (source.getLevel().getScaled(source instanceof Pony ? 4 : 40) * (source instanceof Pony ? 2 : 10))) / multiplier;
if (source instanceof Pony && range >= 4) {
range = Math.sqrt(range);
}
return range; return range;
} }