This commit is contained in:
mountaindrew10 committed 2024-01-20 22:04:17 -06:00
commit 7995dd55bc
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ namespace CalamityMod.Items.Weapons.Ranged
long cashAvailable = Utils.CoinsCount(out bool overflow, player.inventory);
// If the player has at least 1 gold in their inventory, spend it and use a gold coin
if (overflow || cashAvailable > 10000)
if (overflow || (cashAvailable >= 10000 && (Main.LocalPlayer.InventoryHas(ItemID.GoldCoin) || Main.LocalPlayer.InventoryHas(ItemID.PlatinumCoin))))
{
player.BuyItem(10000);
nextShotGoldCoin = true;
@@ -329,7 +329,7 @@ CrackshotColt: {
Press <right> to toss a Copper Coin in the air
Striking a coin with a bullet causes it to ricochet into the nearest enemy
Up to 4 coins can be tossed simultaneously, and shots will ricochet off multiple coins if possible
Ricocheted bullets always critically strike
Coins guarantee a critical strike after a short delay
'''
}
@@ -731,7 +731,7 @@ MidasPrime: {
Press <right> to toss a Gold Coin or Silver Coin in the air
Striking a coin with a bullet causes it to ricochet into the nearest enemy
Up to 4 coins can be tossed simultaneously, and shots will ricochet off multiple coins if possible
Ricocheted bullets always critically strike and do bonus damage based on the coins used
Coins guarantee a critical strike after a short delay and bullets do bonus damage based on coins used
'''
UltrakillEasterEgg:
'''
+3 -3
View File
@@ -269,8 +269,8 @@ namespace CalamityMod.Projectiles.Ranged
// https://www.desmos.com/calculator/ngfg5fc9ds
int numUpdatesPassed = CoinLifetime - Projectile.timeLeft;
float x = Math.Clamp((float)numUpdatesPassed / CritDelayTime, 0f, 2f); // interpolant for the crit delay sheen
float sheenFunction = Math.Min(MathF.Pow(x + 0.1f, 6f), MathF.Pow(x - 2.1f, 6f));
float sheenOpacity = Math.Clamp(sheenFunction, 0f, 1f);
float sheenFunction = Math.Min(MathF.Pow(x + 0.1f, 10f), MathF.Pow(x - 2.1f, 10f));
float sheenOpacity = Math.Clamp(sheenFunction, 0f, 2f);
// oh BOY another end begin boy
if (sheenOpacity > 0f)
@@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.Ranged
};
Main.EntitySpriteDraw(bloomTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity * 0.3f, MathHelper.PiOver2, bloomTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0);
Main.EntitySpriteDraw(shineTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity * 0.7f, MathHelper.PiOver2, shineTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0);
Main.EntitySpriteDraw(shineTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity, MathHelper.PiOver2, shineTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0);
Main.spriteBatch.End();
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);