public static double getNPCMeleeAttack(Npc npc) { double power = 0.640; double amount = 1.670; NpcData npcDef = NpcData.forId(npc.getId()); int combatLevel = 3; if (npcDef == null) //Level 3 if npcDef doesn't exist { power *= (amount * combatLevel) * power; misc.WriteError("Missing npcDef for npcId: " + npc.getId()); } else { combatLevel = NpcData.forId(npc.getId()).getCombat(); power *= (amount * combatLevel) * power; if (npcDef.isBoss()) { power *= 1.2; } } return(power); }
public static double getNPCMeleeDefence(Npc npc) { double power = 0.600; double amount = 0.900; NpcData npcDef = NpcData.forId(npc.getId()); int combatLevel = 3; if (npcDef == null) { //Level 3 if npcDef doesn't exist power *= (amount * combatLevel) * power; misc.WriteError("Missing npcDef for npcId: " + npc.getId()); } else { combatLevel = NpcData.forId(npc.getId()).getCombat(); power *= (amount * combatLevel) * power; if (npcDef.isBoss()) { power *= 1.4; //40% increase. } } return(power); }