Skip to content

Commit

Permalink
Merge branch 'master' into shader-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ScalarVector1 authored Oct 11, 2024
2 parents a21b18c + 24b2c74 commit ced5b7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Content/Buffs/CoughDropsBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public CoughDropsBuff() : base("Cough Drops", "Your speed and damage are boosted
public override void Update(Player Player, ref int buffIndex)
{
Player.maxRunSpeed += 2;
Player.GetDamage(DamageClass.Generic) += 0.15f;
}
}
}
4 changes: 3 additions & 1 deletion Content/Items/Misc/Accessories.CoughDrops.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using StarlightRiver.Content.Buffs;
using StarlightRiver.Content.Items.BaseTypes;
using Terraria.ID;

namespace StarlightRiver.Content.Items.Misc
{
Expand All @@ -21,7 +22,8 @@ public override void Unload()

private void DelBuff(On_Player.orig_DelBuff orig, Player self, int buffId)
{
if (Main.debuff[self.buffType[buffId]] && Equipped(self))
int buffType = self.buffType[buffId];
if (Main.debuff[buffType] && !Main.buffNoTimeDisplay[buffType] && !BuffID.Sets.NurseCannotRemoveDebuff[buffType] && Equipped(self))
self.AddBuff(ModContent.BuffType<CoughDropsBuff>(), 180);

orig(self, buffId);
Expand Down
7 changes: 4 additions & 3 deletions Content/WorldGeneration/PermafrostGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ bool TryToGenerateArena(out int xPosition)
{
int arenaWidth = 109;
int stepSpacing = 20;
int arenaHeight = 180;
int stepsToLeft = (centerX - iceLeft) / stepSpacing;
int stepsToRight = (iceRight - centerX) / stepSpacing;
int startX = centerX - stepsToLeft * stepSpacing;
Expand All @@ -98,7 +99,7 @@ bool TryToGenerateArena(out int xPosition)
randomIndices[i] = i;
}

randomIndices = Helper.RandomizeList(randomIndices.ToList()).ToArray();
randomIndices = Helper.RandomizeList(randomIndices.ToList(), WorldGen.genRand).ToArray();

for (int i = 0; i < spotsToCheck; i++)
{
Expand All @@ -108,7 +109,7 @@ bool TryToGenerateArena(out int xPosition)
bool invalidLocation = false;
for (int x1 = 0; x1 < arenaWidth; x1++)
{
for (int y1 = 0; y1 < 180; y1++)
for (int y1 = 0; y1 < arenaHeight; y1++)
{
Tile tile = Framing.GetTileSafely(xPos - 40 + x1, centerY + 100 + y1);

Expand Down Expand Up @@ -262,7 +263,7 @@ bool TryToGenerateArena(out int xPosition)
/// <param name="center">Where to place the ore, in tile coordinates</param>
private void PlaceOre(Point16 center)
{
int radius = Main.rand.Next(2, 5);
int radius = WorldGen.genRand.Next(2, 5);

int frameStartX = radius == 4 ? 5 : radius == 3 ? 2 : 0;
int frameStartY = radius == 4 ? 0 : radius == 3 ? 1 : 2;
Expand Down

0 comments on commit ced5b7b

Please sign in to comment.