Skip to content

Commit 072c435

Browse files
committed
Merge remote-tracking branch 'fork/dev' into merc-uniques
2 parents d2090d7 + a47d56f commit 072c435

99 files changed

Lines changed: 404852 additions & 536 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

RELEASE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ The JSON data and required skill tree assets should come in a `.zip` archive.
3737
Steps:
3838
1. Download the `.zip` archive.
3939
2. Create a new directory in `./src/TreeData` with the following schema:
40-
`<major_league_version>_<minor_league_version>`.
40+
`<major_league_version>_<minor_league_version>`. For alternate or ruthless trees, add the suffixing as appropriate.
4141
For 3.14, the correct directory name would be `3_14`.
42+
For 3.25 Ruthless 'alternate' tree, the correct directory name would be `3_25_ruthless_alternate`.
4243
3. Copy the following file from the `.zip` archive root to the new directory:
4344
* `data.json`.
45+
Note for Ruthless for example, the exported data from GGG will be `ruthless.json`, and this file should be copied into the new directory and renamed to `data.json` for the following steps to pick it up.
4446
4. Copy the following files from the `assets` subdirectory in the `.zip` archive to the
4547
new directory:
4648
* `mastery-active-effect-3.png`
@@ -54,7 +56,7 @@ Steps:
5456
according to the file's format. This is important, otherwise the JSON data converter
5557
won't trigger.
5658
7. Restart Path of Building Community. This should result in a new file `tree.lua`.
57-
8. Remove `data.json` and `sprites.json` from the new directory. Do not commit these files.
59+
8. Remove `data.json` and `sprites.json` from the new directories. Do not commit these files.
5860

5961
## Timeless Jewel updates
6062

spec/System/TestDefence_spec.lua

Lines changed: 218 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,40 @@ describe("TestDefence", function()
457457
assert.are.equals(1000, takenHitFromTypeMaxHit("Lightning"))
458458
assert.are.equals(1250, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
459459
end)
460-
460+
461+
it("energy shield increased by spell block chance if corresponding flag is present", function()
462+
build.configTab.input.enemyIsBoss = "None"
463+
build.configTab.input.customMods = "\z
464+
You have no intelligence\n\z
465+
100 Energy shield \n\z
466+
energy shield is increased by chance to block spell damage\n\z
467+
50% chance to block spell damage\n\z
468+
"
469+
build.configTab:BuildModList()
470+
runCallback("OnFrame")
471+
472+
assert.are.equals(0, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
473+
assert.are.equals(50, build.calcsTab.calcsOutput.SpellBlockChance)
474+
assert.are.equals(150, build.calcsTab.calcsOutput.EnergyShield)
475+
end)
476+
477+
it("energy shield increased by spell block chance if corresponding flag is present should be capped to max block", function()
478+
build.configTab.input.enemyIsBoss = "None"
479+
480+
build.configTab.input.customMods = "\z
481+
You have no intelligence\n\z
482+
100 Energy shield \n\z
483+
energy shield is increased by chance to block spell damage\n\z
484+
100% chance to block spell damage\n\z
485+
"
486+
build.configTab:BuildModList()
487+
runCallback("OnFrame")
488+
489+
assert.are.equals(25, build.calcsTab.calcsOutput.SpellBlockChanceOverCap )
490+
assert.are.equals(75, build.calcsTab.calcsOutput.SpellBlockChance)
491+
assert.are.equals(175, build.calcsTab.calcsOutput.EnergyShield)
492+
end)
493+
461494
local function withinTenPercent(value, otherValue)
462495
local ratio = otherValue / value
463496
return 0.9 < ratio and ratio < 1.1
@@ -807,4 +840,188 @@ describe("TestDefence", function()
807840
assert.are.equals(0, floor(poolsRemaining.Life))
808841
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
809842
end)
843+
844+
it("MoM + EB", function()
845+
build.configTab.input.enemyIsBoss = "None"
846+
-- enough mana and es, 0% and 100% bypass
847+
build.configTab.input.customMods = [[
848+
50% of damage is taken from mana before life
849+
energy shield protects mana instead of life
850+
+40 to maximum life
851+
+1960 to mana
852+
+2000 to energy shield
853+
You have no intelligence
854+
+60% to all resistances
855+
]]
856+
build.configTab:BuildModList()
857+
runCallback("OnFrame")
858+
assert.are.equals(200, build.calcsTab.calcsOutput.FireMaximumHitTaken)
859+
assert.are.equals(200, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
860+
local poolsRemaining = poolsRemainingAfterTypeMaxHit("Chaos")
861+
assert.are.equals(2000, round(poolsRemaining.EnergyShield))
862+
assert.are.equals(1900, round(poolsRemaining.Mana))
863+
assert.are.equals(0, floor(poolsRemaining.Life))
864+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
865+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
866+
assert.are.equals(1900, round(poolsRemaining.EnergyShield))
867+
assert.are.equals(2000, round(poolsRemaining.Mana))
868+
assert.are.equals(0, floor(poolsRemaining.Life))
869+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
870+
871+
-- enough mana and es, 50% bypass
872+
build.configTab.input.customMods = [[
873+
50% of damage is taken from mana before life
874+
energy shield protects mana instead of life
875+
50% of non-chaos damage taken bypasses energy shield
876+
+40 to maximum life
877+
+1960 to mana
878+
+2000 to energy shield
879+
You have no intelligence
880+
+60% to all resistances
881+
]]
882+
build.configTab:BuildModList()
883+
runCallback("OnFrame")
884+
assert.are.equals(200, build.calcsTab.calcsOutput.FireMaximumHitTaken)
885+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
886+
assert.are.equals(1950, round(poolsRemaining.EnergyShield))
887+
assert.are.equals(1950, round(poolsRemaining.Mana))
888+
assert.are.equals(0, floor(poolsRemaining.Life))
889+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
890+
891+
-- es bottleneck, 0% and 100% bypass
892+
build.configTab.input.customMods = [[
893+
50% of damage is taken from mana before life
894+
energy shield protects mana instead of life
895+
+40 to maximum life
896+
+1960 to mana
897+
+50 to energy shield
898+
You have no intelligence
899+
+60% to all resistances
900+
]]
901+
build.configTab:BuildModList()
902+
runCallback("OnFrame")
903+
assert.are.equals(200, build.calcsTab.calcsOutput.FireMaximumHitTaken)
904+
assert.are.equals(200, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
905+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Chaos")
906+
assert.are.equals(50, round(poolsRemaining.EnergyShield))
907+
assert.are.equals(1900, round(poolsRemaining.Mana))
908+
assert.are.equals(0, floor(poolsRemaining.Life))
909+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
910+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
911+
assert.are.equals(0, round(poolsRemaining.EnergyShield))
912+
assert.are.equals(1950, round(poolsRemaining.Mana))
913+
assert.are.equals(0, floor(poolsRemaining.Life))
914+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
915+
916+
-- es bottleneck, 50% bypass
917+
build.configTab.input.customMods = [[
918+
50% of damage is taken from mana before life
919+
energy shield protects mana instead of life
920+
50% of non-chaos damage taken bypasses energy shield
921+
+40 to maximum life
922+
+1960 to mana
923+
+40 to energy shield
924+
You have no intelligence
925+
+60% to all resistances
926+
]]
927+
build.configTab:BuildModList()
928+
runCallback("OnFrame")
929+
assert.are.equals(200, build.calcsTab.calcsOutput.FireMaximumHitTaken)
930+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
931+
assert.are.equals(0, round(poolsRemaining.EnergyShield))
932+
assert.are.equals(1940, round(poolsRemaining.Mana))
933+
assert.are.equals(0, floor(poolsRemaining.Life))
934+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
935+
936+
-- mana bottleneck, 0% and 100% bypass
937+
build.configTab.input.customMods = [[
938+
50% of damage is taken from mana before life
939+
energy shield protects mana instead of life
940+
+40 to maximum life
941+
+2000 to energy shield
942+
You have no intelligence
943+
+60% to all resistances
944+
]]
945+
build.configTab:BuildModList()
946+
runCallback("OnFrame")
947+
assert.are.equals(200, build.calcsTab.calcsOutput.FireMaximumHitTaken)
948+
assert.are.equals(140, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
949+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Chaos")
950+
assert.are.equals(2000, round(poolsRemaining.EnergyShield))
951+
assert.are.equals(0, round(poolsRemaining.Mana))
952+
assert.are.equals(0, floor(poolsRemaining.Life))
953+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
954+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
955+
assert.are.equals(1900, round(poolsRemaining.EnergyShield))
956+
assert.are.equals(40, round(poolsRemaining.Mana))
957+
assert.are.equals(0, floor(poolsRemaining.Life))
958+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
959+
960+
-- mana bottleneck, 50% bypass
961+
-- taking 160 damage in this scenario:
962+
-- 160 damage is split to 80 damage straight to life, 80 damage to MoM pools
963+
-- 50% of the 80 MoM pool damage is taken by ES and 50% bypasses
964+
-- pool of 20 mana takes 40 damage, gets depleted and the remaining damage continues on to life, for a total of 100 damage to life
965+
build.configTab.input.customMods = [[
966+
50% of damage is taken from mana before life
967+
energy shield protects mana instead of life
968+
50% of non-chaos damage taken bypasses energy shield
969+
+40 to maximum life
970+
-20 to mana
971+
+2000 to energy shield
972+
You have no intelligence
973+
+60% to all resistances
974+
]]
975+
build.configTab:BuildModList()
976+
runCallback("OnFrame")
977+
assert.are.equals(160, build.calcsTab.calcsOutput.FireMaximumHitTaken)
978+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
979+
assert.are.equals(1960, round(poolsRemaining.EnergyShield))
980+
assert.are.equals(0, round(poolsRemaining.Mana))
981+
assert.are.equals(0, floor(poolsRemaining.Life))
982+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
983+
984+
-- mana+es bottleneck, 0% and 100% bypass
985+
build.configTab.input.customMods = [[
986+
50% of damage is taken from mana before life
987+
energy shield protects mana instead of life
988+
+940 to maximum life
989+
+50 to energy shield
990+
You have no intelligence
991+
+60% to all resistances
992+
]]
993+
build.configTab:BuildModList()
994+
runCallback("OnFrame")
995+
assert.are.equals(1090, build.calcsTab.calcsOutput.FireMaximumHitTaken)
996+
assert.are.equals(1040, build.calcsTab.calcsOutput.ChaosMaximumHitTaken)
997+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Chaos")
998+
assert.are.equals(50, round(poolsRemaining.EnergyShield))
999+
assert.are.equals(0, round(poolsRemaining.Mana))
1000+
assert.are.equals(0, floor(poolsRemaining.Life))
1001+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
1002+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
1003+
assert.are.equals(0, round(poolsRemaining.EnergyShield))
1004+
assert.are.equals(0, round(poolsRemaining.Mana))
1005+
assert.are.equals(0, floor(poolsRemaining.Life))
1006+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
1007+
1008+
-- mana+es bottleneck, 50% bypass
1009+
build.configTab.input.customMods = [[
1010+
50% of damage is taken from mana before life
1011+
energy shield protects mana instead of life
1012+
50% of non-chaos damage taken bypasses energy shield
1013+
+940 to maximum life
1014+
+50 to energy shield
1015+
You have no intelligence
1016+
+60% to all resistances
1017+
]]
1018+
build.configTab:BuildModList()
1019+
runCallback("OnFrame")
1020+
assert.are.equals(1090, build.calcsTab.calcsOutput.FireMaximumHitTaken)
1021+
poolsRemaining = poolsRemainingAfterTypeMaxHit("Fire")
1022+
assert.are.equals(0, round(poolsRemaining.EnergyShield))
1023+
assert.are.equals(0, round(poolsRemaining.Mana))
1024+
assert.are.equals(0, floor(poolsRemaining.Life))
1025+
assert.are.equals(0, floor(poolsRemaining.OverkillDamage))
1026+
end)
8101027
end)

0 commit comments

Comments
 (0)