Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding PetDevice and EncapsulatedSpirit to updated loot system #3263

Merged
merged 49 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
227e0b7
adding end of retail mutation filters for melee weapon damage, wield …
gmriggs Sep 23, 2020
67cf58f
.
gmriggs Sep 23, 2020
17dc366
adding 4eyebiped credit
gmriggs Sep 23, 2020
5272050
adding end of retail mutation filters for missile weapon DamageMod, E…
gmriggs Sep 24, 2020
67e1c59
adding end of retail mutation filters for caster weapon ManaConversio…
gmriggs Sep 24, 2020
6269a7c
update melee scripts
gmriggs Sep 25, 2020
3a930d9
Merge branch 'tSysMutationFilter' into tSysMutationFilter-missile
gmriggs Sep 25, 2020
abf490a
Merge branch 'tSysMutationFilter-missile' into tSysMutationFilter-caster
gmriggs Sep 25, 2020
49078b3
resolve merge
gmriggs Sep 25, 2020
3b98131
.
gmriggs Sep 25, 2020
c3d12c9
add missing lines
gmriggs Sep 25, 2020
e328c27
adding weapon speed mutations
gmriggs Sep 25, 2020
9a8f666
appending LongDesc with ' of <first spell name w/ descriptor>'
gmriggs Sep 25, 2020
acc947d
.
gmriggs Sep 25, 2020
e979fb0
adding some missing spell descs from magloot logs
gmriggs Sep 26, 2020
54ec117
adding SpellDIDs to isMagical casters
gmriggs Sep 26, 2020
ca82053
wip
gmriggs Sep 27, 2020
d22e275
finalizing
gmriggs Sep 27, 2020
7b8bac3
updating qualityMod
gmriggs Sep 28, 2020
4695559
modifying qualityMod again, to align with data + magloot logs for leg…
gmriggs Sep 28, 2020
93038c2
Merge branch 'master' into tSysMutationFilter
gmriggs Sep 28, 2020
d45ae6a
ConcurrentDictionary.TryAdd
gmriggs Sep 28, 2020
e3a2cce
Merge branch 'tSysMutationFilter' into tSysMutationFilter-missile
gmriggs Sep 28, 2020
b7fdd09
Merge branch 'master' into tSysMutationFilter-missile
gmriggs Sep 28, 2020
f281ebc
Merge branch 'tSysMutationFilter-missile' into tSysMutationFilter-caster
gmriggs Sep 28, 2020
82e8774
Merge branch 'master' into tSysMutationFilter-caster
gmriggs Sep 28, 2020
2c064c1
Merge branch 'tSysMutationFilter-caster' into weapon-speed
gmriggs Sep 28, 2020
c004ef7
Merge branch 'master' into weapon-speed
gmriggs Sep 28, 2020
8fdfe26
updating Clothing spells w/ latest data
gmriggs Sep 28, 2020
1abcc7a
Merge branch 'tSysMutationFilter-caster' into roll-spells
gmriggs Sep 28, 2020
c31076c
Merge branch 'master' into roll-spells
gmriggs Sep 28, 2020
f4ad77e
Merge branch 'weapon-speed' into long-desc
gmriggs Sep 28, 2020
082f548
Merge branch 'master' into long-desc
gmriggs Sep 28, 2020
3be6444
Merge branch 'long-desc' into slot-spell
gmriggs Sep 28, 2020
60aefaa
Merge branch 'master' into slot-spell
gmriggs Sep 28, 2020
9821597
Merge branch 'slot-spell' into roll-spells
gmriggs Sep 29, 2020
a502540
Merge branch 'master' into roll-spells
gmriggs Sep 29, 2020
28ec687
porting *_cantrip_drop_rate server config options to updated cantrips…
gmriggs Sep 29, 2020
ef8e3b3
update CreateRandomScroll() to eor chances and ranges
gmriggs Oct 1, 2020
d91cd08
update
gmriggs Oct 1, 2020
b3b982d
spacing
gmriggs Oct 1, 2020
782b7a4
adding retail chance tables for level 8 spell components, adding qual…
gmriggs Oct 1, 2020
c59f549
small adjustments
gmriggs Oct 1, 2020
265f9c4
wip
gmriggs Oct 1, 2020
69e96f4
adding PetDevice and EncapsulatedSpirit to updated loot system
gmriggs Oct 1, 2020
bdabee7
add 2 missing glyphs
gmriggs Oct 1, 2020
f8d6220
Merge branch 'master' into level-8-spell-comp
gmriggs Oct 3, 2020
765b2ae
Merge branch 'level-8-spell-comp' into pet-device-loot
gmriggs Oct 3, 2020
f90548f
Merge branch 'master' into pet-device-loot
gmriggs Oct 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/ACE.Server/Factories/Enum/TreasureItemType_Orig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@ public enum TreasureItemType_Orig
BowWeapon,
CrossbowWeapon,
AtlatlWeapon,*/

// from analysis of magloot corpse logs, these appeared to be top-level items
// PetDevices appeared to only be in the non-magical item tables
// if a creature didn't drop non-magical items, there were no traces of it dropping a PetDevice
// similarly, if a creature didn't drop non-magical or mundane items,
// it was still found to drop EncapsulatedSpirit
PetDevice,
EncapsulatedSpirit
}
}
20 changes: 17 additions & 3 deletions Source/ACE.Server/Factories/LootGenerationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2611,6 +2611,16 @@ public static TreasureRoll RollWcid(TreasureDeath treasureDeath, TreasureItemCat

treasureRoll.Wcid = SpellComponentWcids.Roll(treasureDeath);
break;

case TreasureItemType_Orig.PetDevice:

treasureRoll.Wcid = PetDeviceWcids.Roll(treasureDeath);
break;

case TreasureItemType_Orig.EncapsulatedSpirit:

treasureRoll.Wcid = WeenieClassName.ace49485_encapsulatedspirit;
break;
}
return treasureRoll;
}
Expand All @@ -2623,13 +2633,13 @@ public static TreasureItemType_Orig RollItemType(TreasureDeath treasureDeath, Tr
switch (category)
{
case TreasureItemCategory.Item:
return TreasureItemTypeChances_Orig.Roll(treasureDeath.ItemTreasureTypeSelectionChances);
return TreasureProfile_Item.Roll(treasureDeath.ItemTreasureTypeSelectionChances);

case TreasureItemCategory.MagicItem:
return TreasureMagicItemTypeChances_Orig.Roll(treasureDeath.MagicItemTreasureTypeSelectionChances);
return TreasureProfile_MagicItem.Roll(treasureDeath.MagicItemTreasureTypeSelectionChances);

case TreasureItemCategory.MundaneItem:
return TreasureMundaneItemTypeChances_Orig.Roll(treasureDeath.MundaneItemTypeSelectionChances);
return TreasureProfile_Mundane.Roll(treasureDeath.MundaneItemTypeSelectionChances);
}
return TreasureItemType_Orig.Undef;
}
Expand Down Expand Up @@ -2738,6 +2748,10 @@ public static WorldObject CreateAndMutateWcid(TreasureDeath treasureDeath, Treas
wo = CreateRandomScroll(treasureDeath, treasureRoll); // using original method
break;

case TreasureItemType_Orig.PetDevice:
MutatePetDevice(wo, treasureDeath.Tier);
break;

// other mundane items (mana stones, food/drink, healing kits, lockpicks, and spell components/peas) don't get mutated
}
return wo;
Expand Down
4 changes: 3 additions & 1 deletion Source/ACE.Server/Factories/LootGenerationFactory_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ private static WorldObject CreateSummoningEssence(int tier, bool mutate = true)
return petDevice;
}

private static void MutatePetDevice(PetDevice petDevice, int tier)
private static void MutatePetDevice(WorldObject petDevice, int tier)
{
if (!(petDevice is PetDevice)) return;

var ratingChance = 0.5f;

// add rng ratings to pet device
Expand Down
75 changes: 75 additions & 0 deletions Source/ACE.Server/Factories/Tables/PetDeviceChance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using System.Collections.Generic;

using ACE.Database.Models.World;
using ACE.Server.Factories.Entity;

namespace ACE.Server.Factories.Tables
{
public static class PetDeviceChance
{
private static readonly ChanceTable<int> T1_T3_PetLevelChances = new ChanceTable<int>()
{
( 50, 1.0f )
};

private static readonly ChanceTable<int> T4_PetLevelChances = new ChanceTable<int>()
{
( 50, 0.75f ),
( 80, 0.25f )
};

private static readonly ChanceTable<int> T5_PetLevelChances = new ChanceTable<int>()
{
( 50, 0.15f ),
( 80, 0.65f ),
( 100, 0.20f ),
};

private static readonly ChanceTable<int> T6_PetLevelChances = new ChanceTable<int>()
{
( 80, 0.15f ),
( 100, 0.25f ),
( 125, 0.50f ),
( 150, 0.10f ),
};

private static readonly ChanceTable<int> T7_PetLevelChances = new ChanceTable<int>()
{
( 100, 0.15f ),
( 125, 0.25f ),
( 150, 0.50f ),
( 180, 0.10f ),
};

private static readonly ChanceTable<int> T8_PetLevelChances = new ChanceTable<int>()
{
( 100, 0.0125f ),
( 125, 0.025f ),
( 150, 0.05f ),
( 180, 0.50f ),
( 200, 0.4125f ),
};

private static readonly List<ChanceTable<int>> petLevelChances = new List<ChanceTable<int>>()
{
T1_T3_PetLevelChances,
T1_T3_PetLevelChances,
T1_T3_PetLevelChances,
T4_PetLevelChances,
T5_PetLevelChances,
T6_PetLevelChances,
T7_PetLevelChances,
T8_PetLevelChances,
};

/// <summary>
/// Rolls for a CombatPet level for a PetDevice
/// </summary>
public static int Roll(TreasureDeath profile)
{
var table = petLevelChances[profile.Tier - 1];

return table.Roll(profile.LootQualityMod);
}
}
}
163 changes: 0 additions & 163 deletions Source/ACE.Server/Factories/Tables/TreasureItemTypeChances_Orig.cs

This file was deleted.

Loading