Search in sources :

Example 11 with CombatDamageSource

use of jackiecrazy.wardance.api.CombatDamageSource in project WarDance by Jackiecrazy.

the class Feint method spiritBomb.

@SubscribeEvent()
public static void spiritBomb(LivingHurtEvent e) {
    LivingEntity uke = e.getEntityLiving();
    Marks.getCap(uke).getActiveMark(WarSkills.SPIRIT_RESONANCE.get()).ifPresent((a) -> {
        if (a.isCondition() && e.getSource() instanceof CombatDamageSource && ((CombatDamageSource) e.getSource()).canProcSkillEffects()) {
            e.setAmount(e.getAmount() + 2);
        }
        a.flagCondition(false);
    });
}
Also used : LivingEntity(net.minecraft.entity.LivingEntity) CombatDamageSource(jackiecrazy.wardance.api.CombatDamageSource) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

CombatDamageSource (jackiecrazy.wardance.api.CombatDamageSource)11 LivingEntity (net.minecraft.entity.LivingEntity)8 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)5 ICombatCapability (jackiecrazy.wardance.capability.resources.ICombatCapability)3 PlayerEntity (net.minecraft.entity.player.PlayerEntity)3 ServerWorld (net.minecraft.world.server.ServerWorld)3 StealthUtils (jackiecrazy.wardance.utils.StealthUtils)2 ItemStack (net.minecraft.item.ItemStack)2 ISkillCapability (jackiecrazy.wardance.capability.skill.ISkillCapability)1 ICombatItemCapability (jackiecrazy.wardance.capability.weaponry.ICombatItemCapability)1 ParryEvent (jackiecrazy.wardance.event.ParryEvent)1 ProjectileParryEvent (jackiecrazy.wardance.event.ProjectileParryEvent)1 SkillData (jackiecrazy.wardance.skill.SkillData)1 CombatUtils (jackiecrazy.wardance.utils.CombatUtils)1 Entity (net.minecraft.entity.Entity)1 AttributeModifier (net.minecraft.entity.ai.attributes.AttributeModifier)1 LightningBoltEntity (net.minecraft.entity.effect.LightningBoltEntity)1 DamageSource (net.minecraft.util.DamageSource)1 Redirect (org.spongepowered.asm.mixin.injection.Redirect)1