123456789101112131415161718192021222324252627282930 |
- package me.km.effects.active;
- import me.km.api.Utils;
- import me.km.effects.ActiveEffectBase;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.player.EntityPlayerMP;
- import net.minecraft.init.MobEffects;
- import net.minecraft.potion.PotionEffect;
- public class Cripple extends ActiveEffectBase
- {
- @Override
- protected boolean executeEffect(EntityPlayerMP p, int power)
- {
- EntityLivingBase liv = Utils.getTargetedEntity(p, 4, EntityLivingBase.class);
- if(liv == null)
- {
- return false;
- }
- liv.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, power * 20, 2));
- liv.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, power * 20, 1));
- return true;
- }
- @Override
- protected int getManaCost(int manaFactor)
- {
- return 1;
- }
- }
|