Files
Wizardry/src/main/java/electroblob/wizardry/spell/Heal.java
T
Electroblob77 f37812be3e That's one heck of a commit you've got there...
I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
2019-08-18 00:04:18 +01:00

26 lines
594 B
Java

package electroblob.wizardry.spell;
import electroblob.wizardry.util.SpellModifiers;
import net.minecraft.entity.EntityLivingBase;
public class Heal extends SpellBuff {
public Heal(){
super("heal", 1, 1, 0.3f);
this.soundValues(0.7f, 1.2f, 0.4f);
addProperties(HEALTH);
}
@Override
protected boolean applyEffects(EntityLivingBase caster, SpellModifiers modifiers){
if(caster.getHealth() < caster.getMaxHealth() && caster.getHealth() > 0){
caster.heal(getProperty(HEALTH).floatValue() * modifiers.get(SpellModifiers.POTENCY));
return true;
}
return false;
}
}