Skip to content

Commit

Permalink
4eyebiped lootgen updates ACEmulator#2
Browse files Browse the repository at this point in the history
  • Loading branch information
gmriggs committed Aug 23, 2020
1 parent 6e5dbde commit 157fa73
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 102 deletions.
33 changes: 17 additions & 16 deletions Source/ACE.Server/Factories/LootGenerationFactory_Melee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ public static WorldObject CreateMeleeWeapon(TreasureDeath profile, bool isMagica
// 1 = Light
// 2 = Finesse
// default = Two Handed
switch (weaponType)
switch (weaponType)
{
case 0:
// Heavy Weapons
subtype = ThreadSafeRandom.Next(0, 22);
subtype = ThreadSafeRandom.Next(0, LootTables.HeavyWeaponsMatrix.Length - 1);
weaponWeenie = LootTables.HeavyWeaponsMatrix[subtype][eleType];
break;
case 1:
// Light Weapons
subtype = ThreadSafeRandom.Next(0, 19);
subtype = ThreadSafeRandom.Next(0, LootTables.LightWeaponsMatrix.Length - 1);
weaponWeenie = LootTables.LightWeaponsMatrix[subtype][eleType];
break;
case 2:
// Finesse Weapons;
subtype = ThreadSafeRandom.Next(0, 22);
subtype = ThreadSafeRandom.Next(0, LootTables.FinesseWeaponsMatrix.Length - 1);
weaponWeenie = LootTables.FinesseWeaponsMatrix[subtype][eleType];
break;
default:
// Two handed
subtype = ThreadSafeRandom.Next(0, 11);
subtype = ThreadSafeRandom.Next(0, LootTables.TwoHandedWeaponsMatrix.Length - 1);
weaponWeenie = LootTables.TwoHandedWeaponsMatrix[subtype][eleType];
break;
}
Expand Down Expand Up @@ -282,6 +282,7 @@ private static void MutateMeleeWeapon(WorldObject wo, TreasureDeath profile, boo
{
weaponDefense = GetMaxDamageMod(profile.Tier, 25);
weaponOffense = GetMaxDamageMod(profile.Tier, 15);
damage = GetMeleeMaxDamage(wieldSkillType, wieldDiff, LootWeaponType.Jitte);
damageVariance = GetVariance(wieldSkillType, LootWeaponType.Jitte);
}
break;
Expand Down Expand Up @@ -420,19 +421,19 @@ private static void MutateMeleeWeapon(WorldObject wo, TreasureDeath profile, boo

private enum LootWeaponType
{
Axe,
Dagger,
DaggerMulti,
Mace,
Spear,
Sword,
SwordMulti,
Staff,
UA,
Jitte,
Axe = 0,
Dagger = 1,
DaggerMulti = 2,
Mace = 3,
Spear = 4,
Sword = 5,
SwordMulti = 6,
Staff = 7,
UA = 8,
Jitte = 9,
TwoHanded = 0,
Cleaving = 0,
Spears,
Spears = 1,
}

// The percentages for variances need to be fixed
Expand Down
174 changes: 88 additions & 86 deletions Source/ACE.Server/Factories/LootTables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,43 +158,43 @@ public static double getGemMaterialValueModifier(WorldObject wo)
};

public static readonly int[][] SummoningEssencesMatrix =
{
new int[] { 48942, 48944, 48945, 48946, 48947, 48948, 48956 },
new int[] { 49213, 49214, 49215, 49216, 49217, 49218, 49219 },
new int[] { 49220, 49221, 49222, 49223, 49224, 49225, 49226 },
new int[] { 49227, 49228, 49229, 49230, 49231, 49232, 49212 },
new int[] { 48972, 49234, 49235, 49236, 49237, 49238, 49239 },
new int[] { 49240, 49241, 49242, 49243, 49244, 49245, 49246 },
new int[] { 49247, 49248, 49249, 49250, 49251, 49252, 49253 },
new int[] { 49254, 49255, 49256, 49257, 49258, 49259, 49233 },
new int[] { 49421, 49422, 49423, 49424, 49425, 49426, 49427 },
new int[] { 49428, 49429, 49430, 49431, 49432, 49433, 49434 },
new int[] { 49435, 49436, 49437, 49438, 49439, 49440, 49441 },
new int[] { 49442, 49443, 49444, 49445, 49446, 49447, 49448 },
new int[] { 48959, 48961, 48963, 48965, 48967, 48969, 48957 },
new int[] { 49261, 49262, 49263, 49264, 49265, 49266, 49267 },
new int[] { 49268, 49269, 49270, 49271, 49272, 49273, 49274 },
new int[] { 49275, 49276, 49277, 49278, 49279, 49280, 49260 },
new int[] { 49282, 49283, 49284, 49285, 49286, 49287, 49281 },
new int[] { 49289, 49290, 49291, 49292, 49293, 49294, 49288 },
new int[] { 49296, 49297, 49298, 49299, 49300, 49301, 49295 },
new int[] { 49303, 49304, 49305, 49306, 49307, 49308, 49302 },
new int[] { 49310, 49311, 49312, 49313, 49314, 49315, 49316 },
new int[] { 49317, 49318, 49319, 49320, 49321, 49322, 49323 },
new int[] { 49324, 49325, 49326, 49327, 49328, 49329, 49330 },
new int[] { 49331, 49332, 49333, 49334, 49335, 49336, 49309 },
new int[] { 49338, 49339, 49340, 49341, 49342, 49343, 49344 },
new int[] { 49345, 49346, 49347, 49348, 49349, 49350, 49351 },
new int[] { 49352, 49353, 49354, 49355, 49356, 49357, 49358 },
new int[] { 49359, 49360, 49361, 49362, 49363, 49364, 49337 },
new int[] { 49366, 49367, 49368, 49369, 49370, 49371, 49372 },
new int[] { 49373, 49374, 49375, 49376, 49377, 49378, 49379 },
new int[] { 49380, 49381, 49382, 49383, 49384, 49385, 49386 },
new int[] { 49387, 49388, 49389, 49390, 49391, 49392, 49365 },
new int[] { 49524, 49525, 49526, 49527, 49528, 49529, 49530 },
new int[] { 49531, 49532, 49533, 49534, 49535, 49536, 49537 },
new int[] { 49538, 49539, 49540, 49541, 49542, 49543, 49544 },
new int[] { 49545, 49546, 49547, 49548, 49549, 49550, 49551 }
{ // 50| 80| 100| 125| 150| 180| 200
new int[] { 48942, 48944, 48945, 48946, 48947, 48948, 48956 }, // 0 - Fire Skeleton
new int[] { 49213, 49214, 49215, 49216, 49217, 49218, 49219 }, // 1 - Acid Skeleton
new int[] { 49220, 49221, 49222, 49223, 49224, 49225, 49226 }, // 2 - Lightning Skeleton
new int[] { 49227, 49228, 49229, 49230, 49231, 49232, 49212 }, // 3 - Frost Skeleton
new int[] { 48972, 49234, 49235, 49236, 49237, 49238, 49239 }, // 4 - Acid Zombie
new int[] { 49240, 49241, 49242, 49243, 49244, 49245, 49246 }, // 5 - Lighting Zombie
new int[] { 49247, 49248, 49249, 49250, 49251, 49252, 49253 }, // 6 - Fire Zombie
new int[] { 49254, 49255, 49256, 49257, 49258, 49259, 49233 }, // 7 - Frost Zombie
new int[] { 49421, 49422, 49423, 49424, 49425, 49426, 49427 }, // 8 - Acid Maiden
new int[] { 49428, 49429, 49430, 49431, 49432, 49433, 49434 }, // 9 - Lightning Maiden
new int[] { 49435, 49436, 49437, 49438, 49439, 49440, 49441 }, // 10 - Fire Maiden
new int[] { 49442, 49443, 49444, 49445, 49446, 49447, 49448 }, // 11 - Frost Maiden
new int[] { 48959, 48961, 48963, 48965, 48967, 48969, 48957 }, // 12 - Incendiary Knight
new int[] { 49261, 49262, 49263, 49264, 49265, 49266, 49267 }, // 13 - Caustic Knight
new int[] { 49268, 49269, 49270, 49271, 49272, 49273, 49274 }, // 14 - Galvanic Knight
new int[] { 49275, 49276, 49277, 49278, 49279, 49280, 49260 }, // 15 - Glacial Knight
new int[] { 49282, 49283, 49284, 49285, 49286, 49287, 49281 }, // 16 - K'nath R'ajed
new int[] { 49289, 49290, 49291, 49292, 49293, 49294, 49288 }, // 17 - K'nath Y'nda
new int[] { 49296, 49297, 49298, 49299, 49300, 49301, 49295 }, // 18 - K'nath T'soct
new int[] { 49303, 49304, 49305, 49306, 49307, 49308, 49302 }, // 19 - K'nath B'orret
new int[] { 49310, 49311, 49312, 49313, 49314, 49315, 49316 }, // 20 - Corrosion Wisp
new int[] { 49317, 49318, 49319, 49320, 49321, 49322, 49323 }, // 21 - Voltiac Wisp
new int[] { 49324, 49325, 49326, 49327, 49328, 49329, 49330 }, // 22 - Incendiary Wisp
new int[] { 49331, 49332, 49333, 49334, 49335, 49336, 49309 }, // 23 - Blizzard Wisp
new int[] { 49338, 49339, 49340, 49341, 49342, 49343, 49344 }, // 24 - Blistering Moar
new int[] { 49345, 49346, 49347, 49348, 49349, 49350, 49351 }, // 25 - Electrified Moar
new int[] { 49352, 49353, 49354, 49355, 49356, 49357, 49358 }, // 26 - Volcanic Moar
new int[] { 49359, 49360, 49361, 49362, 49363, 49364, 49337 }, // 27 - Freezing Moar
new int[] { 49366, 49367, 49368, 49369, 49370, 49371, 49372 }, // 28 - Caustic Grievver
new int[] { 49373, 49374, 49375, 49376, 49377, 49378, 49379 }, // 29 - Excited Grievver
new int[] { 49380, 49381, 49382, 49383, 49384, 49385, 49386 }, // 30 - Scorched Grievver
new int[] { 49387, 49388, 49389, 49390, 49391, 49392, 49365 }, // 31 - Arctic Grievver
new int[] { 49524, 49525, 49526, 49527, 49528, 49529, 49530 }, // 32 - Acid Phyntos Swarm
new int[] { 49531, 49532, 49533, 49534, 49535, 49536, 49537 }, // 33 - Fire Phyntos Swarm
new int[] { 49538, 49539, 49540, 49541, 49542, 49543, 49544 }, // 34 - Frost Phyntos Swarm
new int[] { 49545, 49546, 49547, 49548, 49549, 49550, 49551 } // 35 - Lightning Phyntos Swarm
};

public static readonly int[][] HeavyWeaponsMatrix =
Expand Down Expand Up @@ -222,7 +222,7 @@ public static double getGemMaterialValueModifier(WorldObject wo)
new int[] { 354, 3893, 3894, 3895, 3896 }, // 20 - Takuba
new int[] { 45108, 45109, 45110, 45111, 45112 }, // 21 - Schlager (MS)
new int[] { 4190, 4194, 4192, 4193, 4194 }, // 22 - Cestus
new int[] { 4195, 4196, 4197, 4198, 4199 }, // 23 - Nekode
new int[] { 4195, 4196, 4197, 4198, 4199 } // 23 - Nekode
};

public static readonly int[][] LightWeaponsMatrix =
Expand Down Expand Up @@ -309,66 +309,67 @@ public static double getGemMaterialValueModifier(WorldObject wo)

public static readonly int[,] HeavyWeaponDamageTable =
{ // 0|250|300|325|350|370|400|420|430
{ 26, 33, 40, 47, 54, 61, 68, 71, 74 }, // Axe
{ 24, 31, 38, 45, 51, 58, 65, 68, 71 }, // Dagger
{ 13, 16, 20, 23, 26, 30, 33, 36, 38 }, // MultiDagger
{ 22, 29, 36, 43, 49, 56, 63, 66, 69 }, // Mace
{ 25, 32, 39, 46, 52, 59, 66, 69, 72 }, // Spear
{ 24, 31, 38, 45, 51, 58, 65, 68, 71 }, // Sword
{ 12, 16, 19, 23, 26, 30, 33, 36, 38 }, // MultiSword
{ 23, 30, 36, 43, 50, 56, 63, 66, 70 }, // Staff
{ 20, 26, 31, 37, 43, 48, 54, 56, 59 } // UA
{ 26, 40, 43, 48, 53, 58, 68, 71, 74 }, // 0 - Axe
{ 24, 35, 40, 46, 51, 56, 65, 68, 71 }, // 1 - Dagger
{ 13, 17, 20, 23, 26, 28, 33, 36, 38 }, // 2 - MultiDagger
{ 22, 33, 38, 44, 49, 54, 63, 66, 69 }, // 3 - Mace
{ 25, 36, 41, 47, 51, 56, 66, 69, 72 }, // 4 - Spear
{ 24, 35, 40, 46, 51, 56, 65, 68, 71 }, // 5 - Sword
{ 12, 17, 20, 23, 26, 28, 33, 36, 38 }, // 6 - MultiSword
{ 23, 34, 39, 45, 49, 54, 64, 66, 69 }, // 7 - Staff
{ 20, 29, 33, 36, 42, 47, 54, 56, 59 } // 8 - UA
};

public static readonly int[,] LightWeaponDamageTable =
{ // 0|250|300|325|350|370|400|420|430
{ 22, 28, 33, 39, 44, 50, 55, 58, 61 }, // Axe
{ 18, 24, 29, 35, 40, 46, 51, 54, 58 }, // Dagger
{ 7, 10, 13, 16, 18, 21, 24, 27, 28 }, // MultiDagger
{ 19, 24, 29, 35, 40, 45, 50, 53, 57 }, // Mace
{ 21, 26, 32, 37, 43, 48, 53, 56, 60 }, // Spear
{ 20, 25, 31, 36, 41, 47, 52, 55, 58 }, // Sword
{ 7, 10, 13, 16, 18, 21, 24, 25, 28 }, // MultiSword
{ 19, 24, 30, 35, 40, 46, 51, 54, 57 }, // Staff
{ 17, 22, 26, 31, 35, 40, 44, 46, 48 } // UA
{ 22, 31, 35, 40, 43, 47, 55, 58, 61 }, // 0 - Axe
{ 20, 29, 33, 38, 41, 45, 52, 55, 58 }, // 1 - Dagger
{ 9, 11, 13, 16, 18, 20, 24, 25, 28 }, // 2 - MultiDagger
{ 19, 27, 31, 36, 39, 43, 50, 53, 56 }, // 3 - Mace
{ 21, 30, 34, 37, 43, 47, 54, 57, 60 }, // 4 - Spear
{ 20, 29, 33, 38, 41, 45, 52, 55, 58 }, // 5 - Sword
{ 9, 11, 13, 16, 18, 20, 24, 25, 28 }, // 6 - MultiSword
{ 19, 28, 32, 36, 40, 44, 51, 54, 57 }, // 7 - Staff
{ 17, 23, 27, 31, 34, 37, 44, 46, 48 }, // 8 - UA
{ 19, 28, 32, 36, 40, 44, 51, 54, 57 } // 9 - Jitte
};

public static readonly int[,] TwoHandedWeaponDamageTable =
{ // 0|250|300|325|350|370|400|420|430
{ 13, 17, 22, 26, 30, 35, 39, 42, 45 }, // Cleaving
{ 14, 19, 23, 28, 33, 37, 42, 45, 48 } // Spears
{ 13, 20, 23, 27, 30, 33, 39, 42, 45 }, // 0 - Cleaving
{ 15, 21, 25, 29, 32, 36, 42, 45, 48 } // 1 - Spears
};

public static readonly int[][] CasterWeaponsMatrix =
{
new int[] { 2366, 2548, 2547, 2472 }, // Orb, Sceptre, Staff, Wand
new int[] { 29265, 29264, 29260, 29263, 29262, 29259, 29261, 43381 }, // Sceptre: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
new int[] { 31819, 31825, 31821, 31824, 31823, 31820, 31822, 43382 }, // Baton: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
new int[] { 37223, 37222, 37225, 37221, 37220, 37224, 37219, 43383 } // Staff: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
new int[] { 2366, 2548, 2547, 2472 }, // 0 - Orb, Sceptre, Staff, Wand
new int[] { 29265, 29264, 29260, 29263, 29262, 29259, 29261, 43381 }, // 1 - Sceptre: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
new int[] { 31819, 31825, 31821, 31824, 31823, 31820, 31822, 43382 }, // 2 - Baton: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
new int[] { 37223, 37222, 37225, 37221, 37220, 37224, 37219, 43383 } // 3 - Staff: Slashing, Piercing, Blunt, Frost, Fire, Acid, Electric, Nether
};

public static readonly float[][] MissileDamageMod =
{
new float[] { 2.1f, 2.1f, 2.2f, 2.3f, 2.4f, 2.4f, 2.4f, 2.4f, 2.4f }, // Bow
new float[] { 2.4f, 2.4f, 2.5f, 2.55f, 2.65f, 2.65f, 2.65f, 2.65f, 2.65f }, // Crossbow
new float[] { 2.3f, 2.3f, 2.4f, 2.5f, 2.6f, 2.6f, 2.6f, 2.6f, 2.6f } // Thrown
{ // 0| 250| 270| 290| 315| 335| 360| 375| 385|
new float[] { 2.1f, 2.2f, 2.3f, 2.4f, 2.4f, 2.4f, 2.4f, 2.4f, 2.4f }, // Bow
new float[] { 2.4f, 2.5f, 2.55f, 2.65f, 2.65f, 2.65f, 2.65f, 2.65f, 2.65f }, // Crossbow
new float[] { 2.3f, 2.4f, 2.5f, 2.6f, 2.6f, 2.6f, 2.6f, 2.6f, 2.6f } // Thrown
};

public static readonly int[][] NonElementalMissileWeaponsMatrix =
{
new int[] { 306, 363, 334, 307, 341, 30625, 360 }, // Longbow, Yumi, Nayin, Shortbow, Shouyumi, War Bow, Yag
new int[] { 30616, 311, 312 }, // Arbalest, Heavy Crossbow, Light Crossbow
new int[] { 12463, 20640 } // Atlatl, Royal Atlatl
new int[] { 306, 363, 334, 307, 341, 30625, 360 }, // 0 - Longbow, Yumi, Nayin, Shortbow, Shouyumi, War Bow, Yag
new int[] { 30616, 311, 312 }, // 1 - Arbalest, Heavy Crossbow, Light Crossbow
new int[] { 12463, 20640 } // 2 - Atlatl, Royal Atlatl
};

public static readonly int[][] ElementalMissileWeaponsMatrix =
{
new int[] { 29244, 29239, 29243, 29241, 29242, 29238, 29240 },
new int[] { 29251, 29246, 29250, 29248, 29249, 29245, 29247 },
new int[] { 29258, 29253, 29257, 29255, 29256, 29252, 29254 },
new int[] { 31812, 31814, 31818, 31816, 31817, 31813, 31815 },
new int[] { 31798, 31800, 31804, 31802, 31803, 31799, 31801 },
new int[] { 31805, 31807, 31811, 31809, 31810, 31806, 31808 }
new int[] { 29244, 29239, 29243, 29241, 29242, 29238, 29240 }, // 0 - Bow
new int[] { 29251, 29246, 29250, 29248, 29249, 29245, 29247 }, // 1 - Crossbow
new int[] { 29258, 29253, 29257, 29255, 29256, 29252, 29254 }, // 2 - Atlatl
new int[] { 31812, 31814, 31818, 31816, 31817, 31813, 31815 }, // 3 - Slingshot
new int[] { 31798, 31800, 31804, 31802, 31803, 31799, 31801 }, // 4 - Compound Bow
new int[] { 31805, 31807, 31811, 31809, 31810, 31806, 31808 } // 5 - Compound Crossbow
};

public static readonly List<int[][]> MissileWeaponsMatrices = new List<int[][]>()
Expand Down Expand Up @@ -1236,17 +1237,18 @@ public static double getGemMaterialValueModifier(WorldObject wo)

public static readonly int[][] WandSpells =
{
new int[] { 1421, 1422, 1423, 1424, 1425, 1426, 2067, 4305 }, // Focus
new int[] { 1445, 1446, 1447, 1448, 1449, 1450, 2091, 4329 }, // Willpower
new int[] { 5875, 5876, 5877, 5878, 5879, 5880, 5881, 5882 }, // Sneak Attack Mastery
new int[] { 678, 679, 680, 681, 682, 683, 2195, 4510 }, // Arcane Enlightenment
new int[] { 653, 654, 655, 656, 657, 658, 2287, 4602 }, // Mana Conversion Mastery
new int[] { 557, 558, 559, 560, 561, 562 , 2215, 4530 }, // Creature Enchantment Mastery
new int[] { 581, 582, 583, 584, 585, 586, 2249, 4564 }, // Item Enchantment Mastery
new int[] { 605, 606, 607, 608, 609, 610, 2267, 4582 }, // Life Magic Mastery
new int[] { 629, 630, 631, 632, 633, 634 , 2323, 4638 }, // War Magic Mastery
new int[] { 1599, 1601, 1602, 1603, 1604, 1605, 2101, 4400 }, // Defender
new int[] { 1475, 1476, 1477, 1478, 1479, 1480, 2117, 4418 }, // Hermetic Link
new int[] { 1421, 1422, 1423, 1424, 1425, 1426, 2067, 4305 }, // Focus
new int[] { 1445, 1446, 1447, 1448, 1449, 1450, 2091, 4329 }, // Willpower
new int[] { 5875, 5876, 5877, 5878, 5879, 5880, 5881, 5882 }, // Sneak Attack Mastery
new int[] { 678, 679, 680, 681, 682, 683, 2195, 4510 }, // Arcane Enlightenment
new int[] { 653, 654, 655, 656, 657, 658, 2287, 4602 }, // Mana Conversion Mastery
new int[] { 557, 558, 559, 560, 561, 562 , 2215, 4530 }, // Creature Enchantment Mastery
new int[] { 581, 582, 583, 584, 585, 586, 2249, 4564 }, // Item Enchantment Mastery
new int[] { 605, 606, 607, 608, 609, 610, 2267, 4582 }, // Life Magic Mastery
new int[] { 629, 630, 631, 632, 633, 634 , 2323, 4638 }, // War Magic Mastery
new int[] { 1599, 1601, 1602, 1603, 1604, 1605, 2101, 4400 }, // Defender
new int[] { 1475, 1476, 1477, 1478, 1479, 1480, 2117, 4418 }, // Hermetic Link
new int[] { 3253, 3254, 3255, 3256, 3257, 3258, 3259, 4414 }, // Spirit Drinker
};

public static readonly int[][] JewelrySpells =
Expand Down

0 comments on commit 157fa73

Please sign in to comment.