public static void Proc(EntModItem item, NPC target, int damage) { int statloss = 0; float basestat = item.realstat; reproc: float stat = statloss == 0?basestat:(basestat - (100 * statloss)) / (statloss + 1); if (stat >= Main.rand.NextFloat(0, 100)) { int stattype = Entropy.StatTypeCalc(item.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[item.item.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 (item.reproc && (stat - 100) > 0) { statloss++; goto reproc; } }
public override void ModifyHitItem(Player attacker, EntModItem item, NPC target, ref int damage, ref bool crit, ref float[] dr) { item.addElement(type, amount); if (crit) { AddBuff(BuffBase.GetFromIndex(target, type, damage / 3, attacker)); } }
static bool canUseCheck(Item it, Item item) { if (it.IsAir) { return(true); } EntModItemMod mit = it?.modItem as EntModItemMod; EntModItem mitem = item?.modItem as EntModItem; return(mit.CanApply(mitem)); }
public float comboget() { EntModItem emi = player.HeldItem.modItem as EntModItem; float ch = 5; float cd = 0.5f; if (emi != null) { ch = emi.combohits; cd = emi.comboDMG; } return(EntModItem.comboMult(combocounter, ch, cd)); }
public float comboget(float ch, float cd) { return(EntModItem.comboMult(combocounter, ch, cd)); }
public virtual void ModifyHitItem(Player attacker, EntModItem item, NPC target, ref int damage, ref bool crit, ref float[] dr) { }