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 +1 @@
|
||||
patreon: Fabsol
|
||||
patreon: CalamityMod
|
||||
@@ -3,7 +3,6 @@ cronpull.sh
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
*.csproj
|
||||
*.sln
|
||||
|
||||
# User-specific files
|
||||
|
||||
@@ -216,8 +216,8 @@ namespace CalamityMod.Balancing
|
||||
// 20% vulnerability to The Hive's bees.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.2f, ProjectileType<BasicPlagueBee>()))));
|
||||
|
||||
// 35% vulnerability to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.35f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
// 25% vulnerability to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.25f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
#endregion
|
||||
|
||||
#region Empress of Light
|
||||
@@ -240,9 +240,6 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 20% resist to Nightglow.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FairyQueenMagicItemShot))));
|
||||
|
||||
// 20% resist to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
#endregion
|
||||
|
||||
#region Astrum Deus
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace CalamityMod.BiomeManagers
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
bool acidRain = AcidRainEvent.AcidRainEventIsOngoing;
|
||||
bool normalRain = Main.cloudAlpha > 0f;
|
||||
|
||||
// Acid Rain themes
|
||||
if (acidRain)
|
||||
@@ -41,9 +42,18 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
// Regular Sulphur Sea themes, when Acid Rain is not occurring
|
||||
else
|
||||
music = !Main.dayTime
|
||||
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
|
||||
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
|
||||
{
|
||||
if (normalRain)
|
||||
{
|
||||
music = CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaRain") ?? MusicID.Desert; // Normal Rain
|
||||
}
|
||||
else
|
||||
{
|
||||
music = !Main.dayTime
|
||||
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
|
||||
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return music;
|
||||
|
||||
|
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 652 B After Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 712 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 706 B |
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 700 B |
|
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 689 B |
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 705 B |
|
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 660 B |
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
{
|
||||
public class FabsolVodkaBuff : ModBuff
|
||||
public class PurpleHazeBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Alcohol
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().fabsolVodka = true;
|
||||
player.Calamity().purpleHaze = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 747 B |
|
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 758 B |
|
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 741 B After Width: | Height: | Size: 741 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 740 B |
|
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 677 B |
@@ -0,0 +1,74 @@
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class HeavyBleeding : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().heavybleeding = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().heavybleeding < npc.buffTime[buffIndex])
|
||||
npc.Calamity().heavybleeding = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player player = drawInfo.drawPlayer;
|
||||
var modPlayer = player.Calamity();
|
||||
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 randVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
dust.noGravity = false;
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
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 randVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
dust.noGravity = false;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 638 B |
@@ -0,0 +1,74 @@
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Laceration : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().laceration = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().laceration < npc.buffTime[buffIndex])
|
||||
npc.Calamity().laceration = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player player = drawInfo.drawPlayer;
|
||||
var modPlayer = player.Calamity();
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 randVel = new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
|
||||
dust.noGravity = false;
|
||||
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(modPlayer.RandomDebuffVisualSpot, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
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 randVel = new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Particle spark = new AltSparkParticle(npcSize, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
|
||||
dust.noGravity = false;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
Particle spark = new GlowOrbParticle(npcSize, new Vector2(0, 4) * Main.rand.NextFloat(0.5f, 0.7f), true, 16, Main.rand.NextFloat(0.55f, 0.8f), Color.DarkRed * 0.8f, false, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 702 B |
@@ -1,21 +0,0 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Buffs.Mounts
|
||||
{
|
||||
public class AlicornBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.mount.SetMount(ModContent.MountType<AlicornMount>(), player);
|
||||
player.buffTime[buffIndex] = 10;
|
||||
player.Calamity().fab = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 698 B |
@@ -14,7 +14,7 @@ namespace CalamityMod.Buffs.Mounts
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.mount.SetMount(ModContent.MountType<PhuppersChair>(), player);
|
||||
player.mount.SetMount(ModContent.MountType<BrimroseChair>(), player);
|
||||
player.buffTime[buffIndex] = 10;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusBlueCandleBuff : ModBuff
|
||||
public class BlueCandleBuff : ModBuff
|
||||
{
|
||||
public static float MoveSpeedBoost = 0.1f;
|
||||
public static double WingTimeBoost = 0.1D;
|
||||
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B |
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusPinkCandleBuff : ModBuff
|
||||
public class PinkCandleBuff : ModBuff
|
||||
{
|
||||
public static double PercentHealthPerSecond = 0.004D;
|
||||
|
||||
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 562 B |
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusPurpleCandleBuff : ModBuff
|
||||
public class PurpleCandleBuff : ModBuff
|
||||
{
|
||||
public static float DefenseRatioBonus = 0.1f;
|
||||
|
||||
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
@@ -5,7 +5,7 @@ using static Terraria.NPC;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusYellowCandleBuff : ModBuff
|
||||
public class YellowCandleBuff : ModBuff
|
||||
{
|
||||
public static float ExtraChipDamageRatio = 0.07f;
|
||||
|
||||
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 587 B |
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.Potions
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().shadow = true;
|
||||
if (player.yoraiz0rEye < 2 && CalamityConfig.Instance.StealthInvisibility)
|
||||
if (player.yoraiz0rEye < 2 && CalamityClientConfig.Instance.StealthInvisibility)
|
||||
player.yoraiz0rEye = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
||||
{
|
||||
if (CalamityConfig.Instance.BossZen)
|
||||
if (CalamityServerConfig.Instance.BossZen)
|
||||
tip = tip.Replace(":", ":\n" + this.GetLocalizedValue("ZenDescription"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using CalamityMod.Items.Weapons.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class KamiBuff : ModBuff
|
||||
{
|
||||
public const float RunSpeedBoost = 0.15f;
|
||||
public const float RunAccelerationBoost = 0.15f;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().kamiBoost = true;
|
||||
if (player.buffTime[buffIndex] == 1)
|
||||
SoundEngine.PlaySound(YanmeisKnife.ExpireSound, player.Center);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 423 B |
@@ -1,30 +0,0 @@
|
||||
using CalamityMod.NPCs;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class KamiFlu : ModBuff
|
||||
{
|
||||
public const float MultiplicativeDamageReduction = 0.8f;
|
||||
// Hard-cap for npc speed when afflicted with this debuff. Does not affect certain NPCs and does not affect any bosses (Basically only works on boss minions).
|
||||
public const float MaxNPCSpeed = 16f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().kamiFlu < npc.buffTime[buffIndex])
|
||||
npc.Calamity().kamiFlu = npc.buffTime[buffIndex];
|
||||
if ((CalamityLists.enemyImmunityList.Contains(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().kamiFlu;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 409 B |
@@ -31,6 +31,7 @@ using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
@@ -44,17 +45,20 @@ using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Waters;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Liquid;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Utilities.Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -87,10 +91,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool brimlashBusterBoost = false;
|
||||
public int evilSmasherBoost = 0;
|
||||
public int hellbornBoost = 0;
|
||||
public int searedPanCounter = 0;
|
||||
public int searedPanTimer = 0;
|
||||
public int potionTimer = 0;
|
||||
public bool cirrusDress = false;
|
||||
public bool blockAllDashes = false;
|
||||
public bool resetHeightandWidth = false;
|
||||
public bool noLifeRegen = false;
|
||||
@@ -170,7 +171,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool newPrincessInventory = false;
|
||||
public bool newSkeletonMerchantInventory = false;
|
||||
public bool newPermafrostInventory = false;
|
||||
public bool newCirrusInventory = false;
|
||||
public bool newAmidiasInventory = false;
|
||||
public bool newBanditInventory = false;
|
||||
public bool newCalamitasInventory = false;
|
||||
@@ -286,7 +286,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool stealthStrikeThisFrame = false;
|
||||
public bool stealthStrikeHalfCost = false;
|
||||
public bool stealthStrike75Cost = false;
|
||||
public bool stealthStrike85Cost = false;
|
||||
public bool stealthStrike90Cost = false;
|
||||
public bool wearingRogueArmor = false;
|
||||
public float accStealthGenBoost = 0f;
|
||||
|
||||
@@ -300,7 +300,6 @@ namespace CalamityMod.CalPlayer
|
||||
#region Mount
|
||||
public bool onyxExcavator = false;
|
||||
public bool rimehound = false;
|
||||
public bool fab = false;
|
||||
public bool crysthamyr = false;
|
||||
public bool ExoChair = false;
|
||||
public AndromedaPlayerState andromedaState;
|
||||
@@ -882,6 +881,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool gState = false;
|
||||
public bool bBlood = false;
|
||||
public bool brainRot = false;
|
||||
public bool heavybleeding = false;
|
||||
public bool laceration = false;
|
||||
public bool elementalMix = false;
|
||||
public bool icarusFolly = false;
|
||||
public bool weakPetrification = false;
|
||||
@@ -929,7 +930,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool zen = false;
|
||||
public bool isNearbyBoss = false;
|
||||
public bool flaskBrimstone = false;
|
||||
public bool fabsolVodka = false;
|
||||
public bool purpleHaze = false;
|
||||
public bool mushy = false;
|
||||
public bool PinkJellyRegen = false;
|
||||
public bool GreenJellyRegen = false;
|
||||
@@ -986,7 +987,6 @@ namespace CalamityMod.CalPlayer
|
||||
public int bloodfinTimer = 30;
|
||||
public bool hallowedRegen = false;
|
||||
public bool hallowedPower = false;
|
||||
public bool kamiBoost = false;
|
||||
public bool avertorBonus = false;
|
||||
public bool divineBless = false;
|
||||
public bool infiniteFlight = false;
|
||||
@@ -1151,7 +1151,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool omegaBlueTransformationForce;
|
||||
public bool omegaBlueTransformationPower;
|
||||
public bool redBow;
|
||||
public bool cocosFeather;
|
||||
#endregion
|
||||
|
||||
#region Calamitas Enchant Effects
|
||||
@@ -1291,7 +1290,6 @@ namespace CalamityMod.CalPlayer
|
||||
newPrincessInventory = false;
|
||||
newSkeletonMerchantInventory = false;
|
||||
newPermafrostInventory = false;
|
||||
newCirrusInventory = false;
|
||||
newAmidiasInventory = false;
|
||||
newBanditInventory = false;
|
||||
newCalamitasInventory = false;
|
||||
@@ -1343,7 +1341,6 @@ namespace CalamityMod.CalPlayer
|
||||
boost.AddWithCondition("newPrincessInventory", newPrincessInventory);
|
||||
boost.AddWithCondition("newSkeletonMerchantInventory", newSkeletonMerchantInventory);
|
||||
boost.AddWithCondition("newPermafrostInventory", newPermafrostInventory);
|
||||
boost.AddWithCondition("newCirrusInventory", newCirrusInventory);
|
||||
boost.AddWithCondition("newAmidiasInventory", newAmidiasInventory);
|
||||
boost.AddWithCondition("newBanditInventory", newBanditInventory);
|
||||
boost.AddWithCondition("newCalamitasInventory", newCalamitasInventory);
|
||||
@@ -1433,7 +1430,6 @@ namespace CalamityMod.CalPlayer
|
||||
newPrincessInventory = boost.Contains("newPrincessInventory");
|
||||
newSkeletonMerchantInventory = boost.Contains("newSkeletonMerchantInventory");
|
||||
newPermafrostInventory = boost.Contains("newPermafrostInventory");
|
||||
newCirrusInventory = boost.Contains("newCirrusInventory");
|
||||
newAmidiasInventory = boost.Contains("newAmidiasInventory");
|
||||
newBanditInventory = boost.Contains("newBanditInventory");
|
||||
newCalamitasInventory = boost.Contains("newCalamitasInventory");
|
||||
@@ -1601,7 +1597,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
onyxExcavator = false;
|
||||
rimehound = false;
|
||||
fab = false;
|
||||
crysthamyr = false;
|
||||
ExoChair = false;
|
||||
miniOldDuke = false;
|
||||
@@ -1662,7 +1657,6 @@ namespace CalamityMod.CalPlayer
|
||||
shadowSpeed = false;
|
||||
dsSetBonus = false;
|
||||
wearingRogueArmor = false;
|
||||
cirrusDress = false;
|
||||
|
||||
blockAllDashes = false;
|
||||
blazingCursorDamage = false;
|
||||
@@ -1770,7 +1764,6 @@ namespace CalamityMod.CalPlayer
|
||||
phantomicArtifact = false;
|
||||
hallowedRegen = false;
|
||||
hallowedPower = false;
|
||||
kamiBoost = false;
|
||||
tracersDust = false;
|
||||
elysianWingsDust = false;
|
||||
tracersCelestial = false;
|
||||
@@ -1850,7 +1843,6 @@ namespace CalamityMod.CalPlayer
|
||||
goldArmorGoldDrops = false;
|
||||
|
||||
miningSet = false;
|
||||
miningSetCooldown = 0;
|
||||
|
||||
eskimoSet = false; //vanilla armor
|
||||
meteorSet = false; //vanilla armor, for Space Gun nerf
|
||||
@@ -1944,6 +1936,8 @@ namespace CalamityMod.CalPlayer
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
laceration = false;
|
||||
elementalMix = false;
|
||||
icarusFolly = false;
|
||||
vHex = false;
|
||||
@@ -1998,7 +1992,7 @@ namespace CalamityMod.CalPlayer
|
||||
trippy = false;
|
||||
amidiasBlessing = false;
|
||||
flaskBrimstone = false;
|
||||
fabsolVodka = false;
|
||||
purpleHaze = false;
|
||||
shine = false;
|
||||
anechoicCoating = false;
|
||||
mushy = false;
|
||||
@@ -2191,7 +2185,6 @@ namespace CalamityMod.CalPlayer
|
||||
omegaBlueTransformation = omegaBlueTransformationForce = omegaBlueTransformationPower = false;
|
||||
|
||||
redBow = false;
|
||||
cocosFeather = false;
|
||||
|
||||
rageModeActive = false;
|
||||
adrenalineModeActive = false;
|
||||
@@ -2217,6 +2210,13 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
infiniteFlight = false;
|
||||
|
||||
noStupidNaturalARSpawns = false;
|
||||
disableAnahitaSpawns = false;
|
||||
disableHiveCystSpawns = false;
|
||||
disableNaturalScourgeSpawns = false;
|
||||
disablePerfCystSpawns = false;
|
||||
disableVoodooSpawns = false;
|
||||
|
||||
EnchantHeldItemEffects(Player, Player.Calamity(), Player.ActiveItem());
|
||||
}
|
||||
#endregion
|
||||
@@ -2240,13 +2240,13 @@ namespace CalamityMod.CalPlayer
|
||||
#region Screen Position Movements
|
||||
public override void ModifyScreenPosition()
|
||||
{
|
||||
if (CalamityConfig.Instance.ScreenshakePower == 0)
|
||||
if (CalamityClientConfig.Instance.ScreenshakePower == 0)
|
||||
return;
|
||||
|
||||
if (GeneralScreenShakePower > 0f)
|
||||
{
|
||||
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower);
|
||||
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityConfig.Instance.ScreenshakePower);
|
||||
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower);
|
||||
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -2367,6 +2367,8 @@ namespace CalamityMod.CalPlayer
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
laceration = false;
|
||||
elementalMix = false;
|
||||
icarusFolly = false;
|
||||
vHex = false;
|
||||
@@ -2419,7 +2421,6 @@ namespace CalamityMod.CalPlayer
|
||||
hallowedPower = false;
|
||||
onyxExcavator = false;
|
||||
rimehound = false;
|
||||
fab = false;
|
||||
crysthamyr = false;
|
||||
ExoChair = false;
|
||||
abyssalDivingSuitPlates = false;
|
||||
@@ -2432,7 +2433,6 @@ namespace CalamityMod.CalPlayer
|
||||
rRage = false;
|
||||
xRage = false;
|
||||
xWrath = false;
|
||||
kamiBoost = false;
|
||||
graxDefense = false;
|
||||
encased = false;
|
||||
brutalCarnage = false;
|
||||
@@ -2457,7 +2457,7 @@ namespace CalamityMod.CalPlayer
|
||||
sulphurskin = false;
|
||||
baguette = false;
|
||||
flaskBrimstone = false;
|
||||
fabsolVodka = false;
|
||||
purpleHaze = false;
|
||||
shine = false;
|
||||
anechoicCoating = false;
|
||||
mushy = false;
|
||||
@@ -2648,8 +2648,6 @@ namespace CalamityMod.CalPlayer
|
||||
ascendantTrail = false;
|
||||
evilSmasherBoost = 0;
|
||||
hellbornBoost = 0;
|
||||
searedPanCounter = 0;
|
||||
searedPanTimer = 0;
|
||||
potionTimer = 0;
|
||||
persecutedEnchantSummonTimer = 0;
|
||||
momentumCapacitorTime = 0;
|
||||
@@ -2671,7 +2669,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Respawn the player faster
|
||||
// 3 seconds normally and configurable while a boss is alive between 15 and 60 seconds
|
||||
int respawnTimerSet = areThereAnyDamnBosses ? (CalamityConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180;
|
||||
int respawnTimerSet = areThereAnyDamnBosses ? (CalamityServerConfig.Instance.PlayerRespawnTime_BossAlive * 60) : 180;
|
||||
if (Player.respawnTimer > respawnTimerSet)
|
||||
Player.respawnTimer = respawnTimerSet;
|
||||
}
|
||||
@@ -3090,16 +3088,16 @@ namespace CalamityMod.CalPlayer
|
||||
//Right click dash on Speed Blaster
|
||||
if (sBlasterDashActivated == true)
|
||||
{
|
||||
if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && Player.HasCooldown(Cooldowns.SpeedBlasterBoost.ID) && Player.dashDelay == 0)
|
||||
if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && (Player.HasCooldown(SpeedBlasterBoost.ID) || Player.HasCooldown(SuperradiantSawBoost.ID)) && Player.dashDelay == 0)
|
||||
{
|
||||
SpeedBlasterDashStarted = true;
|
||||
}
|
||||
sBlasterDashActivated = false;
|
||||
}
|
||||
|
||||
if (Player.Calamity().SpeedBlasterDashStarted || (Player.dashDelay != 0 && Player.Calamity().LastUsedDashID == SpeedBlasterDash.ID))
|
||||
if (Player.Calamity().SpeedBlasterDashStarted || (Player.dashDelay != 0 && (Player.Calamity().LastUsedDashID == SpeedBlasterDash.ID || Player.Calamity().LastUsedDashID == SuperradiantSawDash.ID)))
|
||||
{
|
||||
Player.Calamity().DeferredDashID = SpeedBlasterDash.ID;
|
||||
Player.Calamity().DeferredDashID = Player.ActiveItem().type == ModContent.ItemType<SuperradiantSlaughterer>() ? SuperradiantSawDash.ID : SpeedBlasterDash.ID;
|
||||
Player.dash = 0;
|
||||
}
|
||||
|
||||
@@ -3343,14 +3341,14 @@ namespace CalamityMod.CalPlayer
|
||||
public override void UpdateEquips()
|
||||
{
|
||||
// TODO -- why is boss health bar code in Player.UpdateEquips and not a ModSystem
|
||||
CalamityConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
|
||||
CalamityClientConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
|
||||
|
||||
// Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems.
|
||||
VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player);
|
||||
|
||||
// If the config is enabled, vastly increase the player's base tile and wall placement speeds
|
||||
// This stacks with the Brick Layer and Portable Cement Mixer
|
||||
if (CalamityConfig.Instance.FasterTilePlacement)
|
||||
if (CalamityServerConfig.Instance.FasterTilePlacement)
|
||||
{
|
||||
Player.tileSpeed += 0.5f;
|
||||
Player.wallSpeed += 0.5f;
|
||||
@@ -3425,58 +3423,66 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<ProfanedCrystalBuff>(), 60, true);
|
||||
}
|
||||
if (gSabaton && Player.whoAmI == Main.myPlayer)
|
||||
if (gSabaton)
|
||||
{
|
||||
//While holding hotkey, but before slam, bring Y velocity closer to 0
|
||||
if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling)
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 4f)) / 60f;
|
||||
}
|
||||
//Play sound a bit early so it goes in time with the fall
|
||||
if (gSabatonHotkeyHoldTime == 45 && !gSabatonFalling)
|
||||
{
|
||||
SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/GravistarCharge") { Volume = 0.3f });
|
||||
}
|
||||
//1 second passed, falling time
|
||||
if (gSabatonHotkeyHoldTime == 60)
|
||||
{
|
||||
gSabatonFalling = true;
|
||||
}
|
||||
//Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued
|
||||
if (Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued)
|
||||
{
|
||||
gSabatonFall = 0;
|
||||
gSabatonFalling = false;
|
||||
}
|
||||
if (gSabatonFalling)
|
||||
{
|
||||
SpawnGravistarParticle();
|
||||
|
||||
//Cap time converted to damage at 2 seconds
|
||||
if (gSabatonFall < 120)
|
||||
gSabatonFall++;
|
||||
|
||||
Player.maxFallSpeed = 40f;
|
||||
Player.gravity = 1.3f;
|
||||
//If the player can fly during the fall, the physics gets a bit funky
|
||||
Player.controlJump = false;
|
||||
|
||||
//Check if player hit some form of solid resistance (the ground)
|
||||
if (Player.oldVelocity.Y == Player.velocity.Y)
|
||||
//While holding hotkey, but before slam, bring Y velocity closer to 0
|
||||
if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling)
|
||||
{
|
||||
Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 4f)) / 60f;
|
||||
}
|
||||
//Play sound a bit early so it goes in time with the fall
|
||||
if (gSabatonHotkeyHoldTime == 45 && !gSabatonFalling)
|
||||
{
|
||||
SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/GravistarCharge") { Volume = 0.3f });
|
||||
}
|
||||
//1 second passed, falling time
|
||||
if (gSabatonHotkeyHoldTime == 60)
|
||||
{
|
||||
gSabatonFalling = true;
|
||||
}
|
||||
//Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued
|
||||
// Also cancel fall if the player has upwards Y velocity (Goodbye Inner Tube cheese)
|
||||
if ((Player.gravDir == 1 && Player.velocity.Y < 0f) || (Player.gravDir == -1 && Player.velocity.Y > 1f) || Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<GravistarSabaton>()));
|
||||
//Spawn explosion. ai[0] is used for transferring the recorded falling time
|
||||
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(GravistarSabaton.SlamDamage));
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<SabatonSlam>(), damage, 4f, Player.whoAmI, gSabatonFall);
|
||||
gSabatonFall = 0;
|
||||
gSabatonFalling = false;
|
||||
//Temporary jump speed is granted for 40 frames
|
||||
gSabatonTempJumpSpeed = 40;
|
||||
}
|
||||
if (gSabatonFalling)
|
||||
{
|
||||
SpawnGravistarParticle();
|
||||
|
||||
//Cap time converted to damage at 2 seconds
|
||||
if (gSabatonFall < 120)
|
||||
gSabatonFall++;
|
||||
|
||||
Player.maxFallSpeed = 40f;
|
||||
Player.gravity = 1.3f;
|
||||
//If the player can fly during the fall, the physics gets a bit funky
|
||||
Player.controlJump = false;
|
||||
|
||||
//Check if player hit some form of solid resistance (the ground)
|
||||
if (Player.oldVelocity.Y == Player.velocity.Y)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<GravistarSabaton>()));
|
||||
//Spawn explosion. ai[0] is used for transferring the recorded falling time
|
||||
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(GravistarSabaton.SlamDamage));
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<SabatonSlam>(), damage, 4f, Player.whoAmI, gSabatonFall);
|
||||
gSabatonFall = 0;
|
||||
gSabatonFalling = false;
|
||||
//Temporary jump speed is granted for 40 frames
|
||||
gSabatonTempJumpSpeed = 40;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else // Reset slam effect if the accessory is unequipped
|
||||
{
|
||||
gSabatonFall = 0;
|
||||
gSabatonFalling = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -3600,7 +3606,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region PostUpdateBuffs
|
||||
public override void PostUpdateBuffs()
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && CalamityConfig.Instance.VanillaCooldownDisplay)
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && Player.potionDelay != 0)
|
||||
potionSick = true;
|
||||
@@ -3713,10 +3719,9 @@ namespace CalamityMod.CalPlayer
|
||||
(aquaticHeartWaterBuff ? 0.15f : 0f) +
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.AccelerationBoost : 0f) +
|
||||
(blueCandle ? BlueCandleBuff.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
(hasteLevel * 0.05f);
|
||||
|
||||
@@ -3728,7 +3733,6 @@ namespace CalamityMod.CalPlayer
|
||||
(aquaticHeartWaterBuff ? 0.15f : 0f) +
|
||||
((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
@@ -4222,12 +4226,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "RedBow", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "RedBow", EquipType.Head);
|
||||
}
|
||||
if (cocosFeather)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "CocosFeather", EquipType.Head);
|
||||
}
|
||||
if (snowRuffianSet)
|
||||
{
|
||||
Player.wings = EquipLoader.GetEquipSlot(Mod, "SnowRuffianMask", EquipType.Wings);
|
||||
@@ -4295,20 +4293,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (weakPetrification)
|
||||
WeakPetrification();
|
||||
|
||||
// Disable vanilla dashes during god slayer dash
|
||||
if (godSlayerDashHotKeyPressed)
|
||||
{
|
||||
// Set the player to have no registered vanilla dashes.
|
||||
Player.dashType = 0;
|
||||
|
||||
// Prevent the possibility of Shield of Cthulhu invulnerability exploits.
|
||||
Player.eocHit = -1;
|
||||
if (Player.eocDash != 0)
|
||||
Player.eocDash = 0;
|
||||
}
|
||||
|
||||
// Disable vanilla dashes during god slayer dash
|
||||
if (SpeedBlasterDashStarted)
|
||||
// Disable vanilla dashes during God Slayer or Speed Blaster dashes
|
||||
if (godSlayerDashHotKeyPressed || SpeedBlasterDashStarted)
|
||||
{
|
||||
// Set the player to have no registered vanilla dashes.
|
||||
Player.dashType = 0;
|
||||
@@ -4548,7 +4534,7 @@ namespace CalamityMod.CalPlayer
|
||||
stealthStrikeThisFrame = false;
|
||||
stealthStrikeHalfCost = false;
|
||||
stealthStrike75Cost = false;
|
||||
stealthStrike85Cost = false;
|
||||
stealthStrike90Cost = false;
|
||||
|
||||
// stealthAcceleration only resets if you don't have either of the accelerator accessories equipped
|
||||
if (!darkGodSheath && !eclipseMirror)
|
||||
@@ -4735,8 +4721,8 @@ namespace CalamityMod.CalPlayer
|
||||
consumptionMult = 0.5f;
|
||||
else if (stealthStrike75Cost)
|
||||
consumptionMult = 0.75f;
|
||||
else if (stealthStrike85Cost)
|
||||
consumptionMult = 0.85f;
|
||||
else if (stealthStrike90Cost)
|
||||
consumptionMult = 0.9f;
|
||||
return rogueStealth >= rogueStealthMax * consumptionMult;
|
||||
}
|
||||
|
||||
@@ -4763,7 +4749,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (rogueStealth <= 0f)
|
||||
rogueStealth = 0f;
|
||||
}
|
||||
else if (stealthStrike85Cost)
|
||||
else if (stealthStrike90Cost)
|
||||
{
|
||||
rogueStealth -= 0.9f * stealthToLose;
|
||||
if (rogueStealth <= 0f)
|
||||
@@ -4876,11 +4862,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Enabling the config while a player is loaded will show the timer immediately.
|
||||
// But it won't start running until you save and quit and re-enter a world.
|
||||
if (CalamityConfig.Instance.SpeedrunTimer)
|
||||
if (CalamityClientConfig.Instance.SpeedrunTimer)
|
||||
CalamityMod.SpeedrunTimer.Restart();
|
||||
|
||||
bool showWikiMessage = CalamityClientConfig.Instance.WikiStatusMessage;
|
||||
bool showVCMMMessage = CalamityClientConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable;
|
||||
bool showStartupMessages = showWikiMessage || showVCMMMessage;
|
||||
|
||||
// Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display
|
||||
if (CalamityConfig.Instance.WikiStatusMessage)
|
||||
if (showStartupMessages)
|
||||
{
|
||||
startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public partial class CalamityPlayer : ModPlayer
|
||||
{
|
||||
public int VerticalGodslayerDashTimer;
|
||||
public int VerticalSpeedBlasterDashTimer;
|
||||
public int VerticalOmnidashTimer;
|
||||
|
||||
private string dashID; //private backing variable
|
||||
|
||||
@@ -22,7 +21,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
get
|
||||
{
|
||||
return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash.
|
||||
return (String.IsNullOrEmpty(dashID) && Player.dashType == 0 && CalamityServerConfig.Instance.DefaultDashEnabled) ? DefaultDash.ID : dashID; //gives default dash ONLY if no custom or vanilla dash.
|
||||
}
|
||||
set => dashID = value;
|
||||
}
|
||||
@@ -104,16 +103,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.dashDelay > 0) //Speed Blaster
|
||||
{
|
||||
VerticalSpeedBlasterDashTimer = 0;
|
||||
LastUsedDashID = string.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Player.dashDelay > 0)
|
||||
{
|
||||
VerticalGodslayerDashTimer = 0;
|
||||
VerticalOmnidashTimer = 0;
|
||||
LastUsedDashID = string.Empty;
|
||||
return;
|
||||
}
|
||||
@@ -137,21 +129,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Handle mid-dash effects.
|
||||
UsedDash.MidDashEffects(Player, ref dashSpeed, ref dashSpeedDecelerationFactor, ref runSpeedDecelerationFactor);
|
||||
if (UsedDash.IsOmnidirectional && VerticalGodslayerDashTimer < 25)
|
||||
if (UsedDash.IsOmnidirectional && VerticalOmnidashTimer < 25)
|
||||
{
|
||||
VerticalGodslayerDashTimer++;
|
||||
if (VerticalGodslayerDashTimer >= 25)
|
||||
{
|
||||
Player.dashDelay = dashDelayToApply;
|
||||
// Stop the player from going flying
|
||||
Player.velocity *= 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
if (UsedDash.IsOmnidirectional && VerticalSpeedBlasterDashTimer < 25)
|
||||
{
|
||||
VerticalSpeedBlasterDashTimer++;
|
||||
if (VerticalSpeedBlasterDashTimer >= 25)
|
||||
VerticalOmnidashTimer++;
|
||||
if (VerticalOmnidashTimer >= 25)
|
||||
{
|
||||
Player.dashDelay = dashDelayToApply;
|
||||
// Stop the player from going flying
|
||||
@@ -481,6 +462,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (WorldGen.SolidOrSlopedTile(upwardTilePoint.X, upwardTilePoint.Y) || WorldGen.SolidOrSlopedTile(aheadTilePoint.X, aheadTilePoint.Y))
|
||||
Player.velocity.X /= 2f;
|
||||
|
||||
Player.timeSinceLastDashStarted = 0;
|
||||
Player.dashDelay = -1;
|
||||
}
|
||||
|
||||
@@ -489,22 +471,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public void ModHorizontalMovement()
|
||||
{
|
||||
if (Player.mount.Active && Player.mount.Type == ModContent.MountType<AlicornMount>() && Math.Abs(Player.velocity.X) > Player.mount.DashSpeed - Player.mount.RunSpeed / 2f)
|
||||
{
|
||||
Rectangle damageHitbox = Player.getRect();
|
||||
|
||||
if (Player.direction == 1)
|
||||
damageHitbox.Offset(Player.width - 1, 0);
|
||||
|
||||
damageHitbox.Width = 2;
|
||||
damageHitbox.Inflate(6, 12);
|
||||
float damage = Player.GetTotalDamage<SummonDamageClass>().ApplyTo(800f);
|
||||
float knockback = 10f;
|
||||
int NPCImmuneTime = 30;
|
||||
int playerImmuneTime = 6;
|
||||
DoMountDashDamage(damageHitbox, damage, knockback, NPCImmuneTime, playerImmuneTime);
|
||||
}
|
||||
|
||||
if (Player.mount.Active && Player.mount.Type == ModContent.MountType<RimehoundMount>() && Math.Abs(Player.velocity.X) > Player.mount.RunSpeed / 2f)
|
||||
{
|
||||
Rectangle damageHitbox = Player.getRect();
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework
|
||||
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityConfig.Instance.StealthInvisibility)
|
||||
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility)
|
||||
{
|
||||
// A translucent orchid color, the rogue class color
|
||||
float colorValue = calamityPlayer.rogueStealth / calamityPlayer.rogueStealthMax * 0.9f; //0 to 0.9
|
||||
@@ -244,6 +244,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.gsInferno && drawInfo.shadow == 0f)
|
||||
GodSlayerInferno.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.heavybleeding && drawInfo.shadow == 0f)
|
||||
HeavyBleeding.DrawEffects(drawInfo);
|
||||
|
||||
// Holy Flames, Holy Inferno and Banishing Fire share the same visual effects
|
||||
if (drawInfo.shadow == 0f && (calamityPlayer.hFlames || calamityPlayer.hInferno || calamityPlayer.banishingFire))
|
||||
{
|
||||
@@ -256,6 +259,9 @@ namespace CalamityMod.CalPlayer
|
||||
else if (calamityPlayer.icarusFolly && drawInfo.shadow == 0f)
|
||||
IcarusFolly.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.laceration && drawInfo.shadow == 0f)
|
||||
Laceration.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.miracleBlight && drawInfo.shadow == 0f)
|
||||
MiracleBlight.DrawEffects(drawInfo);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ using Terraria.Chat;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.GameContent.Creative;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
@@ -438,6 +439,14 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BrainRot" + Main.rand.Next(1, 3 + 1)).Format(Player.name));
|
||||
}
|
||||
if (heavybleeding)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HeavyBleeding" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (laceration)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Laceration" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (elementalMix)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ElementalMix" + Main.rand.Next(1, 2 + 1)).Format(Player.name));
|
||||
@@ -531,7 +540,7 @@ namespace CalamityMod.CalPlayer
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
modifiers.ModifyHitInfo += YellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Excalibur and True Excalibur deal +100% damage to targets above 75% HP.
|
||||
if (item.type == ItemID.Excalibur || item.type == ItemID.TrueExcalibur)
|
||||
@@ -605,7 +614,7 @@ namespace CalamityMod.CalPlayer
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
modifiers.ModifyHitInfo += YellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Stealth strike damage multipliers are applied here.
|
||||
// TODO -- stealth should be its own damage class and this should be applied as player StealthDamage *= XYZ
|
||||
@@ -924,8 +933,29 @@ namespace CalamityMod.CalPlayer
|
||||
double dodgeDamageGateValuePercent = 0.05;
|
||||
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
|
||||
|
||||
// This hook is applied before tML applies the vanilla difficulty multipliers. This means the "proj.damage" value here
|
||||
// is usually significantly lower than the damage the projectile "actually" deals.
|
||||
// To obtain the correct damage value for a cancelled hit, the corresponding multipliers are copied from tML
|
||||
// to simulate the "actual" damage of the projectile.
|
||||
// Note: Banner buffs, cold resistance, and modded modifiers are not included in this "actual" damage calculation,
|
||||
// even though in real tML hooks they might be applied earlier than or together with difficulty multipliers.
|
||||
int actualProjDamage = proj.damage;
|
||||
if (!proj.reflected && !ProjectileID.Sets.PlayerHurtDamageIgnoresDifficultyScaling[proj.type])
|
||||
{
|
||||
float damageMult = Main.GameModeInfo.EnemyDamageMultiplier;
|
||||
if (Main.GameModeInfo.IsJourneyMode)
|
||||
{
|
||||
var power = CreativePowerManager.Instance.GetPower<CreativePowers.DifficultySliderPower>();
|
||||
if (power.GetIsUnlocked())
|
||||
damageMult = power.StrengthMultiplierToGiveNPCs;
|
||||
}
|
||||
|
||||
// in real tML, the factor 2 is applied in Projectile.Damage()
|
||||
actualProjDamage = (int)Math.Floor(2 * damageMult * (float)actualProjDamage);
|
||||
}
|
||||
|
||||
// Reflects count as dodges. They share the timer and can be disabled by Armageddon right click.
|
||||
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID) && proj.damage >= dodgeDamageGateValue)
|
||||
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID) && actualProjDamage >= dodgeDamageGateValue)
|
||||
{
|
||||
double maxCooldownDurationDamagePercent = 0.5;
|
||||
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
|
||||
@@ -934,13 +964,14 @@ namespace CalamityMod.CalPlayer
|
||||
if (maxCooldownDurationDamageValue <= 0)
|
||||
maxCooldownDurationDamageValue = 1;
|
||||
|
||||
float cooldownDurationScalar = MathHelper.Clamp((proj.damage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
float cooldownDurationScalar = MathHelper.Clamp((actualProjDamage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
|
||||
// The Evolution
|
||||
if (evolution)
|
||||
{
|
||||
proj.hostile = false;
|
||||
proj.friendly = true;
|
||||
proj.damage = 10 * actualProjDamage;
|
||||
proj.velocity *= -2f;
|
||||
proj.extraUpdates += 1;
|
||||
proj.penetrate = 1;
|
||||
@@ -1190,8 +1221,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (crawCarapace)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<Crumbling>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(40);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(40);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
@@ -1199,8 +1233,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 900);
|
||||
npc.AddBuff(ModContent.BuffType<CrushDepth>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(250);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(250);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
}
|
||||
SoundEngine.PlaySound(BaroclawHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1220,8 +1257,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (absorber)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(350);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
if (!npc.dontTakeDamage)
|
||||
{
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(350);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
}
|
||||
SoundEngine.PlaySound(AbsorberHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1454,7 +1494,7 @@ namespace CalamityMod.CalPlayer
|
||||
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
|
||||
|
||||
// Reflects count as dodges. They share the timer and can be disabled by global dodge disabling effects.
|
||||
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID) && proj.damage >= dodgeDamageGateValue)
|
||||
if (!disableAllDodges && !Player.HasCooldown(GlobalDodge.ID) && hurtInfo.SourceDamage >= dodgeDamageGateValue)
|
||||
{
|
||||
double maxCooldownDurationDamagePercent = 0.5;
|
||||
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
|
||||
@@ -1463,12 +1503,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (maxCooldownDurationDamageValue <= 0)
|
||||
maxCooldownDurationDamageValue = 1;
|
||||
|
||||
float cooldownDurationScalar = MathHelper.Clamp((proj.damage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
float cooldownDurationScalar = MathHelper.Clamp((hurtInfo.SourceDamage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
|
||||
if (daedalusReflect && !evolution)
|
||||
{
|
||||
proj.hostile = false;
|
||||
proj.friendly = true;
|
||||
proj.damage = hurtInfo.SourceDamage;
|
||||
proj.velocity *= -1f;
|
||||
proj.penetrate = 1;
|
||||
|
||||
@@ -1602,16 +1643,16 @@ namespace CalamityMod.CalPlayer
|
||||
return true;
|
||||
|
||||
// Mirror evades do not work if the global dodge cooldown is active. This cooldown can be triggered by either mirror.
|
||||
if (!Player.HasCooldown(GlobalDodge.ID) && info.Damage >= dodgeDamageGateValue)
|
||||
if (!Player.HasCooldown(GlobalDodge.ID) && actualDamageTaken >= dodgeDamageGateValue)
|
||||
{
|
||||
if (eclipseMirror)
|
||||
{
|
||||
EclipseMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, info.Damage);
|
||||
EclipseMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, actualDamageTaken);
|
||||
return true;
|
||||
}
|
||||
else if (abyssalMirror)
|
||||
{
|
||||
AbyssMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, info.Damage);
|
||||
AbyssMirrorDodge(dodgeDamageGateValuePercent, dodgeDamageGateValue, actualDamageTaken);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1666,7 +1707,7 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center); //metal hit noise
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if (((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide) || Player.GetModPlayer<CrystalHeartVodkaPlayer>().vanityEquipped)
|
||||
else if (((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide))
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(SoundID.FemaleHit, Player.Center); //female hit noise
|
||||
@@ -2198,7 +2239,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (trinketOfChi)
|
||||
chiBuffTimer = 0;
|
||||
|
||||
if (amidiasBlessing && hurtInfo.Damage > 50)
|
||||
if (amidiasBlessing && (chaliceOfTheBloodGod ? chaliceBleedoutToApplyOnHurt : hurtInfo.Damage) > 50)
|
||||
{
|
||||
Player.ClearBuff(ModContent.BuffType<AmidiasBlessing>());
|
||||
SoundEngine.PlaySound(SoundID.Item96, Player.Center);
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -99,6 +99,8 @@ namespace CalamityMod.CalPlayer
|
||||
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
||||
ApplyDoTDebuff(bBlood, 8, purity);
|
||||
ApplyDoTDebuff(brainRot, 8, purity);
|
||||
ApplyDoTDebuff(heavybleeding, 16, purity);
|
||||
ApplyDoTDebuff(laceration, 24, purity);
|
||||
ApplyDoTDebuff(elementalMix, 50, purity);
|
||||
ApplyDoTDebuff(vaporfied, 8, purity);
|
||||
ApplyDoTDebuff(bFlames, abaddon ? 10 : 30, purity);
|
||||
@@ -129,9 +131,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (CalamityGlobalNPC.aquaticScourge >= 0 && Main.zenithWorld)
|
||||
{
|
||||
NPC AS = Main.npc[CalamityGlobalNPC.aquaticScourge];
|
||||
//if the player is 50 blocks or more away from the head
|
||||
if (AS.life < AS.lifeMax) //Only poison when damaged
|
||||
ASPoisonLevel = Utils.GetLerpValue(800f, 1600f, Vector2.Distance(Player.Center, AS.Center), true);
|
||||
float scoogDistance = Vector2.Distance(Player.Center, AS.Center);
|
||||
// GFB Aquatic Scourge poisons you if:
|
||||
// 1. You are over 50 blocks away from the head
|
||||
// 2. You are under 250 blocks away from the head (so that people halfway across the world aren't getting killed for no reason)
|
||||
// 3. Aquatic Scourge has been damaged
|
||||
if (AS.life < AS.lifeMax && scoogDistance < 4000f)
|
||||
ASPoisonLevel = Utils.GetLerpValue(800f, 1600f, scoogDistance, true);
|
||||
}
|
||||
|
||||
bool ASPoisoning = ASPoisonLevel > 0f;
|
||||
@@ -140,7 +146,7 @@ namespace CalamityMod.CalPlayer
|
||||
float increment = 1f / SulphSeaWaterSafetyTime;
|
||||
//No way to mitigate AS Poisoning
|
||||
if (ASPoisoning)
|
||||
increment *= 4f + (8f * ASPoisonLevel);
|
||||
increment *= 3f + (6f * ASPoisonLevel);
|
||||
if (sulphurskin && !ASPoisoning)
|
||||
increment *= 0.5f;
|
||||
if (sulphurSet && !ASPoisoning)
|
||||
@@ -183,7 +189,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (fabsolVodka)
|
||||
if (purpleHaze)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
@@ -263,7 +269,7 @@ namespace CalamityMod.CalPlayer
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
|
||||
if (alcoholPoisonLevel > (cirrusDress ? 5 : 3))
|
||||
if (alcoholPoisonLevel > 3)
|
||||
{
|
||||
// Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning.
|
||||
Player.nebulaLevelLife = 0;
|
||||
@@ -422,9 +428,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / Player.statLifeMax2;
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp(4f, 12f, missingLifeRatio);
|
||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp((purity || aAmpoule ? 2f : 4f), (purity || aAmpoule ? 10f : 12f), missingLifeRatio)); // Rounding is needed for it to ever actually give +6 hp/s, as the integer conversion would otherwise floor it.
|
||||
Player.lifeRegen += (int)lifeRegenToGive;
|
||||
}
|
||||
|
||||
@@ -521,7 +527,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
// During Silva revive or God Slayer dash, all negative life regen is canceled
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0))
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen = 0;
|
||||
@@ -603,9 +609,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (caribbeanRum)
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
if (aChicken)
|
||||
Player.lifeRegen += 1;
|
||||
|
||||
if (mushy)
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
@@ -736,7 +739,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (pinkCandle && !noLifeRegen)
|
||||
{
|
||||
// Every frame, add up 1/60th of the healing value (0.4% max HP per second)
|
||||
pinkCandleHealFraction += Player.statLifeMax2 * CirrusPinkCandleBuff.PercentHealthPerSecond / 60;
|
||||
pinkCandleHealFraction += Player.statLifeMax2 * PinkCandleBuff.PercentHealthPerSecond / 60;
|
||||
|
||||
if (pinkCandleHealFraction >= 1D)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
@@ -82,7 +83,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Give the player a 24% jump speed boost while wings are equipped, otherwise grant 4% more jump speed so that players can jump 7 tiles high
|
||||
if (Player.wingsLogic > 0)
|
||||
Player.jumpSpeedBoost += 1.2f;
|
||||
else if (CalamityConfig.Instance.FasterJumpSpeed)
|
||||
else if (CalamityServerConfig.Instance.FasterJumpSpeed)
|
||||
Player.jumpSpeedBoost += 0.2f;
|
||||
|
||||
// Decrease the counter on Fearmonger set turbo regeneration
|
||||
@@ -186,12 +187,13 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetCritChance<RangedDamageClass>() = -spiritOriginConvertedCrit;
|
||||
}
|
||||
|
||||
if (Player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>())
|
||||
heldGaelsLastFrame = true;
|
||||
|
||||
if (Player.ActiveItem().type != ModContent.ItemType<SaharaSlicers>())
|
||||
saharaSlicersBolts = 0;
|
||||
|
||||
|
||||
if (Player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>())
|
||||
heldGaelsLastFrame = true;
|
||||
|
||||
// De-equipping Gael's Greatsword deletes all rage.
|
||||
else if (heldGaelsLastFrame)
|
||||
{
|
||||
@@ -521,7 +523,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Apply the rage change and cap rage in both directions.
|
||||
// Changes are only applied if the Rage mechanic is available.
|
||||
if (RageEnabled)
|
||||
// CIT 24NOV2025: Fixed an exploit which allowed Rage to persist forever if Revengeance is toggled off while active.
|
||||
if (RageEnabled || rageDiff < 0f)
|
||||
{
|
||||
rage += rageDiff;
|
||||
if (rage < 0f)
|
||||
@@ -603,7 +606,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Apply the adrenaline change and cap adrenaline in both directions.
|
||||
// Changes are only applied if the Adrenaline mechanic is available.
|
||||
if (AdrenalineEnabled && adrenalinePauseTimer == 0)
|
||||
//
|
||||
// CIT 24NOV2025: Adrenaline cannot be exploited the same way as Rage, since difficulty cannot be changed while a boss is alive.
|
||||
// Nevertheless, I will still give it the same exploit fix as Rage just in case there is some method to do it.
|
||||
if ((AdrenalineEnabled || adrenalineDiff < 0f) && adrenalinePauseTimer == 0)
|
||||
{
|
||||
adrenaline += adrenalineDiff;
|
||||
if (adrenaline < 0f)
|
||||
@@ -981,7 +987,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.buffImmune[ModContent.BuffType<FrozenLungs>()] = true;
|
||||
}
|
||||
if (CalamityConfig.Instance.ChilledWaterRework)
|
||||
if (CalamityServerConfig.Instance.ChilledWaterRework)
|
||||
{
|
||||
if (Main.expertMode && Player.ZoneSnow && Player.wet && !Player.lavaWet && !Player.honeyWet)
|
||||
{
|
||||
@@ -999,13 +1005,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Extra DoT in the lava of the crags. Negated by Flame-licked Shell.
|
||||
if (Player.lavaWet)
|
||||
{
|
||||
if (ZoneCalamity && !flameLickedShell)
|
||||
Player.AddBuff(ModContent.BuffType<SearingLava>(), 2, false);
|
||||
}
|
||||
else
|
||||
if (!Player.lavaWet)
|
||||
{
|
||||
if (Player.lavaImmune)
|
||||
{
|
||||
@@ -1090,8 +1090,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (!Player.wet)
|
||||
{
|
||||
if (cirrusDress)
|
||||
Player.maxFallSpeed = 12f;
|
||||
if (aeroSet)
|
||||
Player.maxFallSpeed = 15f;
|
||||
if (Player.PortalPhysicsEnabled)
|
||||
@@ -1104,7 +1102,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.noFallDmg = true;
|
||||
}
|
||||
|
||||
if (CalamityConfig.Instance.FasterFallHotkey)
|
||||
if (CalamityClientConfig.Instance.FasterFallHotkey)
|
||||
{
|
||||
// Allow the player to double their gravity (but NOT max fall speed!) by holding the down button while in midair.
|
||||
bool holdingDown = Player.controlDown && !Player.controlJump;
|
||||
@@ -1324,7 +1322,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
handler.OnCompleted();
|
||||
if (handler.EndSound != null && handler.ShouldPlayEndSound)
|
||||
SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault());
|
||||
SoundEngine.PlaySound(handler.EndSound.GetValueOrDefault(), Player.Center);
|
||||
expiredCooldowns.Add(id);
|
||||
}
|
||||
}
|
||||
@@ -1487,8 +1485,16 @@ namespace CalamityMod.CalPlayer
|
||||
reaverRegenCooldown++;
|
||||
else
|
||||
reaverRegenCooldown = 0;
|
||||
if (auralisAurora > 0)
|
||||
auralisAurora--;
|
||||
if (auralisAuroraCounter > 300)
|
||||
{
|
||||
auralisAuroraCounter++;
|
||||
}
|
||||
|
||||
if (auralisAuroraCounter > 1500)
|
||||
{
|
||||
auralisAuroraCounter = 0;
|
||||
auralisAuroraCooldown = CalamityUtils.SecondsToFrames(30f);
|
||||
}
|
||||
if (auralisAuroraCooldown > 0)
|
||||
auralisAuroraCooldown--;
|
||||
|
||||
@@ -1499,9 +1505,14 @@ namespace CalamityMod.CalPlayer
|
||||
else if (blazingCoreParry > 0)
|
||||
BlazingCore.HandleParryCountdown(Player);
|
||||
}
|
||||
else if (flameLickedShell && flameLickedShellParry > 0)
|
||||
else if (blazingCoreParry > 0)
|
||||
blazingCoreParry--;
|
||||
else if (flameLickedShellParry > 0)
|
||||
{
|
||||
FlameLickedShell.HandleParryCountdown(Player);
|
||||
if (flameLickedShell)
|
||||
FlameLickedShell.HandleParryCountdown(Player);
|
||||
else
|
||||
flameLickedShellParry--;
|
||||
}
|
||||
|
||||
// Silver Armor "Medkit" effect
|
||||
@@ -1563,7 +1574,7 @@ namespace CalamityMod.CalPlayer
|
||||
MiniSwamerCooldown--;
|
||||
|
||||
// God Slayer Armor dash debuff immunity
|
||||
if (DashID == GodSlayerDash.ID && Player.dashDelay < 0)
|
||||
if (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0)
|
||||
{
|
||||
foreach (int debuff in CalamityLists.debuffList)
|
||||
Player.buffImmune[debuff] = true;
|
||||
@@ -1765,9 +1776,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (raiderTalisman && !StealthStrikeAvailable())
|
||||
Player.GetCritChance<ThrowingDamageClass>() += raiderCritBonus;
|
||||
|
||||
if (kamiBoost)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.15f;
|
||||
|
||||
if (avertorBonus)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
|
||||
@@ -2454,25 +2462,18 @@ namespace CalamityMod.CalPlayer
|
||||
int chargeDuration = CalamityUtils.SecondsToFrames(5f);
|
||||
int auroraDuration = CalamityUtils.SecondsToFrames(20f);
|
||||
|
||||
if (usingScope && auralisAuroraCounter < chargeDuration + auroraDuration)
|
||||
if (usingScope && auralisAuroraCounter < chargeDuration && auralisAuroraCooldown == 0)
|
||||
auralisAuroraCounter++;
|
||||
|
||||
if (auralisAuroraCounter > chargeDuration + auroraDuration)
|
||||
{
|
||||
auralisAuroraCounter = 0;
|
||||
auralisAuroraCooldown = CalamityUtils.SecondsToFrames(30f);
|
||||
}
|
||||
|
||||
if (auralisAuroraCounter > 0 && auralisAuroraCounter < chargeDuration && !usingScope)
|
||||
auralisAuroraCounter--;
|
||||
|
||||
if (auralisAuroraCounter > chargeDuration && auralisAuroraCounter < chargeDuration + auroraDuration && !usingScope)
|
||||
auralisAuroraCounter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
auralisStealthCounter = 0f;
|
||||
auralisAuroraCounter = 0;
|
||||
if (auralisAuroraCounter > 0 && auralisAuroraCounter < 300)
|
||||
auralisAuroraCounter--;
|
||||
}
|
||||
if (auralisAuroraCooldown > 0)
|
||||
{
|
||||
@@ -2512,7 +2513,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (gravityNormalizer)
|
||||
{
|
||||
Player.buffImmune[BuffID.VortexDebuff] = true;
|
||||
if (Player.InSpace())
|
||||
if (Player.ReducedSpaceGravity())
|
||||
{
|
||||
Player.gravity = Player.defaultGravity;
|
||||
if (Player.wet)
|
||||
@@ -2715,7 +2716,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// 50% movement speed bonus so that you don't feel like a snail in the early game
|
||||
// Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy
|
||||
if (CalamityMod.Instance.overhaul is null && CalamityConfig.Instance.FasterBaseSpeed)
|
||||
if (CalamityMod.Instance.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed)
|
||||
Player.moveSpeed += BalancingConstants.DefaultMoveSpeedBoost;
|
||||
|
||||
// Reduce how slow Chilled makes the player, because it's cancerous right now
|
||||
@@ -2723,10 +2724,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.chilled)
|
||||
Player.moveSpeed *= 1f + (1f / 6f);
|
||||
|
||||
if (cirrusDress)
|
||||
Player.moveSpeed -= 0.2f;
|
||||
|
||||
if (fabsolVodka)
|
||||
if (purpleHaze)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.08f;
|
||||
|
||||
if (vodka)
|
||||
@@ -2844,26 +2842,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ActiveItem().type != ModContent.ItemType<EvilSmasher>())
|
||||
evilSmasherBoost = 0;
|
||||
}
|
||||
if (searedPanCounter > 0)
|
||||
{
|
||||
if (Player.ActiveItem().type != ModContent.ItemType<SearedPan>())
|
||||
{
|
||||
searedPanCounter = 0;
|
||||
searedPanTimer = 0;
|
||||
}
|
||||
else if (searedPanTimer < SearedPan.ConsecutiveHitOpening)
|
||||
searedPanTimer++;
|
||||
else
|
||||
searedPanCounter = 0;
|
||||
}
|
||||
|
||||
// Flight time boosts
|
||||
double flightTimeMult = 1D +
|
||||
(ZoneAstral ? 0.05 : 0D) +
|
||||
(harpyRing ? 0.2 : 0D) +
|
||||
(reaverSpeed ? 0.1 : 0D) +
|
||||
(angelTreads ? 0.1 : 0D) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.WingTimeBoost : 0D) +
|
||||
(blueCandle ? BlueCandleBuff.WingTimeBoost : 0D) +
|
||||
(soaring ? 0.1 : 0D) +
|
||||
(prismaticGreaves ? 0.1 : 0D) +
|
||||
(plagueReaper ? 0.05 : 0D) +
|
||||
@@ -3616,7 +3601,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (amalgam)
|
||||
{
|
||||
// Every other frame, increase the buff timer by one frame. Thus, the buff lasts twice as long.
|
||||
if (Player.miscCounter % 2 == 0)
|
||||
// CIT 1NOV2024: Amalgam does not add to the buff time if it's at 2 or lower,
|
||||
// to prevent buff duration showing when using infinite buff features from other mods.
|
||||
if (Player.miscCounter % 2 == 0 && Player.buffTime[l] > 2)
|
||||
Player.buffTime[l] += 1;
|
||||
|
||||
// Buffs will not go away when you die, to prevent wasting potions.
|
||||
@@ -4011,7 +3998,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Apply defense damage
|
||||
Player.statDefense -= currentDefenseDamage;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Defense can never be reduced below zero, no matter what
|
||||
@@ -4020,7 +4007,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Multiplicative defense reductions.
|
||||
// These are done last because they need to be after the defense lower cap at 0.
|
||||
if (fabsolVodka)
|
||||
if (purpleHaze)
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
@@ -4163,11 +4150,16 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (startMessageDisplayDelay == 0)
|
||||
{
|
||||
if (CalamityConfig.Instance.WikiStatusMessage)
|
||||
if (CalamityClientConfig.Instance.WikiStatusMessage)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus1");
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2");
|
||||
}
|
||||
|
||||
if (CalamityClientConfig.Instance.VCMMStatusMessage && !CalamityMod.Instance.VCMMAvailable)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.VCMMStatus");
|
||||
}
|
||||
}
|
||||
|
||||
--startMessageDisplayDelay;
|
||||
|
||||
@@ -210,6 +210,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
cgn.IncreasedHeatEffects_Fireball = fireball;
|
||||
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
cgn.IncreasedHeatEffects_FlameWakerBoots = flameWakerBoots;
|
||||
cgn.IncreasedHeatEffects_HellfireTreads = hellfireTreads;
|
||||
|
||||
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
@@ -12,8 +16,6 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
public override bool IsOmnidirectional => true;
|
||||
|
||||
public bool dustOnce = true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 30f;
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
@@ -23,6 +25,15 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Dust trail = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Unit() * 12f, DustID.RainbowTorch, -player.velocity * 0.2f, 150, Color.Aqua, 1.2f);
|
||||
trail.noGravity = true;
|
||||
|
||||
Vector2 sparkVel = player.velocity.SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(-3f, -6f);
|
||||
Color sparkColor = SpeedBlasterShot.GetColor(Main.rand.Next(5));
|
||||
float scale = Main.rand.NextFloat(1f, 1.6f); // Bloom effect is double the spark's size
|
||||
Particle spark = new CritSpark(player.Center + Main.rand.NextVector2Unit() * 12f, sparkVel, Color.White, sparkColor, scale, 15, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
// Fall way, way, faster than usual.
|
||||
player.maxFallSpeed = 50f;
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
public class SuperradiantSawDash : PlayerDashEffect
|
||||
{
|
||||
public static new string ID => "Superradiant Slaughterer";
|
||||
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||
|
||||
public override bool IsOmnidirectional => true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 36f;
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Dust trail = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Unit() * 12f, DustID.RainbowTorch, -player.velocity * 0.2f, 150, Color.Lime, 1.2f);
|
||||
trail.noGravity = true;
|
||||
|
||||
Vector2 sparkVel = player.velocity.SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(-3f, -6f);
|
||||
Color sparkColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.25f);
|
||||
float scale = Main.rand.NextFloat(1.2f, 2f); // Bloom effect is double the spark's size
|
||||
Particle spark = new CritSpark(player.Center + Main.rand.NextVector2Unit() * 12f, sparkVel, Color.White, sparkColor, scale, 24, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
// Fall way, way, faster than usual.
|
||||
player.maxFallSpeed = 50f;
|
||||
|
||||
// Dash at a much, much faster speed than the default value.
|
||||
dashSpeed = 24f;
|
||||
runSpeedDecelerationFactor = 0.8f;
|
||||
|
||||
// Cooldown for dash.
|
||||
player.Calamity().SpeedBlasterDashStarted = false;
|
||||
player.Calamity().sBlasterDashActivated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
return false;
|
||||
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
return !(drawPlayer.Calamity().auralisAuroraCooldown < 300 || drawPlayer.Calamity().auralisAuroraCooldown > 0);
|
||||
return !(drawPlayer.Calamity().auralisAuroraCounter < 300 || drawPlayer.Calamity().auralisAuroraCounter > 1500);
|
||||
}
|
||||
|
||||
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -23,9 +23,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
if (drawPlayer.armor[10].type > ItemID.None)
|
||||
headItem = drawPlayer.armor[10];
|
||||
|
||||
if (drawPlayer.Calamity().cocosFeather)
|
||||
headItem = new Item(ModContent.ItemType<CocosFeather>());
|
||||
|
||||
if (ModContent.GetModItem(headItem.type) is IExtendedHat extendedHatDrawer)
|
||||
{
|
||||
string equipSlotName = extendedHatDrawer.EquipSlotName(drawPlayer) != "" ? extendedHatDrawer.EquipSlotName(drawPlayer) : headItem.ModItem.Name;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
return drawPlayer.mount != null && (modPlayer.fab || modPlayer.crysthamyr || modPlayer.onyxExcavator);
|
||||
return drawPlayer.mount != null && (modPlayer.crysthamyr || modPlayer.onyxExcavator);
|
||||
}
|
||||
|
||||
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using CalamityMod.Items.Accessories.Wings;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Graphics.PackedVector;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.DrawLayers
|
||||
{
|
||||
public class WingsofRebirthLayer : PlayerDrawLayer
|
||||
{
|
||||
public static Asset<Texture2D> yharwingTexture;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
yharwingTexture = ModContent.Request<Texture2D>("CalamityMod/Items/Accessories/Wings/WingsofRebirth_Wings_Real");
|
||||
}
|
||||
|
||||
public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.Wings);
|
||||
|
||||
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) => drawInfo.drawPlayer.wings == EquipLoader.GetEquipSlot(Mod, "WingsofRebirth", EquipType.Wings);
|
||||
|
||||
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
|
||||
if (drawPlayer.dead)
|
||||
return;
|
||||
Texture2D texture = yharwingTexture.Value;
|
||||
Vector2 Position = drawInfo.Position;
|
||||
Vector2 pos = new Vector2((int)(Position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (2 * drawPlayer.direction)), (int)(Position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) - 2f * drawPlayer.gravDir));
|
||||
Color lightColor = Lighting.GetColor((int)drawPlayer.Center.X / 16, (int)drawPlayer.Center.Y / 16, Color.White);
|
||||
Color color = lightColor * (1 - drawInfo.shadow);
|
||||
DrawData d = new DrawData(texture, pos, texture.Frame(1, 9, 0, drawInfo.drawPlayer.wingFrame), color, 0f, new Vector2(texture.Width / 2, texture.Height / 18), 1f, drawInfo.playerEffect, 0);
|
||||
d.shader = drawInfo.drawPlayer.cWings;
|
||||
drawInfo.DrawDataCache.Add(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.DrawLayers
|
||||
{
|
||||
public class YanmeiKnifeTrail : PlayerDrawLayer
|
||||
{
|
||||
public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.BackAcc);
|
||||
|
||||
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
if (drawInfo.shadow != 0f || drawPlayer.dead)
|
||||
return false;
|
||||
|
||||
return drawPlayer.Calamity().kamiBoost;
|
||||
}
|
||||
|
||||
protected override void Draw(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
List<DrawData> existingDrawData = drawInfo.DrawDataCache;
|
||||
for (int i = 0; i < drawPlayer.Calamity().OldPositions.Length; i++)
|
||||
{
|
||||
float completionRatio = i / (float)drawPlayer.Calamity().OldPositions.Length;
|
||||
float scale = MathHelper.Lerp(1f, 0.5f, completionRatio);
|
||||
float opacity = MathHelper.Lerp(0.25f, 0.08f, completionRatio);
|
||||
List<DrawData> afterimages = new List<DrawData>();
|
||||
for (int j = 0; j < existingDrawData.Count; j++)
|
||||
{
|
||||
var drawData = existingDrawData[j];
|
||||
drawData.position = existingDrawData[j].position - drawPlayer.position + drawPlayer.oldPosition;
|
||||
drawData.color = Color.Cyan * opacity;
|
||||
drawData.color.G = (byte)(drawData.color.G * 1.6);
|
||||
drawData.color.B = (byte)(drawData.color.B * 1.2);
|
||||
drawData.scale = new Vector2(scale);
|
||||
afterimages.Add(drawData);
|
||||
}
|
||||
drawInfo.DrawDataCache.InsertRange(0, afterimages);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod
|
||||
// Config based conditions
|
||||
//
|
||||
|
||||
public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityConfig.Instance.PotionSelling);
|
||||
public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityServerConfig.Instance.PotionSelling);
|
||||
|
||||
//
|
||||
// Player conditions
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod
|
||||
public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge);
|
||||
public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental);
|
||||
public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone);
|
||||
public static readonly Condition DownedLeviathan = Create("Drops.DownedLebi", () => DownedBossSystem.downedLeviathan);
|
||||
public static readonly Condition DownedLeviathan = Create("Drops.DownedLevi", () => DownedBossSystem.downedLeviathan);
|
||||
public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus);
|
||||
public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer);
|
||||
public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager);
|
||||
|
||||
@@ -5,25 +5,21 @@ using CalamityMod.UI.DraedonsArsenal;
|
||||
using CalamityMod.UI.Rippers;
|
||||
using CalamityMod.UI.SulphurousWaterMeter;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader.Config;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
[BackgroundColor(49, 32, 36, 216)]
|
||||
public class CalamityConfig : ModConfig
|
||||
public class CalamityClientConfig : ModConfig
|
||||
{
|
||||
public static CalamityConfig Instance;
|
||||
|
||||
// TODO -- Not all Calamity config settings should be considered client side.
|
||||
// There are many configs which are server side and should stay that way.
|
||||
public static CalamityClientConfig Instance;
|
||||
public override ConfigScope Mode => ConfigScope.ClientSide;
|
||||
public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref string message) => true;
|
||||
|
||||
// Clamps values that would cause ugly problems if loaded directly without sanitization.
|
||||
[OnDeserialized]
|
||||
internal void ClampValues(StreamingContext context)
|
||||
{
|
||||
BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost);
|
||||
RipperMeterShake = Utils.Clamp(RipperMeterShake, MinMeterShake, MaxMeterShake);
|
||||
ParticleLimit = (int)Utils.Clamp(ParticleLimit, MinParticleLimit, MaxParticleLimit);
|
||||
}
|
||||
@@ -48,10 +44,6 @@ namespace CalamityMod
|
||||
[DefaultValue(5000)]
|
||||
public int ParticleLimit { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
public bool BossesStopWeather { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 10f)]
|
||||
@@ -70,6 +62,10 @@ namespace CalamityMod
|
||||
[DefaultValue(true)]
|
||||
public bool WikiStatusMessage { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool VCMMStatusMessage { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool ShopNewAlert { get; set; }
|
||||
@@ -102,6 +98,33 @@ namespace CalamityMod
|
||||
[DefaultValue(true)]
|
||||
public bool StealthMeter { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool ChargeMeter { get; set; }
|
||||
|
||||
private const float MinMeterShake = 0f;
|
||||
private const float MaxMeterShake = 4f;
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(MinMeterShake, MaxMeterShake)]
|
||||
[Increment(1f)]
|
||||
[DrawTicks]
|
||||
[DefaultValue(2f)]
|
||||
public float RipperMeterShake { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
public bool SpeedrunTimer { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool FlightBar { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Meter Positions
|
||||
[Header("MeterPositions")]
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
@@ -126,10 +149,6 @@ namespace CalamityMod
|
||||
[DefaultValue(SulphurousWaterMeterUI.DefaultPosY)]
|
||||
public float SulphuricWaterMeterPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool ChargeMeter { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
@@ -143,8 +162,28 @@ namespace CalamityMod
|
||||
public float ChargeMeterPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
public bool SpeedrunTimer { get; set; }
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultRagePosX)]
|
||||
public float RageMeterPosX { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultRagePosY)]
|
||||
public float RageMeterPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultAdrenPosX)]
|
||||
public float AdrenalineMeterPosX { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultAdrenPosY)]
|
||||
public float AdrenalineMeterPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
@@ -158,10 +197,6 @@ namespace CalamityMod
|
||||
[DefaultValue(SpeedrunTimerUI.DefaultTimerPosY)]
|
||||
public float SpeedrunTimerPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool FlightBar { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
@@ -180,15 +215,7 @@ namespace CalamityMod
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude1 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude2 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude3 { get; set; }
|
||||
public bool Interludes { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
@@ -202,6 +229,35 @@ namespace CalamityMod
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool FasterFallHotkey { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
[BackgroundColor(49, 32, 36, 216)]
|
||||
public class CalamityServerConfig : ModConfig
|
||||
{
|
||||
public static CalamityServerConfig Instance;
|
||||
public override ConfigScope Mode => ConfigScope.ServerSide;
|
||||
public override bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref NetworkText message)
|
||||
{
|
||||
if (whoAmI == 0)
|
||||
return true;
|
||||
if (whoAmI != 0)
|
||||
{
|
||||
message = CalamityUtils.GetText("Configs.CalamityServerConfig.Denied").ToNetworkText();
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clamp values that would cause ugly problems if loaded directly without sanitization.
|
||||
[OnDeserialized]
|
||||
internal void ClampValues(StreamingContext context)
|
||||
{
|
||||
BossHealthBoost = Utils.Clamp(BossHealthBoost, MinBossHealthBoost, MaxBossHealthBoost);
|
||||
}
|
||||
|
||||
#region General Gameplay Changes
|
||||
[Header("Gameplay")]
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
@@ -253,11 +309,14 @@ namespace CalamityMod
|
||||
[DrawTicks]
|
||||
[DefaultValue(MinBossHealthBoost)]
|
||||
public float BossHealthBoost { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
public bool BossesStopWeather { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Default Player Stat Boosts
|
||||
[Header("BaseBoosts")]
|
||||
|
||||
#region Default Player Stat Boosts
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool DefaultDashEnabled { get; set; }
|
||||
@@ -279,9 +338,8 @@ namespace CalamityMod
|
||||
public bool FasterTilePlacement { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Expert and Master Mode Changes
|
||||
[Header("ExpertMaster")]
|
||||
|
||||
#region Expert and Master Mode Changes
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool NerfExpertDebuffs { get; set; }
|
||||
@@ -298,44 +356,5 @@ namespace CalamityMod
|
||||
[DefaultValue(false)]
|
||||
public bool ForceTownSafety { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Revengeance Mode Changes
|
||||
[Header("Revengeance")]
|
||||
|
||||
private const float MinMeterShake = 0f;
|
||||
private const float MaxMeterShake = 4f;
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(MinMeterShake, MaxMeterShake)]
|
||||
[Increment(1f)]
|
||||
[DrawTicks]
|
||||
[DefaultValue(2f)]
|
||||
public float RipperMeterShake { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultRagePosX)]
|
||||
public float RageMeterPosX { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultRagePosY)]
|
||||
public float RageMeterPosY { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultAdrenPosX)]
|
||||
public float AdrenalineMeterPosX { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(RipperUI.DefaultAdrenPosY)]
|
||||
public float AdrenalineMeterPosY { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -55,13 +55,13 @@ using CalamityMod.UI;
|
||||
using CalamityMod.UI.CalamitasEnchants;
|
||||
using CalamityMod.UI.DraedonsArsenal;
|
||||
using CalamityMod.UI.Rippers;
|
||||
using CalamityMod.Waters;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Dyes;
|
||||
using Terraria.GameContent.Liquid;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
@@ -108,14 +108,25 @@ namespace CalamityMod
|
||||
// Destroyer glowmasks
|
||||
public static Asset<Texture2D>[] DestroyerGlowmasks = new Asset<Texture2D>[3];
|
||||
|
||||
// Holds the Texture Arrays for all the lava textures.
|
||||
// These are used for the lava styles. They are seperate from Textureasset.Instance._liquidTexture as they will conflict with ModWaterStyle
|
||||
// Can hold up to 255 lava styles (more than enough) (excluding the normal lava texture which is liquidTexture 1)
|
||||
public struct LavaTextures
|
||||
{
|
||||
public static Asset<Texture2D>[] liquid = new Asset<Texture2D>[1];
|
||||
public static Asset<Texture2D>[] slope = new Asset<Texture2D>[1];
|
||||
public static Asset<Texture2D>[] block = new Asset<Texture2D>[1];
|
||||
public static Asset<Texture2D>[] fall = new Asset<Texture2D>[1];
|
||||
}
|
||||
|
||||
public static int LavaStyle;
|
||||
|
||||
public static float[] lavaAlpha = new float[1];
|
||||
|
||||
// Wall of Flesh glowmasks
|
||||
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
|
||||
public static Asset<Texture2D> WallOfFleshDemonSickleTexture;
|
||||
|
||||
// Master Rev+ Skeletron Prime
|
||||
public static Asset<Texture2D> ChadPrime;
|
||||
public static Asset<Texture2D> ChadPrimeEyeGlowmask;
|
||||
|
||||
// DR data structure
|
||||
public static SortedDictionary<int, float> DRValues;
|
||||
|
||||
@@ -137,8 +148,14 @@ namespace CalamityMod
|
||||
internal Mod musicMod = null;
|
||||
internal bool MusicAvailable => musicMod is not null;
|
||||
|
||||
// This is Vanilla Calamity Mod Music, internally named UnCalamityModMusic.
|
||||
// VCMM is an official music add-on. Unlike the main music mod, it is not a dependency.
|
||||
internal Mod vcmm = null;
|
||||
internal bool VCMMAvailable => vcmm is not null;
|
||||
|
||||
// Please keep this in alphabetical order so it's easy to read
|
||||
internal Mod ancientsAwakened = null;
|
||||
internal Mod biomeLava = null;
|
||||
internal Mod bossChecklist = null;
|
||||
internal Mod coloredDamageTypes = null;
|
||||
internal Mod crouchMod = null;
|
||||
@@ -168,8 +185,12 @@ namespace CalamityMod
|
||||
// If any of these mods aren't loaded, it will simply keep them as null.
|
||||
musicMod = null;
|
||||
ModLoader.TryGetMod("CalamityModMusic", out musicMod);
|
||||
vcmm = null;
|
||||
ModLoader.TryGetMod("UnCalamityModMusic", out vcmm);
|
||||
ancientsAwakened = null;
|
||||
ModLoader.TryGetMod("AAMod", out ancientsAwakened);
|
||||
biomeLava = null;
|
||||
ModLoader.TryGetMod("BiomeLava", out biomeLava);
|
||||
bossChecklist = null;
|
||||
ModLoader.TryGetMod("BossChecklist", out bossChecklist);
|
||||
coloredDamageTypes = null;
|
||||
@@ -243,7 +264,10 @@ namespace CalamityMod
|
||||
SetupVanillaDR();
|
||||
SetupBossKillTimes();
|
||||
SchematicManager.Load();
|
||||
CustomLavaManagement.Load();
|
||||
|
||||
//lava
|
||||
WeakReferenceSupport.LavaStytleToBiomeLava();
|
||||
|
||||
Attunement.Load();
|
||||
BalancingChangesManager.Load();
|
||||
BaseIdleHoldoutProjectile.LoadAll();
|
||||
@@ -301,14 +325,17 @@ namespace CalamityMod
|
||||
DestroyerGlowmasks[1] = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad);
|
||||
DestroyerGlowmasks[2] = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// Lava Texture
|
||||
LavaTextures.liquid[0] = LiquidRenderer.Instance._liquidTextures[1];
|
||||
LavaTextures.slope[0] = TextureAssets.LiquidSlope[1];
|
||||
LavaTextures.block[0] = TextureAssets.Liquid[1];
|
||||
var waterfallTexture = (Asset<Texture2D>[])typeof(WaterfallManager).GetField("waterfallTexture", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public).GetValue(Main.instance.waterfallManager);
|
||||
LavaTextures.fall[0] = waterfallTexture[1];
|
||||
|
||||
// Wall of Flesh glowmasks
|
||||
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
|
||||
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// Master Rev+ Skeletron Prime textures
|
||||
ChadPrime = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad);
|
||||
ChadPrimeEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// TODO -- Sky shaders should probably be loaded in a ModSystem
|
||||
Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky();
|
||||
@@ -414,8 +441,10 @@ namespace CalamityMod
|
||||
public override void Unload()
|
||||
{
|
||||
musicMod = null;
|
||||
vcmm = null;
|
||||
|
||||
ancientsAwakened = null;
|
||||
biomeLava = null;
|
||||
bossChecklist = null;
|
||||
coloredDamageTypes = null;
|
||||
crouchMod = null;
|
||||
@@ -447,12 +476,12 @@ namespace CalamityMod
|
||||
NPCStats.Unload();
|
||||
CalamityGlobalItem.UnloadTweaks();
|
||||
CalamityGlobalProjectile.UnloadTweaks();
|
||||
FramedGlowMask.UnloadTexCache();
|
||||
|
||||
PopupGUIManager.UnloadGUIs();
|
||||
InvasionProgressUIManager.UnloadGUIs();
|
||||
BossRushEvent.Unload();
|
||||
SchematicManager.Unload();
|
||||
CustomLavaManagement.Unload();
|
||||
CooldownRegistry.Unload();
|
||||
PlayerDashManager.Unload();
|
||||
|
||||
@@ -515,7 +544,7 @@ namespace CalamityMod
|
||||
#endregion Render Target Management
|
||||
|
||||
#region Force ModConfig save (Reflection)
|
||||
internal static void SaveConfig(CalamityConfig cfg)
|
||||
internal static void SaveConfig(CalamityClientConfig cfg)
|
||||
{
|
||||
// There is no current way to manually save a mod configuration file in tModLoader.
|
||||
// The method which saves mod config files is private in ConfigManager, so reflection is used to invoke it.
|
||||
@@ -757,6 +786,10 @@ namespace CalamityMod
|
||||
// This function returns an available Calamity Music Mod track, or null if the Calamity Music Mod is not available.
|
||||
public int? GetMusicFromMusicMod(string songFilename) => MusicAvailable ? MusicLoader.GetMusicSlot(musicMod, "Sounds/Music/" + songFilename) : null;
|
||||
|
||||
// This function returns an available VCMM track, or null if VCMM is not available.
|
||||
// Unlike the main Music Mod, VCMM is hierarchical.
|
||||
public int? GetMusicFromVCMM(string songPath) => VCMMAvailable ? MusicLoader.GetMusicSlot(vcmm, "Assets/" + songPath) : null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mod Support
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\tModLoader.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>CalamityMod</AssemblyName>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.5" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -193,6 +193,29 @@ namespace CalamityMod
|
||||
}
|
||||
break;
|
||||
|
||||
case CalamityModMessageType.SyncNPCPosAndRotOnly:
|
||||
npcIndex = reader.ReadByte();
|
||||
Vector2 position = reader.ReadVector2();
|
||||
float rotation = (float)reader.ReadHalf(); //rotation unit is radian (-π/2 ≤ rotation ≤ π/2) so Half precision should works
|
||||
|
||||
if (npcIndex >= Main.maxNPCs)
|
||||
break;
|
||||
|
||||
npc = Main.npc[npcIndex];
|
||||
npc.position = position;
|
||||
npc.rotation = rotation;
|
||||
|
||||
if (Main.dedServ)
|
||||
{
|
||||
ModPacket packet = CalamityMod.Instance.GetPacket();
|
||||
packet.Write((byte)CalamityModMessageType.SyncNPCPosAndRotOnly);
|
||||
packet.Write((byte)npcIndex);
|
||||
packet.WriteVector2(position);
|
||||
packet.Write((Half)rotation);
|
||||
packet.Send(ignoreClient: whoAmI);
|
||||
}
|
||||
break;
|
||||
|
||||
//
|
||||
// Tile Entities
|
||||
//
|
||||
@@ -312,6 +335,39 @@ namespace CalamityMod
|
||||
MusicEventSystem.ReceiveSyncResponse(reader);
|
||||
break;
|
||||
|
||||
//
|
||||
// Bandit refund syncs
|
||||
//
|
||||
case CalamityModMessageType.SomeoneGotScammedByTinkerer:
|
||||
int scammedOne = reader.ReadByte();
|
||||
int stolen = reader.Read7BitEncodedInt();
|
||||
CalamityWorld.MoneyStolenByBandit += stolen;
|
||||
CalamityWorld.Reforges++;
|
||||
// Broadcast back for tragic event
|
||||
// WorldSync DO sync the MoneyStolenByBandit and Refores variable, But spamming SyncWorld is not a ideal action
|
||||
if (Main.dedServ)
|
||||
{
|
||||
ModPacket packet = CalamityMod.Instance.GetPacket();
|
||||
packet.Write((byte)CalamityModMessageType.SomeoneGotScammedByTinkerer);
|
||||
packet.Write((byte)scammedOne);
|
||||
packet.Write7BitEncodedInt(stolen);
|
||||
packet.Send(ignoreClient: scammedOne);
|
||||
}
|
||||
break;
|
||||
case CalamityModMessageType.WantToRefundReforges:
|
||||
int requester = reader.ReadByte();
|
||||
// Only Server should handle this action!
|
||||
if (!Main.dedServ)
|
||||
break;
|
||||
int banditIdx = NPC.FindFirstNPC(ModContent.NPCType<THIEF>());
|
||||
if (banditIdx == -1)
|
||||
break;
|
||||
NPC bandit = Main.npc[banditIdx];
|
||||
if (bandit == null || !bandit.active)
|
||||
break;
|
||||
THIEF.DoRefund(bandit);
|
||||
break;
|
||||
|
||||
//
|
||||
// Default case: with no idea how long the packet is, we can't safely read data.
|
||||
// Throw an exception now instead of allowing the network stream to corrupt.
|
||||
@@ -400,6 +456,7 @@ namespace CalamityMod
|
||||
// General things for entities
|
||||
SpawnNPCOnPlayer,
|
||||
SyncNPCMotionDataToServer,
|
||||
SyncNPCPosAndRotOnly,
|
||||
|
||||
// Tile Entities
|
||||
PowerCellFactory,
|
||||
@@ -437,6 +494,10 @@ namespace CalamityMod
|
||||
|
||||
// Music events
|
||||
MusicEventSyncRequest,
|
||||
MusicEventSyncResponse
|
||||
MusicEventSyncResponse,
|
||||
|
||||
// Bandit Reforge Refund
|
||||
SomeoneGotScammedByTinkerer,
|
||||
WantToRefundReforges
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public static new string ID => "ChaosState";
|
||||
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState;
|
||||
public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.chaosState;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => "CalamityMod/Cooldowns/ChaosState" + skinTexture;
|
||||
public override Color OutlineColor => outlineColor;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace CalamityMod.Cooldowns
|
||||
public class PotionSickness : CooldownHandler
|
||||
{
|
||||
public static new string ID => "PotionSickness";
|
||||
public override bool ShouldDisplay => CalamityConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0;
|
||||
public override bool ShouldDisplay => CalamityClientConfig.Instance.VanillaCooldownDisplay && instance.player.potionDelay > 0;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => "CalamityMod/Cooldowns/PotionSickness";
|
||||
public override Color OutlineColor => new Color(255, 142, 165);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class SuperradiantSawBoost : CooldownHandler
|
||||
{
|
||||
public static new string ID => "SuperradiantSawBoost";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => "CalamityMod/Cooldowns/SuperradiantSawBoost";
|
||||
public override Color OutlineColor => new Color(207, 207, 207);
|
||||
public override Color CooldownStartColor => new Color(122, 240, 58);
|
||||
public override Color CooldownEndColor => new Color(32, 186, 171);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 175 B |
@@ -213,7 +213,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 0.8 },
|
||||
|
||||
{ NPCID.SkeletronPrime, 0.85 },
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), 0.85 },
|
||||
{ NPCID.PrimeCannon, 0.85 },
|
||||
{ NPCID.PrimeLaser, 0.85 },
|
||||
{ NPCID.PrimeSaw, 0.85 },
|
||||
@@ -416,12 +415,6 @@ namespace CalamityMod
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), new int[] {
|
||||
50, // 100 while spinning
|
||||
85, // 170 while spinning
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } },
|
||||
@@ -663,9 +656,6 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class AstralSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1,178 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics.PackedVector;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class CragsLavaSplash : ModDust
|
||||
{
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.velocity *= 0.1f;
|
||||
dust.velocity.Y = -0.5f;
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
if (dust.scale > 10f)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
Dust.lavaBubbles++;
|
||||
dust.position += dust.velocity;
|
||||
if (!dust.noGravity)
|
||||
{
|
||||
dust.velocity.Y += 0.1f;
|
||||
}
|
||||
if (dust.noGravity)
|
||||
{
|
||||
dust.scale += 0.03f;
|
||||
if (dust.scale < 1f)
|
||||
{
|
||||
dust.velocity.Y += 0.075f;
|
||||
}
|
||||
dust.velocity.X *= 1.08f;
|
||||
if (dust.velocity.X > 0f)
|
||||
{
|
||||
dust.rotation += 0.01f;
|
||||
}
|
||||
else
|
||||
{
|
||||
dust.rotation -= 0.01f;
|
||||
}
|
||||
float num109 = dust.scale * 0.6f;
|
||||
if (num109 > 1f)
|
||||
{
|
||||
num109 = 1f;
|
||||
}
|
||||
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f + 1f), num109 * (2.5f / 4), num109 * (1.1f / 4), num109 * (0.1f / 4));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Collision.WetCollision(new Vector2(dust.position.X, dust.position.Y - 8f), 4, 4))
|
||||
{
|
||||
dust.scale = 0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
dust.alpha += Main.rand.Next(2);
|
||||
if (dust.alpha > 255)
|
||||
{
|
||||
dust.scale = 0f;
|
||||
}
|
||||
dust.velocity.Y = -0.5f;
|
||||
dust.alpha++;
|
||||
dust.scale -= 0.01f;
|
||||
dust.velocity.Y = -0.2f;
|
||||
dust.velocity.X += (float)Main.rand.Next(-10, 10) * 0.002f;
|
||||
if ((double)dust.velocity.X < -0.25)
|
||||
{
|
||||
dust.velocity.X = -0.25f;
|
||||
}
|
||||
if ((double)dust.velocity.X > 0.25)
|
||||
{
|
||||
dust.velocity.X = 0.25f;
|
||||
}
|
||||
}
|
||||
float num3 = dust.scale * 0.3f + 0.4f;
|
||||
if (num3 > 1f)
|
||||
{
|
||||
num3 = 1f;
|
||||
}
|
||||
Lighting.AddLight((int)(dust.position.X / 16f), (int)(dust.position.Y / 16f), num3 * (2.5f / 4), num3 * (1.1f / 4), num3 * (0.1f / 4));
|
||||
}
|
||||
dust.rotation += dust.velocity.X * 0.5f;
|
||||
if (dust.fadeIn > 0f && dust.fadeIn < 100f)
|
||||
{
|
||||
dust.scale += 0.03f;
|
||||
if (dust.scale > dust.fadeIn)
|
||||
{
|
||||
dust.fadeIn = 0f;
|
||||
}
|
||||
}
|
||||
dust.scale -= 0.01f;
|
||||
if (dust.noGravity)
|
||||
{
|
||||
dust.velocity *= 0.92f;
|
||||
if (dust.fadeIn == 0f)
|
||||
{
|
||||
dust.scale -= 0.04f;
|
||||
}
|
||||
}
|
||||
if (dust.position.Y > Main.screenPosition.Y + (float)Main.screenHeight)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
float num17 = 0.1f;
|
||||
if ((double)Dust.dCount == 0.5)
|
||||
{
|
||||
dust.scale -= 0.001f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.6)
|
||||
{
|
||||
dust.scale -= 0.0025f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.7)
|
||||
{
|
||||
dust.scale -= 0.005f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.8)
|
||||
{
|
||||
dust.scale -= 0.01f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.9)
|
||||
{
|
||||
dust.scale -= 0.02f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.5)
|
||||
{
|
||||
num17 = 0.11f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.6)
|
||||
{
|
||||
num17 = 0.13f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.7)
|
||||
{
|
||||
num17 = 0.16f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.8)
|
||||
{
|
||||
num17 = 0.22f;
|
||||
}
|
||||
if ((double)Dust.dCount == 0.9)
|
||||
{
|
||||
num17 = 0.25f;
|
||||
}
|
||||
if (dust.scale < num17)
|
||||
{
|
||||
dust.active = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Dust dust, Color lightColor)
|
||||
{
|
||||
float num = (float)(255 - dust.alpha) / 255f;
|
||||
int num4;
|
||||
int num3;
|
||||
int num2;
|
||||
num = (num + 3f) / 4f;
|
||||
num4 = (int)((int)lightColor.R * num);
|
||||
num3 = (int)((int)lightColor.G * num);
|
||||
num2 = (int)((int)lightColor.B * num);
|
||||
int num6 = lightColor.A - dust.alpha;
|
||||
if (num6 < 0)
|
||||
{
|
||||
num6 = 0;
|
||||
}
|
||||
if (num6 > 255)
|
||||
{
|
||||
num6 = 255;
|
||||
}
|
||||
return new Color(num4, num3, num2, num6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 275 B |
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class MiddleAbyssSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 246 B |
@@ -0,0 +1,20 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public abstract class SplashDust : ModDust
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
UpdateType = 33;
|
||||
}
|
||||
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.alpha = 170;
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity.Y += 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class SulphuricDepthsSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class SulphuricSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class SunkenSeaSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 241 B |
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class UpperAbyssSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1,9 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts.WaterSplash
|
||||
{
|
||||
public class VoidSplash : SplashDust
|
||||
{
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 246 B |
@@ -17,9 +17,9 @@ namespace CalamityMod.Effects
|
||||
internal static Effect AstralFogShader;
|
||||
|
||||
//
|
||||
// All below shaders created by Dominic Karma
|
||||
// All below shaders created by Lucille Karma
|
||||
//
|
||||
#region Dominic's Shaders
|
||||
#region Lucille's Shaders
|
||||
|
||||
// The Dance of Light's Blinding Light
|
||||
internal static Effect DanceOfLightBlindingShader;
|
||||
@@ -90,7 +90,7 @@ namespace CalamityMod.Effects
|
||||
// Used by Dom's Bladecrest Oathsword. Appears to govern the swing animation.
|
||||
internal static Effect LocalLinearTransformationShader;
|
||||
|
||||
// UNUSED -- Probably leftover from Dominic's experiments with applying shaders to primitives (arbitrary GPU-rendered triangles)
|
||||
// UNUSED -- Probably leftover from Lucille's experiments with applying shaders to primitives (arbitrary GPU-rendered triangles)
|
||||
internal static Effect BasicPrimitiveShader;
|
||||
|
||||
// Artemis Ohio Beam. Also used by get fixed boi Nuclear Terror's "G-FUEL BEAM"
|
||||
@@ -137,6 +137,12 @@ namespace CalamityMod.Effects
|
||||
|
||||
// Used to render the results of Navier-Stokes fluid simulations.
|
||||
internal static Effect FluidShaders;
|
||||
|
||||
// Used by projectiles fired by the Sylvestaff.
|
||||
internal static Effect SylvestaffProjectileShader;
|
||||
|
||||
// Used by the ribbons on the Sylvestaff.
|
||||
internal static Effect SylvestaffRibbonShader;
|
||||
#endregion
|
||||
|
||||
//
|
||||
@@ -243,7 +249,7 @@ namespace CalamityMod.Effects
|
||||
var astralPassReg = new AstralScreenShaderData(new Ref<Effect>(AstralFogShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f);
|
||||
RegisterSceneFilter(astralPassReg, "Astral", EffectPriority.VeryHigh);
|
||||
|
||||
#region Loading Dominic's Shaders
|
||||
#region Loading Lucille's Shaders
|
||||
|
||||
DanceOfLightBlindingShader = LoadShader("LightBurstShader");
|
||||
RegisterScreenShader(DanceOfLightBlindingShader, "BurstPass", "LightBurst");
|
||||
@@ -360,6 +366,12 @@ namespace CalamityMod.Effects
|
||||
|
||||
// This shader is not registered with the game but is invoked directly to render the results of fluid simulation.
|
||||
FluidShaders = LoadShader("FluidShaders");
|
||||
|
||||
SylvestaffProjectileShader = LoadShader("SylvestaffProjectileShader");
|
||||
RegisterMiscShader(SylvestaffProjectileShader, "TrailPass", "SylvestaffProjectile");
|
||||
|
||||
SylvestaffRibbonShader = LoadShader("SylvestaffRibbonShader");
|
||||
RegisterMiscShader(SylvestaffRibbonShader, "AutoloadPass", "SylvestaffRibbon");
|
||||
#endregion
|
||||
|
||||
#region Loading Iban's Shaders
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
float4 uShaderSpecificData;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float3 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float3 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
// Account for texture distortion artifacts.
|
||||
coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5;
|
||||
|
||||
float bump = sin(coords.y * 3.141);
|
||||
|
||||
// Calculate the amount of additive glow for this pixel, using a combination of a scrolling texture and an extreme
|
||||
// exponential squash of the prior 0-1-0 bump, creating a "center" to the glow and ensuring that the
|
||||
// ray doesn't look like just a scrolling gradient.
|
||||
float streakColor = tex2D(uImage1, coords + float2(uTime * -2.75, 0));
|
||||
float glow = streakColor.r + pow(bump, 20) * 0.4;
|
||||
|
||||
// Determine opacity based on a weaker exponential squash of the bump in order to create faded horizontal edges.
|
||||
float opacity = pow(bump, 5);
|
||||
|
||||
// Apply glow.
|
||||
opacity += glow * opacity;
|
||||
|
||||
return color * opacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
sampler noiseTextureA : register(s1);
|
||||
|
||||
float pixelationFactor;
|
||||
float uSaturation;
|
||||
float4 uShaderSpecificData;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float3 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float3 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
float QuadraticBump(float x)
|
||||
{
|
||||
return x * (4 - x * 4);
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = 1;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
coords.y = (coords.y - 0.5) / input.TextureCoordinates.z + 0.5;
|
||||
|
||||
float feelerColorStart = 0.61;
|
||||
float colorSpacingFactor = 1.9;
|
||||
float4 outlineColor = float4(91, 114, 119, 255) / 255;
|
||||
|
||||
float erasePixelInterpolant = coords.x - 0.9 - distance(coords.y, 0.5) * 0.1;
|
||||
|
||||
// Band 1: Outline color.
|
||||
color = lerp(color, outlineColor, coords.x >= feelerColorStart);
|
||||
|
||||
// Band 2: Pink.
|
||||
float pinkStart = feelerColorStart + colorSpacingFactor * 0.01;
|
||||
color = lerp(color, float4(221, 150, 179, 255) / 255, coords.x >= pinkStart);
|
||||
|
||||
// Band 3: Outline color.
|
||||
float outlineAStart = pinkStart + colorSpacingFactor * 0.04;
|
||||
color = lerp(color, outlineColor, coords.x >= outlineAStart);
|
||||
|
||||
// Band 4: Blue.
|
||||
float blueStart = outlineAStart + colorSpacingFactor * 0.01;
|
||||
color = lerp(color, float4(48, 117, 222, 255) / 255, coords.x >= blueStart);
|
||||
|
||||
// Band 5: Baby blue.
|
||||
float babyBlueStart = blueStart + colorSpacingFactor * 0.04;
|
||||
color = lerp(color, float4(167, 222, 255, 255) / 255, coords.x >= babyBlueStart);
|
||||
|
||||
// Add an outline to the ends of the feeler.
|
||||
float horizontalDistanceFromCenter = distance(coords.y, 0.5);
|
||||
color = lerp(color, outlineColor, horizontalDistanceFromCenter >= 0.3);
|
||||
color = lerp(color, outlineColor, erasePixelInterpolant >= -0.02);
|
||||
|
||||
float permittedDirection = sign(uSaturation);
|
||||
float direction = sign(dot(input.Position.xy - uShaderSpecificData.xy, uShaderSpecificData.zw));
|
||||
erasePixelInterpolant *= direction == permittedDirection || coords.x < 0.5;
|
||||
|
||||
return color * (erasePixelInterpolant < 0) * input.Color;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass AutoloadPass
|
||||
{
|
||||
VertexShader = compile vs_3_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace CalamityMod.Enums
|
||||
{
|
||||
public enum HardmodeCrateType
|
||||
{
|
||||
Biome,
|
||||
Mythril,
|
||||
Titanium
|
||||
}
|
||||
}
|
||||
@@ -242,7 +242,6 @@ namespace CalamityMod.Events
|
||||
if (inNaturalSeaPosition && player.Calamity().ZoneSulphur)
|
||||
{
|
||||
// Makes rain pour at its maximum intensity (but only after an idiot meanders into the Sulphurous Sea)
|
||||
// You'll never catch me, Fabs, Not when I shift into MAXIMUM OVERDRIVE!!
|
||||
HasStartedAcidicDownpour = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
break;
|
||||
|
||||