-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LICENSE and docs exported from CodePlex
- Loading branch information
Showing
32 changed files
with
3,958 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="wikidoc"> | ||
<p><strong>This is the code for the back end of the requirement. This may help you understand how the item is tested against the requirement.</strong></p> | ||
<p> </p> | ||
<pre> public override bool Match(GameItemInfo id)<br> {<br> double val = id.GetValueDouble(vk, 0);<br><br> // Add buffs to the maxdamage, this is broken if the weapon is equipped/activated/buffed<br> System.Collections.ObjectModel.ReadOnlyCollection<uTank2.MySpell> Spells = id.Spells;<br> foreach (uTank2.MySpell sp in Spells)<br> {<br> switch (vk)<br> {<br> case DoubleValueKey.AttackBonus:<br> if (sp.Id == 2603) val += .03; // Minor Heart Thirst<br> if (sp.Id == 2591) val += .05; // Major Heart Thirst<br> if (sp.Id == 4666) val += .07; // Epic Heart Thirst<br> break;<br><br> case DoubleValueKey.ElementalDamageVersusMonsters:<br> if (sp.Id == 4414) val += .01; // Incantation of Spirit Drinker, this spell on the item adds 1 more % of damage over a user casted 8<br> if (sp.Id == 3251) val += .01; // Minor Spirit Thirst<br> if (sp.Id == 3250) val += .03; // Major Spirit Thirst<br> if (sp.Id == 4670) val += .04; // Epic Spirit Thirst<br> break;<br><br> case DoubleValueKey.ManaCBonus:<br> if (sp.Id == 3201) val *= 1.05; // Feeble Hermetic Link<br> if (sp.Id == 3199) val *= 1.10; // Minor Hermetic Link<br> if (sp.Id == 3302) val *= 1.15; // Moderate Hermetic Link<br> if (sp.Id == 3200) val *= 1.20; // Major Hermetic Link<br> break;<br><br> case DoubleValueKey.MeleeDefenseBonus:<br> if (sp.Id == 2600) val += .03; // Minor Defender<br> if (sp.Id == 2588) val += .05; // Major Defender<br> if (sp.Id == 4633) val += .07; // Epic Defender<br> break;<br> }<br> }<br><br> return (float)val >= (float)keyval;<br> }</pre> | ||
</div><div class="ClearBoth"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div class="wikidoc"> | ||
<p><strong>This is the code for the back end of the requirement. This may help you understand how the item is tested against the requirement.</strong></p> | ||
<p> </p> | ||
<p> </p> | ||
<pre> public override bool Match(GameItemInfo id) | ||
{ | ||
int val = id.GetValueInt(vk, 0); | ||
|
||
// Add buffs to the maxdamage, this is broken if the weapon is equipped/activated/buffed | ||
System.Collections.ObjectModel.ReadOnlyCollection Spells = id.Spells; | ||
foreach (uTank2.MySpell sp in Spells) | ||
{ | ||
switch (vk) | ||
{ | ||
case IntValueKey.MaxDamage: | ||
if (sp.Id == 4395) val += 2; // Incantation of Blood Drinker, this spell on the item adds 2 more points of damage over a user casted 8 | ||
if (sp.Id == 2598) val += 2; // Minor Blood Thirst | ||
if (sp.Id == 2586) val += 4; // Major Blood Thirst | ||
if (sp.Id == 4661) val += 7; // Epic Blood Thirst | ||
break; | ||
|
||
case IntValueKey.ArmorLevel: | ||
if (sp.Id == 2604) val += 20; // Minor Impenetrability | ||
if (sp.Id == 2592) val += 40; // Major Impenetrability | ||
if (sp.Id == 4667) val += 60; // Epic Impenetrability | ||
break; | ||
} | ||
} | ||
|
||
return val >= keyval; | ||
}</pre> | ||
</div><div class="ClearBoth"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="wikidoc"> | ||
<p><strong>This is the code for the back end of the requirement. This may help you understand how the item is tested against the requirement.</strong></p> | ||
<p><strong><br> | ||
</strong></p> | ||
<pre> public bool CanReachTargetValues(double targetCalcedBuffedTinkedDoT, double targetBuffedMeleeDefenseBonus, double targetBuffedAttackBonus)<br> {<br> double buffedMeleeDefenseBonus = GetBuffedDoubleValueKey(DoubleValueKey.MeleeDefenseBonus);<br> double buffedAttackBonus = GetBuffedDoubleValueKey(DoubleValueKey.AttackBonus);<br><br> double variance = gameItemInfo.GetValueDouble(DoubleValueKey.Variance, 0.0);<br> int maxDamage = GetBuffedLogValueKey(IntValueKey.MaxDamage);<br><br> int numberOfTinksLeft = Math.Max(10 - gameItemInfo.GetValueInt(IntValueKey.NumberTimesTinkered, 0), 0);<br><br> if (gameItemInfo.GetValueInt(IntValueKey.Imbued, 0) == 0)<br> numberOfTinksLeft--; // Factor in an imbue tink<br><br> // If this is not a loot generated item, it can't be tinked<br> if (gameItemInfo.GetValueInt(IntValueKey.Material, 0) == 0)<br> numberOfTinksLeft = 0;<br><br> for (int i = 1; i <= numberOfTinksLeft; i++)<br> {<br> if (buffedMeleeDefenseBonus < targetBuffedMeleeDefenseBonus)<br> buffedMeleeDefenseBonus += .01;<br> else if (buffedAttackBonus < targetBuffedAttackBonus)<br> buffedAttackBonus += .01;<br> else<br> {<br> double ironTinkDoT = CalculateDamageOverTime(maxDamage + 24 + 1, variance);<br> double graniteTinkDoT = CalculateDamageOverTime(maxDamage + 24, variance*.8);<br><br> if (ironTinkDoT >= graniteTinkDoT)<br> maxDamage++;<br> else<br> variance *= .8;<br> }<br> }<br><br> return CalculateDamageOverTime(maxDamage + 24, variance) >= targetCalcedBuffedTinkedDoT && buffedMeleeDefenseBonus >= targetBuffedMeleeDefenseBonus && buffedAttackBonus >= targetBuffedAttackBonus;<br> }<br><br> /// <summary><br> /// maxDamage * ((1 - critChance) * (2 - variance) / 2 + (critChance * critMultiplier));<br> /// </summary><br> /// <param name="maxDamage"></param><br> /// <param name="variance"></param><br> /// <param name="critChance"></param><br> /// <param name="critMultiplier"></param><br> /// <returns></returns><br> public static double CalculateDamageOverTime(int maxDamage, double variance, double critChance = .1, double critMultiplier = 2)<br> {<br> return maxDamage * ((1 - critChance) * (2 - variance) / 2 + (critChance * critMultiplier));<br> }</pre> | ||
</div><div class="ClearBoth"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="wikidoc"> | ||
<p><strong>This is the code for the back end of the requirement. This may help you understand how the item is tested against the requirement.</strong></p> | ||
<p><strong><br> | ||
</strong></p> | ||
<pre> public override bool Match(GameItemInfo id)<br> {<br> int maxdamage = id.GetValueInt(IntValueKey.MaxDamage, 0);<br> int elementalDmgBonus = id.GetValueInt(IntValueKey.ElementalDmgBonus, 0);<br> double damageBonus = id.GetValueDouble(DoubleValueKey.DamageBonus, 1);<br><br> // Add buffs to the maxdamage, this is broken if the weapon is equipped/activated/buffed<br> System.Collections.ObjectModel.ReadOnlyCollection<uTank2.MySpell> Spells = id.Spells;<br> foreach (uTank2.MySpell sp in Spells)<br> {<br> if (sp.Id == 4395) maxdamage += 2; // Incantation of Blood Drinker, this spell on the item adds 2 more points of damage over a user casted 8<br> if (sp.Id == 2598) maxdamage += 2; // Minor Blood Thirst<br> if (sp.Id == 2586) maxdamage += 4; // Major Blood Thirst<br> if (sp.Id == 4661) maxdamage += 7; // Epic Blood Thirst<br> }<br><br> return (maxdamage + (((damageBonus - 1) * 100) / 3) + elementalDmgBonus) >= keyval;<br> }</pre> | ||
</div><div class="ClearBoth"></div> |
Oops, something went wrong.