using System.Collections.Generic; using ACE.Common; using ACE.Server.Factories.Entity; using ACE.Server.Factories.Enum; namespace ACE.Server.Factories.Tables.Wcids { public static class FinesseWeaponWcids { // hammers? private static ChanceTable Hatchets = new ChanceTable() { // finesse - axe ( WeenieClassName.axehatchet, 0.40f ), ( WeenieClassName.axehatchetacid, 0.15f ), ( WeenieClassName.axehatchetelectric, 0.15f ), ( WeenieClassName.axehatchetfire, 0.15f ), ( WeenieClassName.axehatchetfrost, 0.15f ), }; private static ChanceTable Shouonos = new ChanceTable() { // finesse - axe ( WeenieClassName.shouono, 0.40f ), ( WeenieClassName.shouonoacid, 0.15f ), ( WeenieClassName.shouonoelectric, 0.15f ), ( WeenieClassName.shouonofire, 0.15f ), ( WeenieClassName.shouonofrost, 0.15f ), }; private static ChanceTable Tungis = new ChanceTable() { // finesse - axe ( WeenieClassName.tungi, 0.40f ), ( WeenieClassName.tungiacid, 0.15f ), ( WeenieClassName.tungielectric, 0.15f ), ( WeenieClassName.tungifire, 0.15f ), ( WeenieClassName.tungifrost, 0.15f ), }; private static ChanceTable Knives = new ChanceTable() { // finesse - dagger (multi-strike) ( WeenieClassName.knife, 0.40f ), ( WeenieClassName.knifeacid, 0.15f ), ( WeenieClassName.knifeelectric, 0.15f ), ( WeenieClassName.knifefire, 0.15f ), ( WeenieClassName.knifefrost, 0.15f ), }; private static ChanceTable Lancets = new ChanceTable() { // finesse - dagger (multi-strike) ( WeenieClassName.ace31794_lancet, 0.40f ), ( WeenieClassName.ace31795_acidlancet, 0.15f ), ( WeenieClassName.ace31796_lightninglancet, 0.15f ), ( WeenieClassName.ace31797_flaminglancet, 0.15f ), ( WeenieClassName.ace31793_frostlancet, 0.15f ), }; private static ChanceTable Poniards = new ChanceTable() { // finesse - dagger ( WeenieClassName.daggerponiard, 0.40f ), ( WeenieClassName.daggerponiardacid, 0.15f ), ( WeenieClassName.daggerponiardelectric, 0.15f ), ( WeenieClassName.daggerponiardfire, 0.15f ), ( WeenieClassName.daggerponiardfrost, 0.15f ), }; private static ChanceTable BoardsWithNails = new ChanceTable() { // finesse - mace ( WeenieClassName.ace31774_boardwithnail, 0.40f ), ( WeenieClassName.ace31775_acidboardwithnail, 0.15f ), ( WeenieClassName.ace31776_electricboardwithnail, 0.15f ), ( WeenieClassName.ace31777_fireboardwithnail, 0.15f ), ( WeenieClassName.ace31773_frostboardwithnail, 0.15f ), }; private static ChanceTable Dabus = new ChanceTable() { // finesse - mace ( WeenieClassName.dabus, 0.40f ), ( WeenieClassName.dabusacid, 0.15f ), ( WeenieClassName.dabuselectric, 0.15f ), ( WeenieClassName.dabusfire, 0.15f ), ( WeenieClassName.dabusfrost, 0.15f ), }; private static ChanceTable Jittes = new ChanceTable() { // finesse - mace ( WeenieClassName.jitte, 0.40f ), ( WeenieClassName.jitteacid, 0.15f ), ( WeenieClassName.jitteelectric, 0.15f ), ( WeenieClassName.jittefire, 0.15f ), ( WeenieClassName.jittefrost, 0.15f ), }; private static ChanceTable Tofuns = new ChanceTable() { // finesse - mace ( WeenieClassName.tofun, 0.40f ), ( WeenieClassName.tofunacid, 0.15f ), ( WeenieClassName.tofunelectric, 0.15f ), ( WeenieClassName.tofunfire, 0.15f ), ( WeenieClassName.tofunfrost, 0.15f ), }; private static ChanceTable Budiaqs = new ChanceTable() { // finesse - spear ( WeenieClassName.budiaq, 0.40f ), ( WeenieClassName.budiaqacid, 0.15f ), ( WeenieClassName.budiaqelectric, 0.15f ), ( WeenieClassName.budiaqfire, 0.15f ), ( WeenieClassName.budiaqfrost, 0.15f ), }; private static ChanceTable Naginatas = new ChanceTable() { // finesse - spear ( WeenieClassName.swordstaff, 0.40f ), ( WeenieClassName.swordstaffacid, 0.15f ), ( WeenieClassName.swordstaffelectric, 0.15f ), ( WeenieClassName.swordstafffire, 0.15f ), ( WeenieClassName.swordstafffrost, 0.15f ), }; private static ChanceTable Bastones = new ChanceTable() { // finesse - staff ( WeenieClassName.staffmeleebastone, 0.40f ), ( WeenieClassName.staffmeleebastoneacid, 0.15f ), ( WeenieClassName.staffmeleebastoneelectric, 0.15f ), ( WeenieClassName.staffmeleebastonefire, 0.15f ), ( WeenieClassName.staffmeleebastonefrost, 0.15f ), }; private static ChanceTable Jos = new ChanceTable() { // finesse - staff ( WeenieClassName.jonew, 0.40f ), ( WeenieClassName.joacidnew, 0.15f ), ( WeenieClassName.joelectricnew, 0.15f ), ( WeenieClassName.jofirenew, 0.15f ), ( WeenieClassName.jofrostnew, 0.15f ), }; private static ChanceTable Sabras = new ChanceTable() { // finesse - sword ( WeenieClassName.swordsabra, 0.40f ), ( WeenieClassName.swordsabraacid, 0.15f ), ( WeenieClassName.swordsabraelectric, 0.15f ), ( WeenieClassName.swordsabrafire, 0.15f ), ( WeenieClassName.swordsabrafrost, 0.15f ), }; private static ChanceTable Scimitars = new ChanceTable() { // finesse - sword ( WeenieClassName.scimitar, 0.40f ), ( WeenieClassName.scimitaracid, 0.15f ), ( WeenieClassName.scimitarelectric, 0.15f ), ( WeenieClassName.scimitarfire, 0.15f ), ( WeenieClassName.scimitarfrost, 0.15f ), }; private static ChanceTable ShortSwords = new ChanceTable() { // finesse - sword ( WeenieClassName.swordshort, 0.40f ), ( WeenieClassName.swordshortacid, 0.15f ), ( WeenieClassName.swordshortelectric, 0.15f ), ( WeenieClassName.swordshortfire, 0.15f ), ( WeenieClassName.swordshortfrost, 0.15f ), }; private static ChanceTable Simis = new ChanceTable() { // finesse - sword ( WeenieClassName.simi, 0.40f ), ( WeenieClassName.simiacid, 0.15f ), ( WeenieClassName.simielectric, 0.15f ), ( WeenieClassName.simifire, 0.15f ), ( WeenieClassName.simifrost, 0.15f ), }; private static ChanceTable Rapiers = new ChanceTable() { // finesse - sword (multi-strike) ( WeenieClassName.swordrapier, 0.40f ), ( WeenieClassName.ace45104_acidrapier, 0.15f ), ( WeenieClassName.ace45105_lightningrapier, 0.15f ), ( WeenieClassName.ace45106_flamingrapier, 0.15f ), ( WeenieClassName.ace45107_frostrapier, 0.15f ), }; private static ChanceTable Yaojis = new ChanceTable() { // finesse - sword ( WeenieClassName.yaoji, 0.40f ), ( WeenieClassName.yaojiacid, 0.15f ), ( WeenieClassName.yaojielectric, 0.15f ), ( WeenieClassName.yaojifire, 0.15f ), ( WeenieClassName.yaojifrost, 0.15f ), }; private static ChanceTable Claws = new ChanceTable() { // finesse - unarmed ( WeenieClassName.ace31784_claw, 0.40f ), ( WeenieClassName.ace31785_acidclaw, 0.15f ), ( WeenieClassName.ace31786_lightningclaw, 0.15f ), ( WeenieClassName.ace31787_flamingclaw, 0.15f ), ( WeenieClassName.ace31783_frostclaw, 0.15f ), }; private static ChanceTable HandWraps = new ChanceTable() { // finesse - unarmed ( WeenieClassName.ace45118_handwraps, 0.40f ), ( WeenieClassName.ace45119_acidhandwraps, 0.15f ), ( WeenieClassName.ace45120_lightninghandwraps, 0.15f ), ( WeenieClassName.ace45121_flaminghandwraps, 0.15f ), ( WeenieClassName.ace45122_frosthandwraps, 0.15f ), }; private static readonly List<(ChanceTable table, TreasureWeaponType weaponType)> finesseWeaponsTables = new List<(ChanceTable, TreasureWeaponType)>() { ( Hatchets, TreasureWeaponType.Axe ), ( Shouonos, TreasureWeaponType.Axe ), ( Tungis, TreasureWeaponType.Axe ), ( Knives, TreasureWeaponType.DaggerMS ), ( Lancets, TreasureWeaponType.DaggerMS ), ( Poniards, TreasureWeaponType.Dagger ), ( BoardsWithNails, TreasureWeaponType.Mace ), ( Dabus, TreasureWeaponType.Mace ), ( Jittes, TreasureWeaponType.MaceJitte ), ( Tofuns, TreasureWeaponType.Mace ), ( Budiaqs, TreasureWeaponType.Spear ), ( Naginatas, TreasureWeaponType.Spear ), ( Bastones, TreasureWeaponType.Staff ), ( Jos, TreasureWeaponType.Staff ), ( Sabras, TreasureWeaponType.Sword ), ( Scimitars, TreasureWeaponType.Sword ), ( ShortSwords, TreasureWeaponType.Sword ), ( Simis, TreasureWeaponType.Sword ), ( Rapiers, TreasureWeaponType.SwordMS ), ( Yaojis, TreasureWeaponType.Sword ), ( Claws, TreasureWeaponType.Unarmed ), ( HandWraps, TreasureWeaponType.Unarmed ), }; public static WeenieClassName Roll(out TreasureWeaponType weaponType) { // even chance of selecting each weapon table var weaponTable = finesseWeaponsTables[ThreadSafeRandom.Next(0, finesseWeaponsTables.Count - 1)]; weaponType = weaponTable.weaponType; return weaponTable.table.Roll(); } private static readonly Dictionary _combined = new Dictionary(); static FinesseWeaponWcids() { foreach (var finesseWeaponsTable in finesseWeaponsTables) { foreach (var wcid in finesseWeaponsTable.table) _combined.TryAdd(wcid.result, finesseWeaponsTable.weaponType); } } public static bool TryGetValue(WeenieClassName wcid, out TreasureWeaponType weaponType) { return _combined.TryGetValue(wcid, out weaponType); } } }