Search in sources :

Example 6 with BuffEffectFrostSlowed

use of am2.buffs.BuffEffectFrostSlowed in project ArsMagica2 by Mithion.

the class FrostDamage method applyEffectEntity.

@Override
public boolean applyEffectEntity(ItemStack stack, World world, EntityLivingBase caster, Entity target) {
    if (!(target instanceof EntityLivingBase))
        return false;
    float baseDamage = 10;
    double damage = SpellUtils.instance.getModifiedDouble_Add(baseDamage, stack, caster, target, world, 0, SpellModifiers.DAMAGE);
    ((EntityLivingBase) target).addPotionEffect(new BuffEffectFrostSlowed(10, SpellUtils.instance.countModifiers(SpellModifiers.BUFF_POWER, stack, 0)));
    return SpellHelper.instance.attackTargetSpecial(stack, target, DamageSources.causeEntityFrostDamage(caster), SpellUtils.instance.modifyDamage(caster, (float) damage));
}
Also used : BuffEffectFrostSlowed(am2.buffs.BuffEffectFrostSlowed) EntityLivingBase(net.minecraft.entity.EntityLivingBase)

Aggregations

EntityLivingBase (net.minecraft.entity.EntityLivingBase)6 BuffEffectFrostSlowed (am2.buffs.BuffEffectFrostSlowed)5 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 PotionEffect (net.minecraft.potion.PotionEffect)2 AMVector3 (am2.api.math.AMVector3)1 ISpellModifier (am2.api.spell.component.interfaces.ISpellModifier)1 AMParticle (am2.particles.AMParticle)1 AffinityData (am2.playerextensions.AffinityData)1 Colour (am2.spell.modifiers.Colour)1 DummyEntityPlayer (am2.utility.DummyEntityPlayer)1 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 Entity (net.minecraft.entity.Entity)1 EntityDragonPart (net.minecraft.entity.boss.EntityDragonPart)1 EntityLightningBolt (net.minecraft.entity.effect.EntityLightningBolt)1 EntityEnderman (net.minecraft.entity.monster.EntityEnderman)1