public static void Proc(EntModProjectile proj, NPC target, int damage) { int statloss = 0; float basestat = proj.statchance; reproc: float stat = statloss == 0?basestat:(basestat - (100 * statloss)) / (statloss + 1); if (stat >= Main.rand.NextFloat(0, 100)) { int stattype = Entropy.StatTypeCalc(proj.dmgratio); /*if(stattype == 0){ * target.AddBuff(ModContent.BuffType("SlashProc"), 600); * }else if(stattype == 1){ * target.AddBuff(ModContent.BuffType("SlashProc"), 600); * }else if(stattype == 2){ * target.AddBuff(ModContent.BuffType("SlashProc"), 600); * }else{*/ //if(Entropy.dmgtypes[stattype] == "Slash" && !target.HasBuff(ModContent.BuffType(Entropy.dmgtypes[stattype]+"Proc")))target.AddBuff(ModContent.BuffType(Entropy.dmgtypes[stattype]+"Proc"), 1); //Main.NewText(Entropy.dmgtypes[stattype]+"Proc"); //target.AddBuff(ModContent.BuffType(Entropy.dmgtypes[stattype]+"Proc"), (int)(item.item.damage*0.35)); BuffBase buff = BuffBase.GetFromIndex(target, stattype, damage, Main.player[proj.projectile.owner]); EntropyGlobalNPC.AddBuff(buff); //Main.NewText(buff); //Dust.NewDust(target.Center - new Vector2(0,target.height/2),0,0,mod.DustType(Entropy.dmgtypes[stattype]+"ProcDust")); //} } if (proj.reproc && (stat - 100) > 0) { statloss++; goto reproc; } }
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockBack, ref bool crit, ref int hitDirection) { AddBuff(BuffBase.GetFromIndex(target, element, damage, Main.player[projectile.owner])); }