Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a85d6ff25 | ||
|
|
3366c3677c | ||
|
|
1470f3d182 | ||
|
|
652e22593b | ||
|
|
31d2915039 | ||
|
|
525155bedc | ||
|
|
457e06c281 | ||
|
|
66e7303dc3 | ||
|
|
c30911b523 | ||
|
|
71dbc6c6f1 | ||
|
|
1baa63fdd2 | ||
|
|
62375b4308 | ||
|
|
cf3930b0c8 | ||
|
|
ce51e8dfc4 | ||
|
|
87035e58ae | ||
|
|
13abe40eac | ||
|
|
6cf126ce7c | ||
|
|
68b083b840 | ||
|
|
9513ea5d79 | ||
|
|
7e59c44200 | ||
|
|
7a82749230 | ||
|
|
5d15472cb7 | ||
|
|
1eff672eaa | ||
|
|
12de8fd6be | ||
|
|
b78a390734 | ||
|
|
abe6152413 | ||
|
|
ac09e91246 | ||
|
|
4bc5a8171b | ||
|
|
f77d99a414 | ||
|
|
6cc141c960 | ||
|
|
8413d077d9 | ||
|
|
3c83fb6fa4 | ||
|
|
6146d72cdf | ||
|
|
bd9799620c | ||
|
|
c87e464c76 | ||
|
|
00c90ece12 | ||
|
|
a059666398 | ||
|
|
8b93e4977e | ||
|
|
faf3d7caf4 | ||
|
|
4cb248c6ae | ||
|
|
1d9878d635 | ||
|
|
557d69fe3d | ||
|
|
263135bd59 | ||
|
|
ee235b4b73 | ||
|
|
e08e70e1d6 | ||
|
|
5c9ba01271 | ||
|
|
7c7838aa5f | ||
|
|
338d5b42d3 | ||
|
|
6494ca4332 | ||
|
|
31d48648ab | ||
|
|
e0b9447404 | ||
|
|
3645027006 | ||
|
|
73bab6264e | ||
|
|
21085e9590 | ||
|
|
0549b604f2 | ||
|
|
4c045bbda2 | ||
|
|
af0952f5c9 | ||
|
|
3497995c10 | ||
|
|
077d9c74f1 | ||
|
|
6f955e7c3a | ||
|
|
1ccd3d6a9f | ||
|
|
884b179d7e | ||
|
|
2fb7067af2 | ||
|
|
064215c68e | ||
|
|
60bc158271 | ||
|
|
9f54c4e321 | ||
|
|
314368ae17 | ||
|
|
934a5f6e21 | ||
|
|
5ffa1e3123 | ||
|
|
7a0d2bb3ed | ||
|
|
b9ddd9607b | ||
|
|
9050179251 | ||
|
|
911f1770c7 | ||
|
|
eb42b0d07c | ||
|
|
7a88f40069 | ||
|
|
54a0de8b4f | ||
|
|
96fdde5282 | ||
|
|
c715526f07 | ||
|
|
86d6167403 | ||
|
|
b8bfef18ce | ||
|
|
92bd7c4b3b | ||
|
|
4e376c42f4 | ||
|
|
99f42f147b | ||
|
|
49a0540563 | ||
|
|
8f8afa5ad8 | ||
|
|
6721d44429 | ||
|
|
d3b11c5c25 | ||
|
|
61d1ca439c | ||
|
|
da19025a1b | ||
|
|
db16ba4bf6 | ||
|
|
95a21d01ed | ||
|
|
cfc9ddcd28 | ||
|
|
11369d5ddd | ||
|
|
3fc0cb5bf8 | ||
|
|
9f56a9bb7b | ||
|
|
dc911ca222 | ||
|
|
3daaa41dfd | ||
|
|
d4e9139620 | ||
|
|
7b672358f4 | ||
|
|
f19c45b13e | ||
|
|
896991796d | ||
|
|
c4893f5717 | ||
|
|
07bd5eea0d | ||
|
|
d6bd9c6053 | ||
|
|
7752d55e5a | ||
|
|
e2a160834b | ||
|
|
2161d19801 | ||
|
|
5cb32fddab | ||
|
|
c74b3a721c | ||
|
|
5979138139 | ||
|
|
24a11d2c99 | ||
|
|
8d27082ff1 | ||
|
|
0d3eb42855 | ||
|
|
760b782620 | ||
|
|
290358cbd7 | ||
|
|
29e78c5acf | ||
|
|
b587969326 | ||
|
|
cc99a85545 | ||
|
|
a0eb720838 | ||
|
|
a8f7f2173c | ||
|
|
f51931abe3 | ||
|
|
e24ffff4ca | ||
|
|
2c1f8b7e85 | ||
|
|
0ed53298dc | ||
|
|
9cda8f5fd2 | ||
|
|
b0fa931331 | ||
|
|
c70ff68e06 | ||
|
|
95c7e0d10d | ||
|
|
d6e458a8da | ||
|
|
2a975285d2 | ||
|
|
8c388f1139 | ||
|
|
39ee2da83c | ||
|
|
b2234be806 | ||
|
|
91eacad29c | ||
|
|
5bed03090f | ||
|
|
b22a4ac55a | ||
|
|
6f2c7e4bf5 | ||
|
|
3bd4d03f11 | ||
|
|
7ffce47503 | ||
|
|
0e6174ba7a | ||
|
|
5f256bf463 | ||
|
|
c790146d36 | ||
|
|
af2a977101 | ||
|
|
1452ccfb3e | ||
|
|
cb741f19bb | ||
|
|
02cb78eb60 | ||
|
|
e066ecd597 | ||
|
|
c4d71a5c80 | ||
|
|
a6b8250b76 | ||
|
|
e7674bd7df | ||
|
|
9c734770c9 | ||
|
|
4ffb55706a | ||
|
|
2b7fd1cd9c | ||
|
|
edc488c794 | ||
|
|
0c23147feb | ||
|
|
baf68bcb91 | ||
|
|
a734752c8e | ||
|
|
d9ff93a11a | ||
|
|
50b34fef35 | ||
|
|
011b83a696 | ||
|
|
36eac4e986 | ||
|
|
026f80d585 | ||
|
|
98af1dd6b6 | ||
|
|
064ecf2e77 | ||
|
|
538b8e6171 | ||
|
|
614d3aac4b | ||
|
|
ed8b3ee389 | ||
|
|
b8e9d3dbc4 | ||
|
|
1ecefb06a3 | ||
|
|
84bd8b5d28 | ||
|
|
c7450c5b17 | ||
|
|
50580e3949 | ||
|
|
cf793b05fc | ||
|
|
15e967ee65 | ||
|
|
f9d9f9c186 | ||
|
|
854adbb767 | ||
|
|
6e1c917448 | ||
|
|
792495e8f6 | ||
|
|
3c1a3f4a5f | ||
|
|
695b638862 | ||
|
|
c7c6b5e483 | ||
|
|
0fbf36f513 | ||
|
|
972e6deccd | ||
|
|
decce451ea | ||
|
|
c848023a86 | ||
|
|
6c32d52106 | ||
|
|
4cac806c32 | ||
|
|
113dcece34 | ||
|
|
a8cbf253c7 | ||
|
|
4adf1fd67f | ||
|
|
8dcbe75ebc | ||
|
|
96ac61473c | ||
|
|
ee80a448ca | ||
|
|
0d37506742 | ||
|
|
36bade6cf6 | ||
|
|
9be25fdb8d | ||
|
|
26b06888f9 | ||
|
|
d0d6b3f1be | ||
|
|
a07ce54783 | ||
|
|
8690aa9883 | ||
|
|
8debdd7b1a | ||
|
|
1cc67eff0b | ||
|
|
654d96b454 | ||
|
|
f7e7331002 | ||
|
|
d04b128303 | ||
|
|
f92ebe7eac | ||
|
|
dec402677e | ||
|
|
970450b6a8 | ||
|
|
31bfc927a3 | ||
|
|
487ed5c04a | ||
|
|
d4194dfd8a | ||
|
|
69e399c6b5 | ||
|
|
b68469ace9 | ||
|
|
425dceae9a | ||
|
|
8b13708027 | ||
|
|
90b92f88b0 | ||
|
|
c140748fee | ||
|
|
adb3e7b176 | ||
|
|
9267575064 | ||
|
|
ebb57d6085 | ||
|
|
71da0a35ce | ||
|
|
882ad61082 | ||
|
|
9f4d3e276f | ||
|
|
20b3a09285 | ||
|
|
541e6c4bf4 | ||
|
|
38103eac4c | ||
|
|
6ef43dd874 | ||
|
|
4825a2af20 | ||
|
|
95bcc714a7 | ||
|
|
524af51892 | ||
|
|
1ac2092af4 | ||
|
|
382b874bac | ||
|
|
9a5906e74a | ||
|
|
e776e6d5d5 | ||
|
|
8ffc6d9f8a | ||
|
|
0a3090ea9e | ||
|
|
a585cf5f75 | ||
|
|
fbdf94afc4 | ||
|
|
778c1d0e99 | ||
|
|
fb87d3a5e1 | ||
|
|
3660c57501 | ||
|
|
a0fa9c12c6 | ||
|
|
a617c82ee8 | ||
|
|
f76473253e | ||
|
|
edcc4e8826 | ||
|
|
ff434d8a80 | ||
|
|
ac87e01185 | ||
|
|
e04b527c1c | ||
|
|
635166161e | ||
|
|
dd2da4035e | ||
|
|
5db80ab5b6 | ||
|
|
8bd975a322 | ||
|
|
8ba75d4665 | ||
|
|
dffc96deb7 | ||
|
|
058c8c5412 | ||
|
|
485b15d560 | ||
|
|
a2f1c481e9 | ||
|
|
613dae463b | ||
|
|
8e41cbb392 | ||
|
|
c8cf19fda1 | ||
|
|
efa733d40b | ||
|
|
4ce9c6131c | ||
|
|
9c820cd559 | ||
|
|
41bb121913 | ||
|
|
86334227b0 | ||
|
|
a465241cac | ||
|
|
5a9822a67d | ||
|
|
0348cb6717 | ||
|
|
d236226156 | ||
|
|
d7288484cb | ||
|
|
2298a6cde1 | ||
|
|
8109f82dc1 | ||
|
|
43d0d3f726 | ||
|
|
bcb0a0636f | ||
|
|
da2c458d4d | ||
|
|
bea920500d | ||
|
|
5f13039edb | ||
|
|
c582ca68eb | ||
|
|
976a82eabc | ||
|
|
6bd84f882a | ||
|
|
301805dbd2 | ||
|
|
a73da31470 | ||
|
|
eee4304e9f | ||
|
|
0439529eb7 | ||
|
|
f3984baf30 | ||
|
|
c9df771d52 | ||
|
|
27bbd5ca51 | ||
|
|
ea27524cc1 | ||
|
|
86b510620f | ||
|
|
75e07238fb | ||
|
|
a40772fa18 | ||
|
|
edc01eb99e | ||
|
|
4837b0d0a9 | ||
|
|
72d04e1034 | ||
|
|
78be698597 | ||
|
|
457d821c27 | ||
|
|
fa8fceeb33 | ||
|
|
c7de04c642 | ||
|
|
8bc0596000 | ||
|
|
6816532aae | ||
|
|
8bcb001176 | ||
|
|
0a15c0ec4e | ||
|
|
fa5e1996e8 | ||
|
|
353a51fa2a | ||
|
|
be1b3d8d8f | ||
|
|
71475b2955 | ||
|
|
e7e4f48b23 | ||
|
|
5fd6676236 | ||
|
|
4c8204bf0c | ||
|
|
e1be94d5c4 | ||
|
|
93c59a4d33 | ||
|
|
c3ba05bc8a | ||
|
|
ac59d25180 | ||
|
|
bd6447e294 | ||
|
|
8983684bcd | ||
|
|
3487f96417 | ||
|
|
a5f1d7f49f | ||
|
|
468ac6f4a2 | ||
|
|
700380275d | ||
|
|
ec42bb9131 | ||
|
|
e8578d4cfb | ||
|
|
becd581829 | ||
|
|
f39f58cd17 | ||
|
|
f076ea22a4 | ||
|
|
fb6716a873 | ||
|
|
a682cd1b28 | ||
|
|
f2510baa46 | ||
|
|
05f8307657 | ||
|
|
5e3de69244 | ||
|
|
10e031d725 | ||
|
|
fc55bb6985 | ||
|
|
40c1dcf870 | ||
|
|
db84d02f82 | ||
|
|
63a735175b | ||
|
|
41693e0244 | ||
|
|
3b6dd77cd3 | ||
|
|
aec4e9fa21 | ||
|
|
ee2d885888 | ||
|
|
5d504724bd | ||
|
|
d7c7626409 | ||
|
|
2be90960f8 | ||
|
|
abd97e0b6c | ||
|
|
df301a3682 | ||
|
|
fdc1eb8fc4 | ||
|
|
80978973c3 | ||
|
|
9ea16d8a9d | ||
|
|
f4a7ddb20e | ||
|
|
2f2ce3999d | ||
|
|
e2754bf5e0 | ||
|
|
48e30df168 | ||
|
|
a0e13da37b | ||
|
|
2eb0a4e4e3 | ||
|
|
3766786473 | ||
|
|
febd8cc386 | ||
|
|
da3efa4a69 | ||
|
|
3ffaba5069 | ||
|
|
4b326c0767 | ||
|
|
45fe6e5aba | ||
|
|
95e37ca9cf | ||
|
|
85c9257585 | ||
|
|
4ed05c8a64 | ||
|
|
2160d2d794 | ||
|
|
7aa94c1f2e | ||
|
|
3ec4f4a059 | ||
|
|
0210301424 | ||
|
|
edce2f7c76 | ||
|
|
93d2e8d662 | ||
|
|
678a876e21 | ||
|
|
7c7d49d7d0 | ||
|
|
3c33a9feb2 | ||
|
|
8abca37eb2 | ||
|
|
3161f7961d | ||
|
|
561d325fce | ||
|
|
c5e9ed7ba8 | ||
|
|
48f05a3177 | ||
|
|
69839989f7 | ||
|
|
41e3520bb5 | ||
|
|
86aa00d7be | ||
|
|
b2bf8b3f97 | ||
|
|
59f226739d | ||
|
|
5df35a42cb | ||
|
|
466bd5f38e | ||
|
|
2be0ab55d0 | ||
|
|
5f97ee4d88 | ||
|
|
e0e633ba0f | ||
|
|
0513e4aa24 | ||
|
|
7e31549238 | ||
|
|
a2d091ae5e | ||
|
|
0035b2d304 | ||
|
|
5ebed72ac8 | ||
|
|
48aa53353d | ||
|
|
7a67efd112 | ||
|
|
d3e4542b19 | ||
|
|
b5ef022814 | ||
|
|
378606060c | ||
|
|
362b2c5b34 | ||
|
|
616c9d3306 | ||
|
|
27c55e3a16 | ||
|
|
eaa002c438 | ||
|
|
5719618bf4 | ||
|
|
32b1b21311 | ||
|
|
297037eaf2 | ||
|
|
7581a6f79e | ||
|
|
dc74fbbeca | ||
|
|
d1d2ca12ad | ||
|
|
48ffe33eaf | ||
|
|
700504bb8d | ||
|
|
2916890346 |
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# manually added cronscript
|
||||
cronpull.sh
|
||||
|
||||
# Ignore Visual Studio solution files.
|
||||
# Calamity uses a project file but not a solution file.
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
*.sln
|
||||
|
||||
# User-specific files
|
||||
@@ -305,4 +305,4 @@ $RECYCLE.BIN/
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
*.slnx
|
||||
/Projectiles/Ranged/BrimstoneRound.png
|
||||
@@ -1,15 +1,18 @@
|
||||
using System;
|
||||
using CalamityMod.Skies;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int CloseBGYOffset = 475;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
@@ -41,9 +44,9 @@ namespace CalamityMod.Backgrounds
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = Main.instance.screenOff;
|
||||
float scAdj = Main.instance.scAdj;
|
||||
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
@@ -77,7 +80,7 @@ namespace CalamityMod.Backgrounds
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)SkyTextureRefs.AstralDesertSurfaceMiddle.Value.Width * bgScale);
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -88,7 +91,7 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralDesertSurfaceMiddle.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralDesertSurfaceMiddle.Value.Width, SkyTextureRefs.AstralDesertSurfaceMiddle.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceMiddle.Width, CalamityMod.AstralDesertSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +99,7 @@ namespace CalamityMod.Backgrounds
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)SkyTextureRefs.AstralDesertSurfaceClose.Value.Width * bgScale);
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -110,7 +113,7 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralDesertSurfaceClose.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralDesertSurfaceClose.Value.Width, SkyTextureRefs.AstralDesertSurfaceClose.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceClose.Width, CalamityMod.AstralDesertSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
using System;
|
||||
using CalamityMod.Skies;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.GameContent.UI.States;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275;
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
@@ -42,9 +46,9 @@ namespace CalamityMod.Backgrounds
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = Main.instance.screenOff;
|
||||
float scAdj = Main.instance.scAdj;
|
||||
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
@@ -78,7 +82,7 @@ namespace CalamityMod.Backgrounds
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)SkyTextureRefs.AstralSnowSurfaceMiddle.Value.Width * bgScale);
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSnowSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -89,7 +93,7 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSnowSurfaceMiddle.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSnowSurfaceMiddle.Value.Width, SkyTextureRefs.AstralSnowSurfaceMiddle.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSnowSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSnowSurfaceMiddle.Width, CalamityMod.AstralSnowSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +101,7 @@ namespace CalamityMod.Backgrounds
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)SkyTextureRefs.AstralSurfaceClose.Value.Width * bgScale);
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -111,15 +115,15 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceClose.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceClose.Value.Width, SkyTextureRefs.AstralSurfaceClose.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceCloseGlow.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceCloseGlow.Value.Width, SkyTextureRefs.AstralSurfaceCloseGlow.Value.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
bgScale = 1.34f;
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(SkyTextureRefs.AstralSurfaceFront.Value.Width * bgScale);
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -133,8 +137,8 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceFront.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceFront.Value.Width, SkyTextureRefs.AstralSurfaceFront.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceFrontGlow.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceFrontGlow.Value.Width, SkyTextureRefs.AstralSurfaceFrontGlow.Value.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
using System;
|
||||
using CalamityMod.Skies;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
//this is just a blank background, so each custom background will draw over it
|
||||
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275; //Offsets for the height positioning. Make these 0 for backgrounds that want to be the same as treeline backgrounds (backgrounds that have the front 3 layers as trees)
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
@@ -23,17 +25,13 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
fades[i] += transitionSpeed;
|
||||
if (fades[i] > 1f)
|
||||
{
|
||||
fades[i] = 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fades[i] -= transitionSpeed;
|
||||
if (fades[i] < 0f)
|
||||
{
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,9 +44,9 @@ namespace CalamityMod.Backgrounds
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) //Taken from vanilla to draw the front 3 layers, edited to fit tmod and astral background needs
|
||||
{
|
||||
float screenOff = Main.instance.screenOff;
|
||||
float scAdj = Main.instance.scAdj;
|
||||
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); //Astral Biome Coloration with the alpha as the background fade
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
@@ -83,7 +81,7 @@ namespace CalamityMod.Backgrounds
|
||||
var bgParallax = 0.4; //The parallax of the background layer
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; //the Y position of the background
|
||||
bgScale *= bgGlobalScaleMultiplier; //Scale of the background
|
||||
var bgWidthScaled = (int)((float)SkyTextureRefs.AstralSurfaceMiddle.Value.Width * bgScale); //The Width of the bg texture scaled to the correct size
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceMiddle.Width * bgScale); //The Width of the bg texture scaled to the correct size
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); //The starting position of the background layer
|
||||
if (Main.gameMenu)
|
||||
@@ -95,8 +93,8 @@ namespace CalamityMod.Backgrounds
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
//Draw the texture and its glowmask to each loop of the texture
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceMiddle.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceMiddle.Value.Width, SkyTextureRefs.AstralSurfaceMiddle.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceMiddleGlow.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceMiddleGlow.Value.Width, SkyTextureRefs.AstralSurfaceMiddleGlow.Value.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddle.Width, CalamityMod.AstralSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddleGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddleGlow.Width, CalamityMod.AstralSurfaceMiddleGlow.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +104,7 @@ namespace CalamityMod.Backgrounds
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)SkyTextureRefs.AstralSurfaceClose.Value.Width * bgScale);
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -120,8 +118,8 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceClose.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceClose.Value.Width, SkyTextureRefs.AstralSurfaceClose.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceCloseGlow.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceCloseGlow.Value.Width, SkyTextureRefs.AstralSurfaceCloseGlow.Value.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +129,7 @@ namespace CalamityMod.Backgrounds
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(SkyTextureRefs.AstralSurfaceFront.Value.Width * bgScale);
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
@@ -145,8 +143,8 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceFront.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceFront.Value.Width, SkyTextureRefs.AstralSurfaceFront.Value.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(SkyTextureRefs.AstralSurfaceFrontGlow.Value, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, SkyTextureRefs.AstralSurfaceFrontGlow.Value.Width, SkyTextureRefs.AstralSurfaceFrontGlow.Value.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -5,42 +5,10 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralUndergroundBGStyle : ModUndergroundBackgroundStyle
|
||||
{
|
||||
private int AUBG0;
|
||||
private int AUBG1;
|
||||
private int AUBG2;
|
||||
private int AUBG3;
|
||||
|
||||
private int AUBG4_0;
|
||||
private int AUBG4_1;
|
||||
private int AUBG4_2;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
AUBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG0");
|
||||
AUBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG1");
|
||||
AUBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG2");
|
||||
AUBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG3");
|
||||
|
||||
AUBG4_0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG4_0");
|
||||
AUBG4_1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG4_1");
|
||||
AUBG4_2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG4_2");
|
||||
}
|
||||
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
textureSlots[0] = AUBG0;
|
||||
textureSlots[1] = AUBG1;
|
||||
textureSlots[2] = AUBG2;
|
||||
textureSlots[3] = AUBG3;
|
||||
textureSlots[4] = Main.hellBackStyle switch
|
||||
{
|
||||
0 => AUBG4_0,
|
||||
1 => AUBG4_1,
|
||||
_ => AUBG4_2
|
||||
};
|
||||
for (int i = 0; i <= 4; i++)
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot(i == 4 ? "CalamityMod/Backgrounds/AstralUG" + i.ToString() + "_" + Main.hellBackStyle : "CalamityMod/Backgrounds/AstralUG" + i.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
@@ -1,33 +1,13 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class SunkenSeaBGStyle : ModUndergroundBackgroundStyle
|
||||
{
|
||||
private int SSBG0;
|
||||
private int SSBG1;
|
||||
private int SSBG2;
|
||||
private int SSBG3;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG0");
|
||||
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG1");
|
||||
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG2");
|
||||
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG3");
|
||||
}
|
||||
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
textureSlots[0] = SSBG0;
|
||||
textureSlots[1] = SSBG1;
|
||||
textureSlots[2] = SSBG2;
|
||||
textureSlots[3] = SSBG3;
|
||||
|
||||
for (int i = 0; i <= 3; i++)
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG" + i.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,385 +0,0 @@
|
||||
using CalamityMod.Graphics;
|
||||
using CalamityMod.Systems.Graphic;
|
||||
using CalamityMod.Utilities.Daybreak.Buffers;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class SunkenSeaBurrowsBG : ModSystem
|
||||
{
|
||||
private static RenderTargetLease WaterDistortionTarget;
|
||||
|
||||
private static bool CurrentlyRendering { get; set; }
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GeneralDrawLayerSystem.OnPrepareDraw += DrawToTarget;
|
||||
On_Main.DrawBackgroundBlackFill += On_Main_DrawBackgroundBlackFill;
|
||||
|
||||
Main.QueueMainThreadAction(() => WaterDistortionTarget = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice));
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
GeneralDrawLayerSystem.OnPrepareDraw -= DrawToTarget;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This code runs because there is a system in vanilla that causes backgrounds to not draw if lighting is too low.
|
||||
/// That would be fine, the problem arises because sloped tiles still block light the same way normal tiles do.
|
||||
/// Which means that the background will occasionally be blocked by slopes as though said slopes were full squares.
|
||||
/// This is a hacky method that sets the light level of every sloped tile *AT LEAST* high enough to render the background while in the Burrows.
|
||||
///
|
||||
/// ENNWAY's note:
|
||||
/// if this doesn't get fixed in 1.4.5 i am throwing really big rocks at unsuspecting re logic employees
|
||||
/// </summary>
|
||||
public override void PreUpdatePlayers()
|
||||
{
|
||||
if (!Main.dedServ && Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == WallID.None)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == WallID.None &&
|
||||
Main.tile[pos.X, pos.Y].LiquidAmount == 0)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == WallID.None)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == WallID.None)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.BasaltGullyBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (pos.Y >= Main.maxTilesY - 450)
|
||||
{
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == WallID.None)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.Red, 0.6f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToTarget()
|
||||
{
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CurrentlyRendering = true;
|
||||
|
||||
using (WaterDistortionTarget.Scope(clearColor: Color.Transparent))
|
||||
{
|
||||
// 13MAY2025: fryzahh: Note that when other Sunken Sea backgrounds are implemented they should use this same system.
|
||||
// Leaving this here for other programmers, in case I don't get to doing this myself.
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, CalamityUtils.BackgroundMatrix);
|
||||
|
||||
DrawShoresBG();
|
||||
DrawBurrowsBG();
|
||||
|
||||
Main.spriteBatch.End();
|
||||
}
|
||||
|
||||
CurrentlyRendering = false;
|
||||
}
|
||||
|
||||
private void On_Main_DrawBackgroundBlackFill(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
|
||||
{
|
||||
if (Main.gameMenu || Main.screenPosition.Y + Main.screenHeight < ((int)Main.worldSurface) * 16f)
|
||||
{
|
||||
orig(self);
|
||||
return;
|
||||
}
|
||||
|
||||
orig(self);
|
||||
|
||||
// This won't render if the Wave Quality setting isn't turned off unfortunately, so don't bother running any of the shader
|
||||
// rendering code if that setting is on.
|
||||
if (Main.WaveQuality > 0 || !CalamityClientConfig.Instance.SunkenSeaBackgroundDistortion)
|
||||
{
|
||||
DrawShoresBG();
|
||||
DrawBurrowsBG();
|
||||
}
|
||||
else
|
||||
{
|
||||
MiscShaderData distortionShader = GameShaders.Misc["CalamityMod:BasicTextureDistortion"];
|
||||
Asset<Texture2D> distortionTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/Swirls");
|
||||
|
||||
// Apply a distortion shader to the Sunken Sea backgrounds to give them an underwater ripple-like effect.
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, distortionShader.Shader, CalamityUtils.BackgroundMatrix);
|
||||
|
||||
float distortionXSpeed = -0.012f;
|
||||
float distortionYSpeed = 0.02f;
|
||||
float noiseScale = 0.075f;
|
||||
float noiseStrength = 0.035f;
|
||||
|
||||
distortionShader.Shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly);
|
||||
distortionShader.Shader.Parameters["noiseScale"].SetValue(noiseScale);
|
||||
distortionShader.Shader.Parameters["distortionStrength"].SetValue(noiseStrength);
|
||||
distortionShader.Shader.Parameters["timeOffset"].SetValue(new Vector2(distortionXSpeed, distortionYSpeed));
|
||||
Main.graphics.GraphicsDevice.Textures[1] = distortionTexture.Value;
|
||||
Main.graphics.GraphicsDevice.SamplerStates[1] = SamplerState.LinearWrap;
|
||||
|
||||
Main.spriteBatch.Draw(WaterDistortionTarget.Target, new Rectangle(16, 16, Main.screenWidth, Main.screenHeight), Color.White);
|
||||
}
|
||||
}
|
||||
|
||||
public static float Transparency;
|
||||
public static float TransitionSpeed => 0.02f;
|
||||
|
||||
private static void DrawShoresBG()
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()))
|
||||
{
|
||||
Transparency += 1f;
|
||||
|
||||
if (Transparency > 1f)
|
||||
Transparency = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
|
||||
Transparency -= 1f;
|
||||
|
||||
if (Transparency < 0f)
|
||||
Transparency = 0f;
|
||||
}
|
||||
|
||||
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
|
||||
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
|
||||
if (Transparency > 0f && Main.BackgroundEnabled)
|
||||
{
|
||||
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
|
||||
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
|
||||
float Scale = 1.5f;
|
||||
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
|
||||
|
||||
for (int Layers = 4; Layers >= 0; Layers--)
|
||||
{
|
||||
// Get each background texture.
|
||||
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaShoresBG" + Layers).Value;
|
||||
|
||||
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
|
||||
float num2 = (Layers * 2 + 3f);
|
||||
Vector2 vector3 = new Vector2(1f / num2);
|
||||
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
|
||||
Vector2 zero = Vector2.Zero;
|
||||
|
||||
switch (Layers)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
zero.Y += 200f;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vector2 *= Scale;
|
||||
|
||||
zero.Y -= num;
|
||||
float LoopWidth = Scale * rectangle.Width;
|
||||
float LoopHeight = Scale * rectangle.Height;
|
||||
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
|
||||
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
|
||||
{
|
||||
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
|
||||
{
|
||||
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
|
||||
|
||||
var frame = rectangle;
|
||||
var color = Color.White * Transparency;
|
||||
|
||||
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void DrawBurrowsBG()
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
|
||||
{
|
||||
Transparency += 1f;
|
||||
|
||||
if (Transparency > 1f)
|
||||
Transparency = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
|
||||
Transparency -= 1f;
|
||||
|
||||
if (Transparency < 0f)
|
||||
Transparency = 0f;
|
||||
}
|
||||
|
||||
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
|
||||
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
|
||||
if (Transparency > 0f && Main.BackgroundEnabled)
|
||||
{
|
||||
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
|
||||
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
|
||||
float Scale = 1.5f;
|
||||
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
|
||||
|
||||
for (int Layers = 4; Layers >= 0; Layers--)
|
||||
{
|
||||
// Get each background texture.
|
||||
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaBurrowsBG" + Layers).Value;
|
||||
|
||||
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
|
||||
float num2 = (Layers * 2 + 3f);
|
||||
Vector2 vector3 = new Vector2(1f / num2);
|
||||
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
|
||||
Vector2 zero = Vector2.Zero;
|
||||
|
||||
switch (Layers)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
zero.Y += 800f;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
zero.Y += 200f;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
zero.Y += 450f;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
zero.Y += 45f;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
zero.Y += 45f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vector2 *= Scale;
|
||||
|
||||
zero.Y -= num;
|
||||
float LoopWidth = Scale * rectangle.Width;
|
||||
float LoopHeight = Scale * rectangle.Height;
|
||||
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
|
||||
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
|
||||
{
|
||||
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
|
||||
{
|
||||
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
|
||||
|
||||
var frame = rectangle;
|
||||
var color = Color.White * Transparency;
|
||||
|
||||
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
@@ -1,13 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.NormalNPCs.HorribleHog;
|
||||
using CalamityMod.NPCs.ExoMechs.Apollo;
|
||||
using CalamityMod.NPCs.ExoMechs.Artemis;
|
||||
using CalamityMod.NPCs.OldDuke;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
@@ -18,7 +19,6 @@ using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -26,18 +26,19 @@ using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Balancing
|
||||
{
|
||||
public sealed class BalancingChangesManager : ModSystem
|
||||
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
|
||||
public static class BalancingChangesManager
|
||||
{
|
||||
internal static List<IBalancingRule[]> UniversalBalancingChanges = null;
|
||||
internal static List<NPCBalancingChange> NPCSpecificBalancingChanges = null;
|
||||
|
||||
// Balancing changes in this method are sorted based on place in progression, NPC name (from A-Z), and strength of resistance in ascending order, in that level of priority.
|
||||
// For ease of change, changes that are not exclusive to one specific weapon are not bundled into one line if they share the same resistance factor.
|
||||
// To give an example of this, Thanatos having a 50% resist to Chicken Cannon and Rancor should be two distinct lines with a 0.5x factor instead of hamfisting them all into
|
||||
// one single resist that may have to be split later.
|
||||
public override void SetStaticDefaults()
|
||||
// To give an example of this, Thanatos having a 50% resist to Chicken Cannon and Prismatic Breaker should be two distinct lines with a 0.5x factor instead of hamfisting them all
|
||||
// into one single resist that may have to be split later.
|
||||
internal static void Load()
|
||||
{
|
||||
// Dirty shorthand for true melee resists, because they're super common and other class resists aren't.
|
||||
// If you add/change a true melee resist here, be sure to add/change the resist in CalamityGlobalNPC ModifyHitByItem as well.
|
||||
IBalancingRule ResistTrueMelee(float f) => new ClassResistBalancingRule(f, TrueMeleeDamageClass.Instance);
|
||||
|
||||
// Declare specific filters.
|
||||
@@ -47,121 +48,173 @@ namespace CalamityMod.Balancing
|
||||
bool DragonRageFilter(Projectile p) =>
|
||||
p.type == ProjectileType<DragonRageStaff>() || p.type == ProjectileType<DragonRageFireball>() || (p.type == ProjectileType<FuckYou>() && p.CountsAsClass<MeleeDamageClass>());
|
||||
|
||||
// bool MonkStaffT3Filter(Projectile p) =>
|
||||
// p.type == ProjectileID.MonkStaffT3_AltShot || (p.type == ProjectileID.Electrosphere && Main.player[p.owner].ActiveItem().type == ItemID.MonkStaffT3);
|
||||
|
||||
bool MushroomSpearFilter(Projectile p) =>
|
||||
p.type == ProjectileID.Mushroom && Main.player[p.owner].ActiveItem().type == ItemID.MushroomSpear;
|
||||
|
||||
bool SpectreMaskSetBonusFilter(Projectile p) =>
|
||||
p.type == ProjectileID.SpectreWrath && Main.player[p.owner].ghostHurt;
|
||||
|
||||
bool AotCThrowCombo(Projectile p) =>
|
||||
p.type == ProjectileType<ArkoftheCosmosSwungBlade>() && (p.ai[0] == 2 || p.ai[0] == 3);
|
||||
|
||||
bool HiveBeeFilter(Projectile p) =>
|
||||
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].HeldItem.type == ItemType<TheHive>();
|
||||
UniversalBalancingChanges = new List<IBalancingRule[]>()
|
||||
{
|
||||
// Nerf Crystal bullet shards by 45%
|
||||
// Currently crystal bullet projectiles deal 50% of the bullet's damage which is absurd in vanilla, this nerfs them to 27.5%
|
||||
Do(new ProjectileResistBalancingRule(0.55f, ProjectileID.CrystalShard)),
|
||||
|
||||
// Nerf Luminite Arrow trails by 50%.
|
||||
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.MoonlordArrowTrail)),
|
||||
|
||||
// Nerf Seedler seeds by 25%.
|
||||
Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SeedlerNut, ProjectileID.SeedlerThorn)),
|
||||
|
||||
// Nerf Cursed Dart flames by 50%.
|
||||
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CursedDartFlame)),
|
||||
|
||||
// Nerf Mushroom Spear projectiles by 50%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, MushroomSpearFilter)),
|
||||
|
||||
// Nerf Spectre Mask set bonus projectiles by 30%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.7f, SpectreMaskSetBonusFilter)),
|
||||
|
||||
};
|
||||
|
||||
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
|
||||
|
||||
// ENEMIES
|
||||
#region Horrible Hog
|
||||
// Take 300% damage from Finch Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<HorribleHog>(), Do(new ProjectileResistBalancingRule(3f, ProjectileID.BabyBird))));
|
||||
#region Desert Scourge
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DesertScourgeIDs, Do(ResistTrueMelee(0.5f))));
|
||||
#endregion
|
||||
|
||||
// BOSSES
|
||||
#region Crabulon
|
||||
// 20% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Crabulon>(), ResistTrueMelee(0.8f)));
|
||||
#endregion
|
||||
|
||||
#region Eater of Worlds
|
||||
// 55% resist to Lemon 'nade
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<LemonNadeProjectile>()))));
|
||||
|
||||
// 50% resist to Demon Scythe.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
|
||||
|
||||
// 40% resist to Sky Glaze.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
|
||||
|
||||
// 25% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(ResistTrueMelee(0.75f))));
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Crabulon>(), ResistTrueMelee(0.5f)));
|
||||
#endregion
|
||||
|
||||
#region Brain of Cthulhu: Creepers
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Demon Scythe.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
|
||||
#endregion
|
||||
|
||||
// 25% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.75f))));
|
||||
#region Eater of Worlds
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Demon Scythe.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
|
||||
|
||||
// 40% resist to Sky Glaze.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
|
||||
#endregion
|
||||
|
||||
#region The Perforators
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Perforators, Do(ResistTrueMelee(0.5f))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.PerforatorIDs, Do(ResistTrueMelee(0.5f))));
|
||||
#endregion
|
||||
|
||||
#region Wall of Flesh
|
||||
// 50% resist to Staff of Necrosteocytes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(new List<int> { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<SmallSkeletonMinion>()))));
|
||||
// 40% resist to Corro/Crimslime Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CrimslimeMinion>(), ProjectileType<CorroslimeMinion>()))));
|
||||
#endregion
|
||||
|
||||
#region Aquatic Scourge
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(ResistTrueMelee(0.5f))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Adamantite Throwing Axe's lightning.
|
||||
// Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
|
||||
// 50% resist to Mounted Scanner.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
|
||||
|
||||
// 40% resist to Cryophobia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
|
||||
|
||||
// 40% resist to SHPC.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<SHPExplosion>()))));
|
||||
|
||||
// 30% resist to Meowthrower.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
|
||||
|
||||
// 25% resist to Snowstorm Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
|
||||
#endregion
|
||||
|
||||
#region The Destroyer
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(ResistTrueMelee(0.5f))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Adamantite Throwing Axe's lightning.
|
||||
// See Aquatic Scourge comment.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
|
||||
// 50% resist to Aftershock's rocks.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
|
||||
|
||||
// 50% resist to Avalanche's Ice Bombs and shards.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
|
||||
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
|
||||
// 45% resist to Mounted Scanner.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
|
||||
|
||||
// 30% resist to Meowthrower.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
|
||||
// 40% resist to Meowthrower.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<MeowFire>()))));
|
||||
|
||||
// 25% resist to Avalanche's Ice Bombs and shards.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
|
||||
// 25% resist to SHPC.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<SHPExplosion>()))));
|
||||
|
||||
// 25% resist to Snowstorm Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
|
||||
#endregion
|
||||
|
||||
#region Astrum Aureus
|
||||
// 25% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), ResistTrueMelee(0.75f)));
|
||||
// 30% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
|
||||
#endregion
|
||||
|
||||
// 25% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<BallistaGreatArrow>()))));
|
||||
#region Ravager
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 15% resist to Dryad's Tears.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<DryadsTearMain>(), ProjectileType<DryadsTearBurst>()))));
|
||||
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
|
||||
// 50% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 25% resist to Lucrecia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
|
||||
|
||||
// 20% resist to The Hive.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
|
||||
#endregion
|
||||
|
||||
#region Duke Fishron
|
||||
// 20% vulnerability to The Hive's bees.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileSpecificRequirementBalancingRule(1.2f, HiveBeeFilter))));
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.2f, ProjectileType<BasicPlagueBee>()))));
|
||||
|
||||
// 25% vulnerability to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.25f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
@@ -175,23 +228,6 @@ namespace CalamityMod.Balancing
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.HallowBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlagueTaintedDrone>()))));
|
||||
#endregion
|
||||
|
||||
#region Ravager
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
// 20% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 20% resist to The Hive.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
|
||||
#endregion
|
||||
|
||||
#region Lunatic Cultist
|
||||
// 50% resist to Aegis Blade's explosions.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
@@ -208,43 +244,37 @@ namespace CalamityMod.Balancing
|
||||
|
||||
#region Astrum Deus
|
||||
// 75% resist to Plaguenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
|
||||
|
||||
// 70% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 70% resist to Charged Blaster Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
|
||||
|
||||
// 60% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 55% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(ResistTrueMelee(0.5f))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Atlantis (Atlantis gaming!).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
|
||||
// 35% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 50% resist to Charged Blaster Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.ChargedBlasterLaser))));
|
||||
// 35% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 45% resist to Duststorm in a Bottle.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<DuststormCloud>(), ProjectileType<DuststormCloudExplosion>(), ProjectileType<DuststormInABottleProj>()))));
|
||||
|
||||
// 35% resist to Aerial Bane.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 25% resist to Solar Eruption.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SolarWhipSword, ProjectileID.SolarWhipSwordExplosion))));
|
||||
|
||||
// 20% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 20% resist to Cluster Rocket fragments.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
|
||||
// 20% resist to Cluster Fragments.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
|
||||
#endregion
|
||||
|
||||
#region Moon Lord
|
||||
// 20% resist to Mercurial Tides (True Biome Blade).
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<MercurialTides>(), ProjectileType<MercurialTidesMonolith>(), ProjectileType<MercurialTidesBlast>()))));
|
||||
|
||||
// 20% resist to The Hive's nuke.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>()))));
|
||||
#endregion
|
||||
@@ -255,7 +285,10 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Providence
|
||||
// 35% resist to Vanishing Point. This thing desperately needs a rework.
|
||||
// 80% resist to Hell's Sun.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Providence>(), new ProjectileResistBalancingRule(0.2f, ProjectileType<HellsSunProj>())));
|
||||
|
||||
// 35% resist to Elemental Lance. This thing desperately needs a rework.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Providence>(), new ProjectileResistBalancingRule(0.65f, ProjectileType<SpatialSpear>(), ProjectileType<SpatialSpear2>(), ProjectileType<SpatialSpear3>(), ProjectileType<SpatialSpear4>())));
|
||||
#endregion
|
||||
|
||||
@@ -263,180 +296,212 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), ResistTrueMelee(0.5f)));
|
||||
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
|
||||
#region Storm Weaver
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(ResistTrueMelee(0.5f))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Last Prism.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
|
||||
// 50% resist to Dazzling Stabber Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
|
||||
|
||||
// 50% resist to Legion of Celestia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
|
||||
// 50% resist to Elemental Axe.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ElementalAxeMinion>()))));
|
||||
|
||||
// 50% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
|
||||
|
||||
// 50% resist to Tactician's Trump Card's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
|
||||
|
||||
// 40% resist to Devil's Sunrise's slashes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<DevilsSunriseProj>()))));
|
||||
// 25% resist to Molten Amputator's blobs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<MoltenBlobThrown>()))));
|
||||
#endregion
|
||||
|
||||
// 35% resist to Event Horizon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
|
||||
|
||||
// 35% resist to King of Constellations, Tenryu.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BlackDragonHead>(), ProjectileType<BlackDragonBody>(), ProjectileType<BlackDragonTail>(), ProjectileType<WhiteDragonHead>(), ProjectileType<WhiteDragonBody>(), ProjectileType<WhiteDragonTail>()))));
|
||||
|
||||
// 20% resist to Dazzling Stabber Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<DazzlingStabber>()))));
|
||||
#region Old Duke
|
||||
// 20% resist to Time Bolt.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<OldDuke>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<TimeBoltKnife>())));
|
||||
#endregion
|
||||
|
||||
#region The Devourer of Gods
|
||||
// 65% resist to Wave Pounder.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
|
||||
// 80% resist to Wave Pounder.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.2f, ProjectileType<WavePounderBoom>()))));
|
||||
|
||||
// 60% resist to Corinth Prime's grenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<CorinthPrimeAirburst>()))));
|
||||
// 50% resist to Eidolic Wail.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<EidolicWailSoundwave>()))));
|
||||
|
||||
// 50% resist to Stratus Sphere
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<StratusBlackHole>()))));
|
||||
|
||||
// 35% resist to Sulphuric Acid Cannon's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
|
||||
// 35% resist to Venusian Trident's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<VenusianBolt>(), ProjectileType<VenusianExplosion>()))));
|
||||
|
||||
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
|
||||
|
||||
// 15% vulnerability to Time Bolt stealth strikes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
|
||||
#endregion The Devourer of Gods
|
||||
|
||||
#region Yharon
|
||||
// 15% resist to Time Bolt.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Yharon>(), Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<TimeBoltKnife>()))));
|
||||
#endregion
|
||||
|
||||
#region Exo Mechs: Ares
|
||||
// 35% resist to Devil's Devastation's slash.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 30% resist to Dynamic Pursuer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
// 25% resist to Aetherflux Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
|
||||
|
||||
// 20% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
|
||||
|
||||
// 20% resist to Dragon Rage projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
|
||||
|
||||
// 20% resist to Eclipse's Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
// 20% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 20% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 20% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
|
||||
#endregion
|
||||
|
||||
#region Exo Mechs: Artemis and Apollo
|
||||
// Artemis and Apollo have to be defined here because they aren't a pre-existing list.
|
||||
// TODO -- NPC sets (mostly worm bosses) should probably be their own holding class.
|
||||
// Commented out since they currently have no resists.
|
||||
// int[] exoTwins = new int[] { NPCType<Artemis>(), NPCType<Apollo>() };
|
||||
int[] exoTwins = new int[] { NPCType<Artemis>(), NPCType<Apollo>() };
|
||||
|
||||
// 10% resist to Eclipse's Fall's mini spears.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(exoTwins, Do(new ProjectileResistBalancingRule(0.9f, ProjectileType<EclipsesSmol>()))));
|
||||
#endregion
|
||||
|
||||
#region Exo Mechs: Thanatos
|
||||
// 65% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(ResistTrueMelee(0.35f))));
|
||||
|
||||
// 65% resist to The Final Dawn's lunge.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
|
||||
|
||||
// 65% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
|
||||
|
||||
// 65% resist to The Enforcer's projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
|
||||
|
||||
// 65% resist to The Final Dawn's lunge.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
|
||||
|
||||
// 60% resist to Dynamic Pursuer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
// 50% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
|
||||
|
||||
// 50% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 50% resist to Tarragon Throwing Dart's thorns. (LOL)
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TarraThornRight>()))));
|
||||
|
||||
// 50% resist to Omicron's beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
|
||||
|
||||
// 50% resist to Vehemence's skulls.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
|
||||
|
||||
// 50% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 45% resist to Wrathwing's stealth strike fireballs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
|
||||
|
||||
// 40% resist to Eclipse's Fall
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<EclipsesFall_Javelin>()))));
|
||||
// 35% resist to Prismatic Breaker's laser beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 40% resist to Omicron's beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<OmicronBeam>()))));
|
||||
// 30% resist to Eclipse's Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
// 35% resist to Prismatic Breaker's deathray.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<PrismaticRay>()))));
|
||||
// 30% resist to Sirius.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
|
||||
|
||||
// 30% resist to Ultima's rays.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
|
||||
|
||||
// 30% resist to Dragon Scales and The Wand's tornadoes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
|
||||
|
||||
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
|
||||
|
||||
// 25% resist to Dragon Rage projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
|
||||
|
||||
// 25% resist to Gael's Greatsword's big skulls.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
|
||||
|
||||
// 25% resist to Mirror of Kalandra's Paradoxica minion.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
|
||||
|
||||
// 25% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
|
||||
|
||||
// 20% resist to The Anomaly's Nanogun's bomb explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
|
||||
|
||||
// 20% resist to Ariane's aura (Lilies of Finality).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
|
||||
|
||||
// 20% resist to Mirror of Kalandra's Paradoxica minion.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<Paradoxica>()))));
|
||||
// 20% resist to Blood Boiler.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BloodBoilerFire>()))));
|
||||
|
||||
// 20% resist to Eradicator's beams.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
|
||||
|
||||
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
|
||||
|
||||
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
|
||||
|
||||
// 15% resist to The Final Dawn's AoE sweep flames.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
|
||||
|
||||
// 15% resist to God Slayer Slugs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
|
||||
|
||||
// 15% resist to Gruesome Eminence.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
|
||||
|
||||
// 15% resist to Ultima's rays.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<UltimaRay>()))));
|
||||
// 15% resist to Luminite Bullets.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileID.MoonlordBullet))));
|
||||
#endregion
|
||||
|
||||
#region Supreme Calamitas: Brimstone Hearts
|
||||
// 34% resist to Celestus' mini scythes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.66f, ProjectileType<CelestusMiniScythe>())));
|
||||
|
||||
// 30% resist to Supernova.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
// 30% resist to Surge Driver's alt click comets.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismComet>())));
|
||||
|
||||
// 30% resist to Supernova
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
// 20% resist to Executioner's Blade stealth strikes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<ExecutionersBladeStealthProj>())));
|
||||
#endregion
|
||||
|
||||
#region Supreme Calamitas: Soul Seekers
|
||||
// 80% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.2f, ProjectileType<ChickenExplosion>())));
|
||||
// 85% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.15f, ProjectileType<ChickenExplosion>())));
|
||||
|
||||
// 40% resist to Subsuming Vortex.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<ExoVortex>(), ProjectileType<ExoVortex2>(), ProjectileType<EnormousConsumingVortex>())));
|
||||
// 50% resist to Subsuming Vortex.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<ExoVortex>(), ProjectileType<ExoVortex2>(), ProjectileType<EnormousConsumingVortex>())));
|
||||
|
||||
// 40% resist to Supernova.
|
||||
// 40% resist to Supernova
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
// 30% resist to Zenith.
|
||||
@@ -444,17 +509,40 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 25% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.75f, ProjectileType<YharimsCrystalBeam>())));
|
||||
|
||||
// 10% resist to Celestus.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.9f, ProjectileType<CelestusProj>(), ProjectileType<CelestusMiniScythe>())));
|
||||
|
||||
// 10% resist to Executioner's Blade stealth strikes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.9f, ProjectileType<ExecutionersBladeStealthProj>())));
|
||||
|
||||
// 10% resist to Surge Driver's alt click comets.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.9f, ProjectileType<PrismComet>())));
|
||||
|
||||
// 15% vulnerability to The Atom Splitter. (Yes, this is kinda weird, but it's what Piky asked for).
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(1.15f, ProjectileType<TheAtomSplitterProjectile>(), ProjectileType<TheAtomSplitterDuplicate>())));
|
||||
#endregion
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
internal static void Unload()
|
||||
{
|
||||
UniversalBalancingChanges = null;
|
||||
NPCSpecificBalancingChanges = null;
|
||||
}
|
||||
|
||||
public static void ApplyFromProjectile(NPC npc, ref NPC.HitModifiers modifiers, Projectile proj)
|
||||
{
|
||||
// Apply NPC-specific balancing rules.
|
||||
// Apply universal balancing rules.
|
||||
foreach (IBalancingRule[] balancingRules in UniversalBalancingChanges)
|
||||
{
|
||||
foreach (IBalancingRule balancingRule in balancingRules)
|
||||
{
|
||||
if (balancingRule.AppliesTo(npc, modifiers, proj))
|
||||
balancingRule.ApplyBalancingChange(npc, ref modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
// As well as rules specific to NPCs.
|
||||
foreach (NPCBalancingChange balanceChange in NPCSpecificBalancingChanges)
|
||||
{
|
||||
if (npc.type != balanceChange.NPCType)
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
public static class BalancingConstants
|
||||
{
|
||||
#region Movement
|
||||
// When the relevant config is enabled: Multiplies the player's movement speed by 1.5x at all times
|
||||
internal static readonly float DefaultMoveSpeedBoost = 1.5f;
|
||||
// When the relevant config is enabled: Gives the player a substantial +50% move speed boost at all times
|
||||
internal static readonly float DefaultMoveSpeedBoost = 0.5f;
|
||||
|
||||
// When the relevant config is enabled: Increases the player's base jump speed by 13.97% (allows you to jump 7 blocks)
|
||||
internal static readonly float ConfigBoostedBaseJumpSpeed = 5.71f; // vanilla = 5.01f
|
||||
// When the relevant config is enabled: Increases the player's base jump height by 10%
|
||||
internal static readonly float ConfigBoostedBaseJumpHeight = 5.51f; // vanilla = 5.01f
|
||||
|
||||
// When the relevant config is enabled: Allows the player to hold the Down button (S by default) to fast fall.
|
||||
// This is the multiplier for the player's gravity (downwards acceleration) while holding Down.
|
||||
@@ -21,8 +21,7 @@
|
||||
internal const float VanillaFrogLegJumpSpeedBoost = 1.6f;
|
||||
|
||||
// Altered jump speed boost provided by Amphibian Boots via global item UpdateAccessory
|
||||
//doze 23apr2025 - Undid nerf, it's now the same as frog leg. If it's a problem, maybe retier it?
|
||||
internal static readonly float AmphibianBootsJumpSpeedBoost = 1.6f;
|
||||
internal static readonly float AmphibianBootsJumpSpeedBoost = 1f;
|
||||
|
||||
// Altered movement stats provided by Shadow Armor via IL edit
|
||||
// This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions.
|
||||
@@ -33,7 +32,7 @@
|
||||
|
||||
// Altered run acceleration multiplier provided by Soaring Insignia via IL edit
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float SoaringInsigniaRunAccelerationMultiplier = 1.25f; // Vanilla = 1.75f
|
||||
internal const float SoaringInsigniaRunAccelerationMultiplier = 1.1f; // Vanilla = 1.75f
|
||||
#endregion
|
||||
|
||||
#region Immunity Frames
|
||||
@@ -51,7 +50,6 @@
|
||||
#region Dashes and Dodges
|
||||
// Dash cooldowns (in frames)
|
||||
internal const int UniversalDashCooldown = 30;
|
||||
internal const int UniversalSashDashCooldown = 30;
|
||||
internal const int UniversalShieldSlamCooldown = 30;
|
||||
internal const int UniversalShieldBonkCooldown = 30;
|
||||
internal const int OnShieldBonkCooldown = 30;
|
||||
@@ -62,18 +60,20 @@
|
||||
internal const int SolarFlareIFrames = 12;
|
||||
internal const float SolarFlareBaseDamage = 400f;
|
||||
|
||||
/// <summary>
|
||||
/// How long the dodge cooldown is at maximum damage
|
||||
/// </summary>
|
||||
internal static readonly int DodgeCooldownMax = 5400; // 90 seconds
|
||||
/// <summary>
|
||||
/// How much the dodge cooldown is reduced when at minimum damage
|
||||
/// </summary>
|
||||
internal static float DodgeCooldownDamageMult => 0.33f; // 30 seconds
|
||||
/// <summary>
|
||||
/// How much the dodge cooldown is reduced per stacked dodge. Each stack applies multiplicatively.
|
||||
/// </summary>
|
||||
internal static float DodgeCooldownMultPerStack => 0.85f; // -15% per stack, multiplicatively
|
||||
// Dodge cooldowns (in frames)
|
||||
// TODO -- Some of these could be moved to the respective item files
|
||||
internal static readonly int BeltDodgeCooldownMin = 900;
|
||||
internal static readonly int BeltDodgeCooldownMax = 5400;
|
||||
internal static readonly int BrainDodgeCooldownMin = 900;
|
||||
internal static readonly int BrainDodgeCooldownMax = 5400;
|
||||
internal static readonly int AmalgamDodgeCooldownMin = 900;
|
||||
internal static readonly int AmalgamDodgeCooldownMax = 5400;
|
||||
internal static readonly int MirrorDodgeCooldownMin = 900;
|
||||
internal static readonly int MirrorDodgeCooldownMax = 5400;
|
||||
internal static readonly int DaedalusReflectCooldownMin = 900;
|
||||
internal static readonly int DaedalusReflectCooldownMax = 5400;
|
||||
internal static readonly int EvolutionReflectCooldownMin = 900;
|
||||
internal static readonly int EvolutionReflectCooldownMax = 5400;
|
||||
#endregion
|
||||
|
||||
#region Damage
|
||||
@@ -115,22 +115,54 @@
|
||||
#endregion
|
||||
|
||||
#region Life Steal
|
||||
// Life steal cap (Maximum HP healed per instance of lifesteal)
|
||||
// Life steal cap
|
||||
internal static readonly int LifeStealCap = 100;
|
||||
|
||||
// Life steal accessories require a more strict cooldown due to their ease of use and global application
|
||||
internal static readonly float LifeStealAccessoryCooldownMultiplier = 3f;
|
||||
|
||||
// Base life steal caps from vanilla (aka, how much life steal the player is allowed before it goes on cooldown)
|
||||
internal static readonly float LifeStealCap_Classic = 80f;
|
||||
internal static readonly float LifeStealCap_Expert = 70f;
|
||||
// Life steal cooldown multipliers used for armor set bonuses
|
||||
internal static readonly float LifeStealSetBonusCooldownMultiplier = 2f;
|
||||
internal static readonly float LifeStealReaverTankCooldownMultiplier = 4f;
|
||||
|
||||
// The range was buffed in vanilla from 1200 to 3000 in 1.4.4, and I agree with that decision
|
||||
internal static readonly float LifeStealRange = 3000f;
|
||||
|
||||
// Life steal caps (aka, how much life steal the player is allowed before it goes on cooldown)
|
||||
internal static readonly float LifeStealCap_Classic = 60f;
|
||||
internal static readonly float LifeStealCap_Expert = 50f;
|
||||
internal static readonly float LifeStealCap_Revengeance = 40f;
|
||||
internal static readonly float LifeStealCap_Death = 30f;
|
||||
|
||||
// Master nerfs the life steal cap by 10, resulting in 40 in non-Rev Master, 30 in Rev Master, and 20 in Death Master
|
||||
internal static readonly float LifeStealCapReduction_Master = 10f;
|
||||
|
||||
// The base life steal cooldowns from vanilla
|
||||
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
||||
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.15 (36 HP/s to 9 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.45f;
|
||||
// The calculations below show the time (in frames) for 10 life steal cooldown to recover in each difficulty
|
||||
// Classic: 10 / 0.2 = 50
|
||||
// Expert: 10 / 0.15 = 66.667
|
||||
// Revengeance: 10 / 0.125 = 80
|
||||
// Death: 10 / 0.1 = 100
|
||||
// Master: 10 / 0.1 = 100
|
||||
// Revengeance Master: 10 / 0.075 = 133.333
|
||||
// Death Master: 10 / 0.05 = 200
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6/s to 0.2/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.1 (30 HP/s to 6 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.4f;
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5/s to 0.15/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Revengeance from 0.5/s to 0.125/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Revengeance = 0.375f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Death from 0.5/s to 0.1/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Death = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Master by 0.05/s, resulting in 0.1/s in non-Rev Master, 0.075/s in Rev Master, and 0.05/s in Death Master
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Master = 0.05f;
|
||||
#endregion
|
||||
|
||||
#region Rogue Base Stats
|
||||
@@ -209,16 +241,6 @@
|
||||
internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting.
|
||||
#endregion
|
||||
|
||||
#region Pierce Resistance
|
||||
// Both of the below variables only apply when an NPC has universal pierce resistance enabled via attribute.
|
||||
// Projectiles may be marked as exempt from this pierce resistance by using an attribute.
|
||||
|
||||
/// <summary> Constant variable used to determine the percentage a projectile's damage is reduced by pierce resist on each hit. </summary>
|
||||
public const float PierceResistHarshness = 0.12f;
|
||||
/// <summary> Constant variable used to determine the maximum percentage a projectile's damage can be reduced by pierce resist. </summary>
|
||||
public const float PierceResistCap = 0.8f;
|
||||
#endregion
|
||||
|
||||
// TODO -- NPC classification is not done consistently with predictable thresholds.
|
||||
// These variables should be used in general to classify "enemies" vs "non-enemies" as well.
|
||||
// See NPCUtils.IsAnEnemy
|
||||
@@ -230,13 +252,6 @@
|
||||
internal const int UnreasonableHealthThreshold = 25000000; // 25 million
|
||||
#endregion
|
||||
|
||||
#region Multiplayer Boss Health Scaling Overrides
|
||||
// These values are used to replace the vanilla 1.35f and 1.9166666666666666f for the 2-player and 3-player cases, respectively.
|
||||
// Editing them via reflection or otherwise will apply to newly spawned bosses during gameplay.
|
||||
public static float ExpertHealthScalingOverride_2Players = 1.75f;
|
||||
public static float ExpertHealthScalingOverride_3Players = 2.25f;
|
||||
#endregion
|
||||
|
||||
// TODO -- Add all balance related constants here that don't belong in other files.
|
||||
// Review all constants and static readonlys in the entire mod to find things to add.
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -47,8 +46,8 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
|
||||
// Temporarily use sulphur for now
|
||||
public override ModWaterStyle WaterStyle => SulphuricDepthsWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<CausticTorch>();
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricDepthsWater");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer1Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -21,8 +20,8 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => UpperAbyssWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<KelpTorch>();
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/UpperAbyssWater");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer2Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -17,17 +16,12 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
if (CalamityPlayer.areThereAnyDamnBosses)
|
||||
return Main.curMusic;
|
||||
|
||||
int? musicSlot = CalamityClientConfig.Instance.AbyssLayer3Alt ?
|
||||
CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3Alt") :
|
||||
CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3");
|
||||
|
||||
return musicSlot ?? MusicID.Hell;
|
||||
return CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3") ?? MusicID.Hell;
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => MiddleAbyssWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<ThermalTorch>();
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/MiddleAbyssWater");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer3Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -21,8 +20,8 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
}
|
||||
|
||||
public override ModWaterStyle WaterStyle => VoidWater.Instance;
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<VoidTorch>();
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/VoidWater");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer4Icon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.ID;
|
||||
@@ -10,7 +9,7 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AstralInfectionBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => AstralWater.Instance;
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle
|
||||
{
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria.ID;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class BasaltGullyBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Basalt Gully background
|
||||
public override string BackgroundPath => "Terraria/Images/MapBG3";
|
||||
public override string MapBackground => "Terraria/Images/MapBG3";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanShores = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaShoresTiles;
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBasaltTiles > 2500 && (MoreThanShores || MoreThanReefs || MoreThanPolyp || MoreThanBurrows);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
//using CalamityMod.Systems;
|
||||
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
|
||||
@@ -7,6 +7,5 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,5 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,5 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return BiomeTileCounterSystem.BrimstoneCragTiles > 500 && player.ZoneUnderworldHeight;
|
||||
return BiomeTileCounterSystem.BrimstoneCragTiles > 100 && player.ZoneUnderworldHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class ClamDenBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
// todo make this condition different than the normal burrows
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 && MoreThanReefs && MoreThanPolyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class GleamingBurrowsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 3000 && MoreThanReefs && MoreThanPolyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class PolypForestBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 200 && MoreThanReefs && MoreThanBurrows;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class RadiantReefsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanShores = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaShoresTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
|
||||
|
||||
return ((BiomeTileCounterSystem.SunkenSeaReefsTiles > 2000) && MoreThanBasalt && MoreThanBurrows && MoreThanPolyp && MoreThanShores);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Security.Policy;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SulphurousSeaBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => Main.zenithWorld ? PissWater.Instance : SulphuricWater.Instance;
|
||||
public override ModWaterStyle WaterStyle => Main.zenithWorld ? ModContent.Find<ModWaterStyle>("CalamityMod/PissWater") : ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => Main.zenithWorld ? ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/SulphurSeaSurfaceBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<SulphurousTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
@@ -63,32 +63,27 @@ namespace CalamityMod.BiomeManagers
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
Point point = player.Center.ToTileCoordinates();
|
||||
return BiomeTileCounterSystem.SulphurTiles >= 300 || IsInBiomePosition(point) && !player.Calamity().ZoneAbyss;
|
||||
}
|
||||
|
||||
public static bool IsInBiomePosition(Point tilePos)
|
||||
{
|
||||
bool sulphurPosX = false;
|
||||
|
||||
if (Abyss.AtLeftSideOfWorld)
|
||||
{
|
||||
if (tilePos.X < 435)
|
||||
if (point.X < 435)
|
||||
{
|
||||
sulphurPosX = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tilePos.X > Main.maxTilesX - 435)
|
||||
if (point.X > Main.maxTilesX - 435)
|
||||
{
|
||||
sulphurPosX = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.remixWorld)
|
||||
return tilePos.Y > SulphurousSea.YStart && tilePos.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld();
|
||||
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
|
||||
|
||||
return tilePos.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld();
|
||||
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
|
||||
@@ -1,62 +1,18 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using System;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
//this is just a global sunken sea biome to check if you are in any of the existing biomes
|
||||
public class SunkenSeaBiome : ModBiome
|
||||
{
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override void Load()
|
||||
{
|
||||
//apply the drawblack edits here since all sunken sea biomes will have custom backgrounds
|
||||
IL_Main.DrawBlack += ChangeBlackThreshold;
|
||||
On_Main.DrawBlack += ForceDrawBlack;
|
||||
}
|
||||
|
||||
private void ForceDrawBlack(On_Main.orig_DrawBlack orig, Main self, bool force)
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBiome>()) && Main.BackgroundEnabled)
|
||||
{
|
||||
orig(self, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
orig(self, force);
|
||||
}
|
||||
}
|
||||
|
||||
private float NewThreshold(float orig)
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBiome>()) && Main.BackgroundEnabled)
|
||||
{
|
||||
return 0.1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
return orig;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeBlackThreshold(ILContext il)
|
||||
{
|
||||
if (Main.BackgroundEnabled)
|
||||
{
|
||||
var c = new ILCursor(il);
|
||||
c.TryGotoNext(n => n.MatchLdloc(6), n => n.MatchStloc(13)); //beginning of the loop, local 11 is a looping variable
|
||||
c.Index++; //this is kinda goofy since I dont think you could actually ever write c# to compile to the resulting IL from emitting here.
|
||||
c.Emit(OpCodes.Ldloc, 3); //pass the original value so we can set that instead if we dont want to change the threshold
|
||||
c.EmitDelegate<Func<float, float>>(NewThreshold); //check if were in the biome to set, else set the original value
|
||||
c.Emit(OpCodes.Stloc, 3); //num2 in vanilla, controls minimum threshold to turn a tile black
|
||||
}
|
||||
}
|
||||
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
@@ -64,8 +20,7 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 200 || BiomeTileCounterSystem.SunkenSeaPolypTiles > 200 ||
|
||||
BiomeTileCounterSystem.SunkenSeaReefsTiles > 200 || BiomeTileCounterSystem.SunkenSeaShoresTiles > 200;
|
||||
return BiomeTileCounterSystem.SunkenSeaTiles > 150;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class TimelessShoresBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
|
||||
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
|
||||
|
||||
return (BiomeTileCounterSystem.SunkenSeaShoresTiles > 1200) && MoreThanReefs && MoreThanBasalt && MoreThanUnderground;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol
|
||||
Main.debuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
// The nurse can remove all alcohol debuffs individually, thus removing this by proxy.
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class BaconOilBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 3
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
CalamityBuffSets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().baconOil = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class BloodyMaryBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 653 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class CaribbeanRumBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 663 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class CinnamonRollBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 681 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class EverclearBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 2
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 819 B After Width: | Height: | Size: 712 B |
@@ -1,32 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class EvergreenGinBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.evergreenGin = true;
|
||||
cplayer.SicknessDebuffMultiplier += EvergreenGin.DebuffBoost;
|
||||
cplayer.WaterDebuffMultiplier += EvergreenGin.DebuffBoost;
|
||||
cplayer.ElectricDebuffMultiplier -= EvergreenGin.DebuffLoss;
|
||||
cplayer.HeatDebuffMultiplier -= EvergreenGin.DebuffLoss;
|
||||
player.Calamity().evergreenGin = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 706 B |
@@ -1,30 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class FireballBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.fireball = true;
|
||||
cplayer.HeatDebuffMultiplier += Fireball.DebuffBoost;
|
||||
cplayer.SicknessDebuffMultiplier -= Fireball.DebuffLoss;
|
||||
player.Calamity().fireball = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 700 B |
@@ -1,28 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class GrapeBeerBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.grapeBeer = true;
|
||||
player.Calamity().grapeBeer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 689 B |
@@ -1,29 +0,0 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class ManhattanBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.ColdDebuffMultiplier += Manhattan.DebuffBoost;
|
||||
cplayer.WaterDebuffMultiplier -= Manhattan.DebuffLoss;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 815 B |
@@ -1,34 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class MargaritaBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.margarita = true;
|
||||
cplayer.HeatDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
cplayer.SicknessDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
cplayer.ColdDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
cplayer.WaterDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
cplayer.ElectricDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
cplayer.TypelessDebuffMultiplier -= Margarita.DebuffLoss;
|
||||
player.Calamity().margarita = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 705 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class MoonshineBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 726 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class MoscowMuleBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 898 B After Width: | Height: | Size: 792 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class OldFashionedBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 788 B After Width: | Height: | Size: 660 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class PurpleHazeBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 500 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class RedWineBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 816 B After Width: | Height: | Size: 696 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class RumBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 747 B |
@@ -1,31 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class ScrewdriverBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().screwdriver = true;
|
||||
player.blockRange += 5;
|
||||
player.tileSpeed += 1;
|
||||
player.wallSpeed += 1;
|
||||
player.GetDamage(DamageClass.Generic) *= 0.75f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 828 B After Width: | Height: | Size: 679 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class StarBeamRyeBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 758 B |
@@ -1,30 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class TequilaBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.tequila = true;
|
||||
cplayer.ElectricDebuffMultiplier += Tequila.DebuffBoost;
|
||||
cplayer.ColdDebuffMultiplier -= Tequila.DebuffLoss;
|
||||
player.Calamity().tequila = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 685 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class TequilaSunriseBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 964 B After Width: | Height: | Size: 741 B |
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 723 B |
@@ -1,34 +1,22 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class VodkaBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
var cplayer = player.Calamity();
|
||||
cplayer.vodka = true;
|
||||
cplayer.TypelessDebuffMultiplier += Vodka.DebuffBoost;
|
||||
cplayer.HeatDebuffMultiplier -= Vodka.DebuffLoss;
|
||||
cplayer.ColdDebuffMultiplier -= Vodka.DebuffLoss;
|
||||
cplayer.SicknessDebuffMultiplier -= Vodka.DebuffLoss;
|
||||
cplayer.WaterDebuffMultiplier -= Vodka.DebuffLoss;
|
||||
cplayer.ElectricDebuffMultiplier -= Vodka.DebuffLoss;
|
||||
player.Calamity().vodka = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 685 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class WhiskeyBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 740 B |
@@ -1,21 +1,17 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class WhiteWineBuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
AlcoholLevel = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
Main.persistentBuff[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
|
Before Width: | Height: | Size: 848 B After Width: | Height: | Size: 677 B |
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -14,32 +14,27 @@ namespace CalamityMod.Buffs
|
||||
|
||||
public override void Update(int type, Player player, ref int buffIndex)
|
||||
{
|
||||
// Globally remove summon tag buff stacking
|
||||
// Other mods need to add to this list because we genuinely don't have any way to tell this
|
||||
if (CalamityBuffSets.IsSummonTagBuff[type] && buffIndex > 0)
|
||||
{
|
||||
for (int i = buffIndex; i >= 0; i--)
|
||||
{
|
||||
if (player.buffTime[i] > 0)
|
||||
{
|
||||
int buffID = player.buffType[i];
|
||||
if (CalamityBuffSets.IsSummonTagBuff[buffID] && buffID != type)
|
||||
{
|
||||
player.DelBuff(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (type == BuffID.Archery)
|
||||
{
|
||||
player.arrowDamage *= 0.955f;
|
||||
}
|
||||
else if (type == BuffID.Ironskin)
|
||||
{
|
||||
player.statDefense += CalamityUtils.GetScalingDefense(-1) - 8;
|
||||
}
|
||||
else if (type == BuffID.MagicPower)
|
||||
{
|
||||
player.GetDamage<MagicDamageClass>() -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.Clairvoyance)
|
||||
{
|
||||
player.GetDamage<MagicDamageClass>() -= 0.02f;
|
||||
player.GetCritChance<MagicDamageClass>() -= 2;
|
||||
}
|
||||
else if (type == BuffID.Panic)
|
||||
{
|
||||
player.moveSpeed -= 0.6f;
|
||||
}
|
||||
else if (type == BuffID.SugarRush)
|
||||
{
|
||||
player.moveSpeed -= 0.1f;
|
||||
@@ -53,13 +48,6 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.moveSpeed -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.Tipsy)
|
||||
{
|
||||
player.statDefense += 4;
|
||||
player.GetCritChance<MeleeDamageClass>() -= 2;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.2f;
|
||||
player.GetDamage<MeleeDamageClass>() -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.WellFed)
|
||||
{
|
||||
player.moveSpeed -= 0.15f;
|
||||
@@ -77,21 +65,13 @@ namespace CalamityMod.Buffs
|
||||
player.pickSpeed += 0.05f;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.Weak)
|
||||
{
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.051f;
|
||||
}
|
||||
else if (type == BuffID.Shine)
|
||||
{
|
||||
player.Calamity().shine = true;
|
||||
}
|
||||
|
||||
// Star in a Bottle provides Mana Regeneration Potion effect and cancels out the usual effect if you don't have it
|
||||
else if (type == BuffID.StarInBottle && !player.manaRegenBuff)
|
||||
else if (type == BuffID.IceBarrier)
|
||||
{
|
||||
player.manaRegenBuff = true;
|
||||
player.manaRegenDelayBonus -= 0.5f;
|
||||
player.manaRegenBonus -= 10;
|
||||
player.endurance -= 0.1f;
|
||||
}
|
||||
|
||||
// Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
|
||||
@@ -111,59 +91,35 @@ namespace CalamityMod.Buffs
|
||||
else if (type == BuffID.Rabies)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
|
||||
// Reimplementation of random debuff infliction; now occurs on a consistent timer and with a different debuff list
|
||||
if (player.buffTime[buffIndex] % 600 == 300)
|
||||
{
|
||||
int debuffType = Main.rand.Next(4) switch
|
||||
{
|
||||
0 => BuffID.Weak,
|
||||
1 => BuffID.Bleeding,
|
||||
2 => BuffID.Darkness,
|
||||
_ => BuffID.BrokenArmor,
|
||||
};
|
||||
player.AddBuff(debuffType, Main.rand.Next(90, 211));
|
||||
}
|
||||
}
|
||||
else if (type == BuffID.Werewolf)
|
||||
{
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.051f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(int type, NPC npc, ref int buffIndex)
|
||||
{
|
||||
// Globally remove summon tag debuff stacking, unless allowed in the SummonTag
|
||||
// Other mods need to add to this list because otherwise we can't tell which IsATag buff is actually for whips
|
||||
var tag1 = CalamityBuffSets.SummonTagDebuff[type];
|
||||
if (tag1 is not null && !tag1.AllowsWhipStacking && buffIndex > 0)
|
||||
{
|
||||
for (int i = buffIndex; i >= 0; i--)
|
||||
{
|
||||
if (npc.buffTime[i] > 0)
|
||||
{
|
||||
int buffID = npc.buffType[i];
|
||||
var tag2 = CalamityBuffSets.SummonTagDebuff[buffID];
|
||||
if (tag2 is not null && !tag2.AllowsWhipStacking && buffID != type)
|
||||
{
|
||||
npc.DelBuff(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (type == BuffID.Frozen)
|
||||
{
|
||||
npc.Calamity().frozen = true;
|
||||
}
|
||||
if (type == BuffID.Webbed)
|
||||
{
|
||||
npc.Calamity().webbed = true;
|
||||
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
|
||||
npc.Calamity().webbed = npc.buffTime[buffIndex];
|
||||
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else if (type == BuffID.Slow)
|
||||
{
|
||||
if (npc.Calamity().slowed < npc.buffTime[buffIndex])
|
||||
npc.Calamity().slowed = npc.buffTime[buffIndex];
|
||||
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
if (type == BuffID.Electrified)
|
||||
{
|
||||
npc.Calamity().electrified = true;
|
||||
if (npc.Calamity().electrified < npc.buffTime[buffIndex])
|
||||
npc.Calamity().electrified = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +160,18 @@ namespace CalamityMod.Buffs
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.ChaosState");
|
||||
break;
|
||||
|
||||
case BuffID.IceBarrier:
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
case BuffID.Ironskin:
|
||||
tip = tip.Replace("8", CalamityUtils.GetScalingDefense(-1).ToString());
|
||||
break;
|
||||
|
||||
case BuffID.LeafCrystal:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.LeafCrystal");
|
||||
break;
|
||||
|
||||
case BuffID.MagicPower:
|
||||
tip = tip.Replace("20", "10");
|
||||
break;
|
||||
@@ -237,10 +205,6 @@ namespace CalamityMod.Buffs
|
||||
tip = tip.Replace("45", "22.5");
|
||||
break;
|
||||
|
||||
case BuffID.Rabies:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.Rabies");
|
||||
break;
|
||||
|
||||
case BuffID.SugarRush:
|
||||
tip = tip.Replace("20", "10");
|
||||
break;
|
||||
@@ -249,6 +213,10 @@ namespace CalamityMod.Buffs
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
case BuffID.Warmth:
|
||||
tip += "\n" + CalamityUtils.GetTextValue("Vanilla.BuffDescription.WarmthExtra");
|
||||
break;
|
||||
|
||||
case BuffID.WeaponImbueConfetti:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.WeaponImbueConfetti");
|
||||
break;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
namespace CalamityMod.Buffs.Cooldowns
|
||||
{
|
||||
public class Withered : ModBuff
|
||||
{
|
||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
@@ -1,28 +1,20 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class AstralInfectionDebuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 75,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
CalamityBuffSets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -32,7 +24,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().astralInfection = true;
|
||||
if (npc.Calamity().astralInfection < npc.buffTime[buffIndex])
|
||||
npc.Calamity().astralInfection = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 657 B |
@@ -1,91 +0,0 @@
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Systems.Collections;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class AuricRebuke : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 200,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
CalamityBuffSets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().auricRebuke = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().auricRebuke = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player player = drawInfo.drawPlayer;
|
||||
var modPlayer = player.Calamity();
|
||||
|
||||
bool moving = (player.controlLeft || player.controlRight);
|
||||
|
||||
if (!moving && Main.rand.NextBool(3) || moving)
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
int sparkLifetime = Main.rand.Next(11, 14);
|
||||
Vector2 sparkVel = new Vector2(8, 8).RotatedByRandom(100);
|
||||
Particle spark = new GlowSparkParticle(modPlayer.RandomDebuffVisualSpot, sparkVel, false, sparkLifetime, Main.rand.NextFloat(0.008f, 0.012f), Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f)), new Vector2(1f, 0.7f), true);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.FireworksRGB, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
|
||||
dust.color = Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f));
|
||||
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.FireworksRGB, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
|
||||
dust2.color = Main.rand.NextBool(4) ? Color.Lavender : Color.Cyan;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
Vector2 Vect2 = new Vector2(0f, Main.rand.NextBool(4) ? -2f : -8f).RotatedByRandom(MathHelper.ToRadians(Main.rand.NextBool(3) ? 10 : 35f)) * Main.rand.NextFloat(0.1f, 1.9f);
|
||||
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int sparkLifetime = Main.rand.Next(11, 14);
|
||||
Vector2 sparkVel = new Vector2(8, 8).RotatedByRandom(100);
|
||||
Particle spark = new GlowSparkParticle(npcSize, sparkVel, false, sparkLifetime, Main.rand.NextFloat(0.008f, 0.012f), Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f)), new Vector2(1f, 0.7f), true);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, DustID.FireworksRGB, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
|
||||
dust.color = Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f));
|
||||
}
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
Dust dust2 = Dust.NewDustPerfect(npcSize, DustID.FireworksRGB, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
|
||||
dust2.color = Main.rand.NextBool(4) ? Color.Lavender : Color.Cyan;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||