Skip to content

Commit

Permalink
Add missile weapon damage sort flag which incorporates cantrips #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mudzereli committed Oct 6, 2024
1 parent 166c627 commit 1eeee33
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 27 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/mudsort/v17/.suo
Binary file not shown.
60 changes: 47 additions & 13 deletions .vs/mudsort/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@
"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\\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\\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}",
"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\\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\\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}",
"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}",
"RelativeMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|solutionrelative:app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\properties\\assemblyinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
Expand All @@ -34,12 +42,38 @@
"Children": [
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 4,
"Title": "Enums.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Enums.cs",
"RelativeDocumentMoniker": "Enums.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Enums.cs",
"RelativeToolTip": "Enums.cs",
"ViewState": "AgIAAF4AAAAAAAAAAAAgwH8AAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T02:12:48.994Z",
"EditorCaption": ""
},
{
"$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*",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
"WhenOpened": "2024-10-06T02:12:48.299Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"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": ""
Expand All @@ -52,20 +86,20 @@
"RelativeDocumentMoniker": "Util.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Util.cs",
"RelativeToolTip": "Util.cs",
"ViewState": "AgIAABcAAAAAAAAAAAAgwDMAAAAlAAAAAAAAAA==",
"ViewState": "AgIAABcAAAAAAAAAAAA1wDMAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T01:27:51.536Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 3,
"Title": "PluginCore.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\PluginCore.cs",
"RelativeDocumentMoniker": "PluginCore.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\PluginCore.cs",
"RelativeToolTip": "PluginCore.cs",
"ViewState": "AgIAALIAAAAAAAAAAADgv7oAAAArAAAAAAAAAA==",
"ViewState": "AgIAAMAAAAAAAAAAAAAgwNAAAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T14:58:30.193Z",
"EditorCaption": ""
Expand All @@ -78,14 +112,14 @@
"RelativeDocumentMoniker": "SortFlag.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\SortFlag.cs",
"RelativeToolTip": "SortFlag.cs",
"ViewState": "AgIAADMBAAAAAAAAAAAiwFIBAAAyAAAAAAAAAA==",
"ViewState": "AgIAAAkAAAAAAAAAAAAAAMUAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-13T15:04:39.76Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 6,
"Title": "AssemblyInfo.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\AssemblyInfo.cs",
"RelativeDocumentMoniker": "Properties\\AssemblyInfo.cs",
Expand Down
60 changes: 47 additions & 13 deletions .vs/mudsort/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"Version": 1,
"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}",
"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}"
Expand All @@ -11,12 +19,12 @@
"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\\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\\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\\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\\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}"
},
{
"AbsoluteMoniker": "D:0:0:{C2880823-67E7-4B3D-A481-9ADC9847C39C}|mudsort.csproj|C:\\Turbine\\Asheron\u0027s Call\\mudsort\\properties\\assemblyinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
Expand All @@ -30,11 +38,37 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 3,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Document",
"DocumentIndex": 3,
"DocumentIndex": 4,
"Title": "Enums.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Enums.cs",
"RelativeDocumentMoniker": "Enums.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Enums.cs",
"RelativeToolTip": "Enums.cs",
"ViewState": "AgIAAF4AAAAAAAAAAAAgwH8AAAAgAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T02:12:48.994Z",
"EditorCaption": ""
},
{
"$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",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|",
"WhenOpened": "2024-10-06T02:12:48.299Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Settings.settings",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\Settings.settings",
"RelativeDocumentMoniker": "Properties\\Settings.settings",
Expand All @@ -46,46 +80,46 @@
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 1,
"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": "AgIAABcAAAAAAAAAAAAgwDMAAAAlAAAAAAAAAA==",
"ViewState": "AgIAABcAAAAAAAAAAAA1wDMAAAAlAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-06T01:27:51.536Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 3,
"Title": "PluginCore.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\PluginCore.cs",
"RelativeDocumentMoniker": "PluginCore.cs",
"ToolTip": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\PluginCore.cs",
"RelativeToolTip": "PluginCore.cs",
"ViewState": "AgIAAIcAAAAAAAAAAAAWwLoAAAArAAAAAAAAAA==",
"ViewState": "AgIAAMAAAAAAAAAAAAAgwNAAAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-15T14:58:30.193Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 2,
"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": "AgIAABEAAAAAAAAAAAAYwFIBAAAyAAAAAAAAAA==",
"ViewState": "AgIAAAkAAAAAAAAAAAAAAMUAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2022-02-13T15:04:39.76Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"DocumentIndex": 6,
"Title": "AssemblyInfo.cs",
"DocumentMoniker": "C:\\Turbine\\Asheron\u0027s Call\\mudsort\\Properties\\AssemblyInfo.cs",
"RelativeDocumentMoniker": "Properties\\AssemblyInfo.cs",
Expand Down
35 changes: 34 additions & 1 deletion SortFlag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class SortFlag
public static SortFlag BUFFED_ATTACK_BONUS = new SortFlag("BuffedAttackBonus", 0x29D1, "BA", "BA");
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 String name;
public String code;
Expand Down Expand Up @@ -68,6 +69,7 @@ static SortFlag() {
codes.Add(BUFFED_ATTACK_BONUS.code);
codes.Add(BUFFED_ARMOR_LEVEL.code);
codes.Add(BUFFED_MANA_CONVERSION.code);
codes.Add(TOTAL_MISSILE_DAMAGE.code);
ArrayList enums = new ArrayList();
enums.AddRange(Enum.GetValues(typeof(MSStringValueKey)));
enums.AddRange(Enum.GetValues(typeof(MSLongValueKey)));
Expand Down Expand Up @@ -184,7 +186,7 @@ public String valueOf(WorldObject obj)
}
else if (this == BUFFED_ELEMENTAL_DAMAGE || this == BUFFED_ATTACK_BONUS || this == BUFFED_MANA_CONVERSION || this == BUFFED_MELEE_DEFENSE)
{
return (((int)((Double)directValueOf(obj) * 10000)).ToString());
return (((int) ((Double) directValueOf(obj) * 10000)).ToString());
}
else
{
Expand Down Expand Up @@ -342,6 +344,37 @@ public Object directValueOf(WorldObject obj)
}
return val;
}
else if (this == TOTAL_MISSILE_DAMAGE)
{
double baseMod = obj.Values((DoubleValueKey)MSDoubleValueKey.DamageBonus);
if (baseMod == 0)
return 0;
int elementalDMG = obj.Values((LongValueKey)MSLongValueKey.ElementalDmgBonus);
int cantripDMG = 0;
int baseDMG = (int)((baseMod - 1) * 100 / 3);
if (obj.SpellCount > 0)
{
for (int i = 0; i < obj.SpellCount; i++)
{
int spellID = obj.Spell(i);
switch (spellID)
{
case 2453: cantripDMG = cantripDMG + 2; break;
case 2486: cantripDMG = cantripDMG + 2; break;
case 2487: cantripDMG = cantripDMG + 2; break;
case 2598: cantripDMG = cantripDMG + 2; break;
case 3828: cantripDMG = cantripDMG + 3; break;
case 2454: cantripDMG = cantripDMG + 4; break;
case 2586: cantripDMG = cantripDMG + 4; break;
case 2629: cantripDMG = cantripDMG + 5; break;
case 2452: cantripDMG = cantripDMG + 6; break;
case 4661: cantripDMG = cantripDMG + 7; break;
case 6089: cantripDMG = cantripDMG + 10; break;
}
}
}
return baseDMG + elementalDMG + cantripDMG;
}
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 1eeee33

Please sign in to comment.