You need to sign in or sign up before continuing.
the value of maxabsorb in shield mechanic is not as the same as amount by default(or wrongly get the default value 1)
this.amount = mlc.getPlaceholderFloat(new String[]{"amount", "a"}, 1.0F, new String[0]);
this.maxShield = mlc.getPlaceholderFloat(new String[]{"maxabsorb", "maxshield", "ma", "ms"}, String.valueOf(this.amount), new String[0]);
public SkillResult castAtEntity(SkillMetadata data, AbstractEntity target) {
if (target.isDead()) {
return SkillResult.INVALID_TARGET;
} else {
double absorb = (double)(MythicBukkit.inst().getVolatileCodeHandler().getEntityHandler().getEntityAbsorptionHearts(target) + this.amount.get(data, target));
if (absorb < (double)this.maxShield.get(data, target)) {
MythicBukkit.inst().getVolatileCodeHandler().getEntityHandler().setEntityAbsorptionHearts(target, (float)absorb);
}
return SkillResult.SUCCESS;
}
}
the problem is this.maxShield.get(data, target) get 1(the value of amount by default) if you don't set maxabsorb manually
Edited by Clexus