Skip to content

Commit

Permalink
Add Summon Average Damage Flag #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mudzereli committed Oct 6, 2024
1 parent 1eeee33 commit 618e8eb
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 44 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/mudsort/v17/.suo
Binary file not shown.
44 changes: 20 additions & 24 deletions .vs/mudsort/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"WorkspaceRootPath": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\util.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:util.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\plugincore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:plugincore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
Expand All @@ -38,7 +38,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"SelectedChildIndex": 5,
"Children": [
{
"$type": "Document",
Expand All @@ -50,46 +50,44 @@
"RelativeToolTip": "Enums.cs",
"ViewState": "AgIAAF4AAAAAAAAAAAAgwH8AAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T02:12:48.994Z",
"EditorCaption": ""
"WhenOpened": "2024-10-06T02:12:48.994Z"
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "app.config",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\app.config",
"RelativeDocumentMoniker": "app.config",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\app.config*",
"RelativeToolTip": "app.config*",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\app.config",
"RelativeToolTip": "app.config",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
"WhenOpened": "2024-10-06T02:12:48.299Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 1,
"Title": "Settings.settings",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\Settings.settings",
"RelativeDocumentMoniker": "Properties\\Settings.settings",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\Settings.settings*",
"RelativeToolTip": "Properties\\Settings.settings*",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\Settings.settings",
"RelativeToolTip": "Properties\\Settings.settings",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002767|",
"WhenOpened": "2024-10-06T01:46:15.767Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 2,
"Title": "Util.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Util.cs",
"RelativeDocumentMoniker": "Util.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Util.cs",
"RelativeToolTip": "Util.cs",
"ViewState": "AgIAABcAAAAAAAAAAAA1wDMAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T01:27:51.536Z",
"EditorCaption": ""
"WhenOpened": "2024-10-06T01:27:51.536Z"
},
{
"$type": "Document",
Expand All @@ -101,18 +99,17 @@
"RelativeToolTip": "PluginCore.cs",
"ViewState": "AgIAAMAAAAAAAAAAAAAgwNAAAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T14:58:30.193Z",
"EditorCaption": ""
"WhenOpened": "2022-02-15T14:58:30.193Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 0,
"Title": "SortFlag.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\SortFlag.cs",
"RelativeDocumentMoniker": "SortFlag.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\SortFlag.cs",
"RelativeToolTip": "SortFlag.cs",
"ViewState": "AgIAAAkAAAAAAAAAAAAAAMUAAAAJAAAAAAAAAA==",
"ViewState": "AgIAAF8BAAAAAAAAAAAgwG4BAABKAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-13T15:04:39.76Z",
"EditorCaption": ""
Expand All @@ -127,8 +124,7 @@
"RelativeToolTip": "Properties\\AssemblyInfo.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACIAAAAiAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T15:20:19.856Z",
"EditorCaption": ""
"WhenOpened": "2022-02-15T15:20:19.856Z"
}
]
}
Expand Down
36 changes: 16 additions & 20 deletions .vs/mudsort/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
"WorkspaceRootPath": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:properties\\settings.settings||{6D2695F9-5365-4A78-89ED-F205C045BFE6}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\util.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:util.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:sortflag.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\plugincore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:plugincore.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:enums.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|c:\\turbine\\asheron\u0027s call\\mudsort\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
Expand All @@ -38,7 +38,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"SelectedChildIndex": 5,
"Children": [
{
"$type": "Document",
Expand All @@ -50,8 +50,7 @@
"RelativeToolTip": "Enums.cs",
"ViewState": "AgIAAF4AAAAAAAAAAAAgwH8AAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T02:12:48.994Z",
"EditorCaption": ""
"WhenOpened": "2024-10-06T02:12:48.994Z"
},
{
"$type": "Document",
Expand All @@ -68,7 +67,7 @@
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 1,
"Title": "Settings.settings",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\Settings.settings",
"RelativeDocumentMoniker": "Properties\\Settings.settings",
Expand All @@ -80,16 +79,15 @@
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 2,
"Title": "Util.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Util.cs",
"RelativeDocumentMoniker": "Util.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Util.cs",
"RelativeToolTip": "Util.cs",
"ViewState": "AgIAABcAAAAAAAAAAAA1wDMAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T01:27:51.536Z",
"EditorCaption": ""
"WhenOpened": "2024-10-06T01:27:51.536Z"
},
{
"$type": "Document",
Expand All @@ -101,18 +99,17 @@
"RelativeToolTip": "PluginCore.cs",
"ViewState": "AgIAAMAAAAAAAAAAAAAgwNAAAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T14:58:30.193Z",
"EditorCaption": ""
"WhenOpened": "2022-02-15T14:58:30.193Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 0,
"Title": "SortFlag.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\SortFlag.cs",
"RelativeDocumentMoniker": "SortFlag.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\SortFlag.cs",
"RelativeToolTip": "SortFlag.cs",
"ViewState": "AgIAAAkAAAAAAAAAAAAAAMUAAAAJAAAAAAAAAA==",
"ViewState": "AgIAAF8BAAAAAAAAAAAgwG4BAABKAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-13T15:04:39.76Z",
"EditorCaption": ""
Expand All @@ -127,8 +124,7 @@
"RelativeToolTip": "Properties\\AssemblyInfo.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACIAAAAiAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T15:20:19.856Z",
"EditorCaption": ""
"WhenOpened": "2022-02-15T15:20:19.856Z"
}
]
}
Expand Down
17 changes: 17 additions & 0 deletions SortFlag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class SortFlag
public static SortFlag BUFFED_ARMOR_LEVEL = new SortFlag("BuffedArmorLevel", 0x29D1, "BP", "BP");
public static SortFlag BUFFED_MANA_CONVERSION = new SortFlag("BuffedManaConversion", 0x29D1, "BM", "BM");
public static SortFlag TOTAL_MISSILE_DAMAGE = new SortFlag("TotalMissileDamage", 0x29D1, "TM", "TM");
public static SortFlag TOTAL_SUMMON_DAMAGE = new SortFlag("TotalSummonDamage", 0x29D1, "TS", "TS");

public String name;
public String code;
Expand Down Expand Up @@ -70,6 +71,7 @@ static SortFlag() {
codes.Add(BUFFED_ARMOR_LEVEL.code);
codes.Add(BUFFED_MANA_CONVERSION.code);
codes.Add(TOTAL_MISSILE_DAMAGE.code);
codes.Add(TOTAL_SUMMON_DAMAGE.code);
ArrayList enums = new ArrayList();
enums.AddRange(Enum.GetValues(typeof(MSStringValueKey)));
enums.AddRange(Enum.GetValues(typeof(MSLongValueKey)));
Expand Down Expand Up @@ -375,6 +377,21 @@ public Object directValueOf(WorldObject obj)
}
return baseDMG + elementalDMG + cantripDMG;
}
else if (this == TOTAL_SUMMON_DAMAGE)
{
//((MaxDam + MinDam)/2 * DamageRating * (1 - Crit Rate)) + (MaxDam * 2 [CritMod] * TotalCritDamageRating * CritRate)
int maxDMG = 100;
int minDMG = 25;
int ratingDMG = obj.Values((LongValueKey)MSLongValueKey.DamRating);
int ratingCRIT = obj.Values((LongValueKey)MSLongValueKey.CritRating);
int ratingCRITDAM = obj.Values((LongValueKey)MSLongValueKey.CritDamRating);
double avgDMG = (maxDMG + minDMG) / 2.0; // Fix integer division
double DamageRating = 1 + (ratingDMG / 100.0); // Fix integer division
double CritRating = (ratingCRIT + 10) / 100.0; // Fix integer division
double CritMod = (100 + ratingDMG + ratingCRITDAM) / 100.0; // Fix integer division
double formulaCalc = (avgDMG * DamageRating * (1 - CritRating)) + (maxDMG * 2 * CritMod * CritRating);
return (int)formulaCalc;
}
else if (key is MSStringValueKey)
{
return obj.Values((StringValueKey)key);
Expand Down
Binary file modified bin/Release/mudsort.dll
Binary file not shown.
Binary file modified bin/Release/mudsort.pdb
Binary file not shown.
Binary file modified obj/Release/mudsort.dll
Binary file not shown.
Binary file modified obj/Release/mudsort.pdb
Binary file not shown.

0 comments on commit 618e8eb

Please sign in to comment.