Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
601e1427f0
24 files changed
+187
-157
No files matched your search
+53
-46
@@ -2771,7 +2771,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued)
|
||||
{
|
||||
gSabatonHotkeyHoldTime++;
|
||||
if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime % 3f == 0)
|
||||
if (gSabatonHotkeyHoldTime < 30 && gSabatonHotkeyHoldTime % 3f == 0)
|
||||
{
|
||||
SpawnGravistarParticle();
|
||||
}
|
||||
@@ -3475,58 +3475,65 @@ 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 < 30 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling)
|
||||
{
|
||||
Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 2f)) / 60f;
|
||||
}
|
||||
//Play sound a bit early so it goes in time with the fall
|
||||
if (gSabatonHotkeyHoldTime == 15 && !gSabatonFalling)
|
||||
{
|
||||
SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/GravistarCharge") { Volume = 0.3f });
|
||||
}
|
||||
// 0.5 seconds passed, falling time
|
||||
if (gSabatonHotkeyHoldTime == 30)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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<InterstellarStompers>()));
|
||||
//Spawn explosion. ai[0] is used for transferring the recorded falling time
|
||||
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.SlamDamage));
|
||||
|
||||
Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<StomperSlam>(), 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
|
||||
|
||||
@@ -1558,14 +1558,14 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle npcHitbox = n.getRect();
|
||||
if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(GravistarSabaton.PassthroughDamage));
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage<MeleeDamageClass>(InterstellarStompers.PassthroughDamage));
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0, Main.myPlayer);
|
||||
|
||||
// 17APR2024: Ozzatron: Gravistar Sabaton gives iframes when passing through enemies for projectile safety.
|
||||
// This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace.
|
||||
n.Calamity().dashImmunityTime[Player.whoAmI] = 4;
|
||||
Player.GiveUniversalIFrames(GravistarSabaton.PassthroughIFrames, false);
|
||||
Player.GiveUniversalIFrames(InterstellarStompers.PassthroughIFrames, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -691,18 +691,8 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(explode with { Pitch = 0.8f }, touchedTile.ToWorldCoordinates());
|
||||
GenericSparkle sparker = new GenericSparkle(touchedTile.ToWorldCoordinates(), Vector2.Zero, Color.Goldenrod, Color.Gold, 2.5f, 9, Main.rand.NextFloat(-0.01f, 0.01f), 2.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
//GeneralScreenShakePower = 200;
|
||||
Player.RemoveAllIFrames();
|
||||
Projectile.NewProjectile(new EntitySource_TileInteraction(Player, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType<AuricLandMineExplosion>(), 40000, 0f);
|
||||
//for (int i = 0; i < 3; i++)
|
||||
{
|
||||
/* int p = Projectile.NewProjectile(new EntitySource_TileInteraction(Player, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType<AresGaussNukeProjectileBoom>(), 0, 0f);
|
||||
Projectile explosion = Main.projectile[p];
|
||||
explosion.ai[1] = 560f + 90f;
|
||||
explosion.localAI[1] = 0.25f;
|
||||
explosion.Opacity = MathHelper.Lerp(0.18f, 0.6f, 0.2f) + Main.rand.NextFloat(-0.08f, 0.08f);
|
||||
explosion.netUpdate = true;*/
|
||||
}
|
||||
WorldGen.KillTile(touchedTile.X, touchedTile.Y, noItem: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ namespace CalamityMod.CalPlayer
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
|
||||
damage = Player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<SabatonBoom>(), damage, proj.knockBack, proj.owner, 1f, 0f);
|
||||
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<TitanHeartBoom>(), damage, proj.knockBack, proj.owner, 1f, 0f);
|
||||
SoundEngine.PlaySound(SoundID.Item14, proj.Center);
|
||||
for (int dustexplode = 0; dustexplode < 360; dustexplode++)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class GravistarSabaton : ModItem, ILocalizedModType
|
||||
[LegacyName("GravistarSabaton")]
|
||||
public class InterstellarStompers : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
@@ -27,6 +28,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.moveSpeed += 0.06f;
|
||||
player.jumpSpeedBoost += 1f;
|
||||
player.Calamity().gSabaton = true;
|
||||
}
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
@@ -80,7 +80,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
|
||||
// Equipment
|
||||
itemLoot.Add(ModContent.ItemType<SuspiciousLookingJellyBean>());
|
||||
itemLoot.Add(ModContent.ItemType<GravistarSabaton>());
|
||||
itemLoot.Add(ModContent.ItemType<InterstellarStompers>());
|
||||
itemLoot.AddRevBagAccessories();
|
||||
|
||||
// Vanity
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 90;
|
||||
Item.height = 100;
|
||||
Item.width = 100;
|
||||
Item.height = 118;
|
||||
Item.damage = 450;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = 25;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -60,8 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.TerraBlade).
|
||||
AddIngredient<Floodtide>().
|
||||
AddIngredient<EntropicClaymore>().
|
||||
AddIngredient<LivingShard>(9).
|
||||
AddIngredient<UelibloomBar>(7).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -17,9 +17,11 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly SoundStyle RouletteSound = new("CalamityMod/Sounds/Item/SevensStrikerRoulette") { Volume = 0.6f, SoundLimitBehavior = SoundLimitBehavior.ReplaceOldest };
|
||||
public static readonly SoundStyle RouletteTickSound = new("CalamityMod/Sounds/Item/SevensStrikerRouletteTick") { Volume = 0.5f };
|
||||
public static readonly SoundStyle BustSound = new("CalamityMod/Sounds/Item/SevensStrikerBust");
|
||||
public static readonly SoundStyle BustGFB = new("CalamityMod/Sounds/Item/SevensStrikerBustGFB");
|
||||
public static readonly SoundStyle DoublesSound = new("CalamityMod/Sounds/Item/SevensStrikerDoubles");
|
||||
public static readonly SoundStyle TriplesSound = new("CalamityMod/Sounds/Item/SevensStrikerTriples");
|
||||
public static readonly SoundStyle JackpotSound = new("CalamityMod/Sounds/Item/SevensStrikerJackpot");
|
||||
public static readonly SoundStyle JackpotGFB = new("CalamityMod/Sounds/Item/SevensStrikerJackpotGFB");
|
||||
public static readonly SoundStyle CoinSound = new("CalamityMod/Sounds/Item/SevensStrikerCoinShot") { MaxInstances = 0, PitchVariance = 0.5f };
|
||||
|
||||
public static int ShotCoin = 0; // projectile ID to use for right click, affects damage multiplier
|
||||
@@ -31,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static readonly float TriplesCherryMultiplier = 1f;
|
||||
public static readonly float TriplesCherrySplitMultiplier = 0.333f;
|
||||
public static readonly float TriplesGrapeMultiplier = 0.333f; // fixed the grapes interfering with each other's iframes
|
||||
public static readonly float JackpotMultiplier = 0.5f; // Jackpot fires 49 shots total and thus needs to be reduced somehow
|
||||
public static readonly float JackpotMultiplier = 0.5f; // Jackpot fires 49 shots total and thus needs to be reduced somehow...
|
||||
public static readonly float JackpotMultiplierGFB = 7f; // ...Unless you simply cannot stop winning
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 48;
|
||||
Item.height = 48;
|
||||
Item.width = 50;
|
||||
Item.height = 50;
|
||||
Item.damage = 16;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 912 B |
@@ -877,20 +877,6 @@ GrandGelatin: {
|
||||
'''
|
||||
}
|
||||
|
||||
GravistarSabaton: {
|
||||
DisplayName: Gravistar Sabaton
|
||||
Tooltip:
|
||||
'''
|
||||
20% increased jump speed and negates fall damage
|
||||
Hold DOWN to increase your maximum fall speed
|
||||
Hold [KEY] for 1 second while midair to charge up a superspeed slam
|
||||
While falling, you ram through enemies and don't take contact damage
|
||||
Once you hit the ground, you create an explosion at your feet
|
||||
The explosion scales in both damage and size the longer you slam for
|
||||
Temporary 40% increased jump speed after slamming into the ground
|
||||
'''
|
||||
}
|
||||
|
||||
HallowedRune: {
|
||||
DisplayName: Hallowed Rune
|
||||
Tooltip:
|
||||
@@ -981,6 +967,20 @@ InkBomb: {
|
||||
'''
|
||||
}
|
||||
|
||||
InterstellarStompers: {
|
||||
DisplayName: Interstellar Stompers
|
||||
Tooltip:
|
||||
'''
|
||||
6% increased movement speed, 20% increased jump speed, and negates fall damage
|
||||
Hold DOWN to increase your maximum fall speed
|
||||
Hold [KEY] for 0.5 seconds while midair to charge up a superspeed slam
|
||||
While falling, you ram through enemies and don't take contact damage
|
||||
Once you hit the ground, you create an explosion at your feet
|
||||
The explosion scales in both damage and size the longer you slam for
|
||||
Temporary 40% increased jump speed after slamming into the ground
|
||||
'''
|
||||
}
|
||||
|
||||
IronBoots: {
|
||||
DisplayName: Iron Boots
|
||||
Tooltip: Allows you to sink faster through liquids
|
||||
|
||||
@@ -100,8 +100,6 @@ ReaverOrb.DisplayName: Reaver Orb
|
||||
ReaverThornBase.DisplayName: Thorn
|
||||
RedLabSeeker.DisplayName: Seeking Mechanism
|
||||
RiftReelerBobber.DisplayName: Chaotic Bobber
|
||||
SabatonBoom.DisplayName: Sabaton Boom
|
||||
SabatonSlam.DisplayName: Sabaton Slam
|
||||
SandCloakVeil.DisplayName: Dust Veil
|
||||
SandExplosion.DisplayName: Sand
|
||||
Seashell.DisplayName: Seashell
|
||||
@@ -116,12 +114,14 @@ SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye
|
||||
StandingFire.DisplayName: Flame
|
||||
StarStruckWaterBottle.DisplayName: Bottle
|
||||
StickyFeatherAero.DisplayName: Feather
|
||||
StomperSlam.DisplayName: Stomper Slam
|
||||
SuicideBomberDemon.DisplayName: Demon
|
||||
SulphuricAcidBubbleFriendly.DisplayName: Acid Bubble
|
||||
SulphurousSandBallGun.DisplayName: Sulphurous Sand
|
||||
TarraEnergy.DisplayName: Tarra Energy
|
||||
TarragonAura.DisplayName: Tarragon Aura
|
||||
TeslaAura.DisplayName: Tesla's Electricity
|
||||
TitanHeartBoom.DisplayName: Titan Heart Boom
|
||||
VerstaltiteBobber.DisplayName: Verstaltite Bobber
|
||||
VoidFieldGenerator.DisplayName: Void Field Generator
|
||||
WaterConvertor.DisplayName: Water Convertor
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
normalOnly.Add(ModContent.ItemType<ThankYouPainting>(), ThankYouPainting.DropInt);
|
||||
|
||||
// Equipment
|
||||
normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType<GravistarSabaton>()));
|
||||
normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType<InterstellarStompers>()));
|
||||
|
||||
// Other
|
||||
normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType<AureusCell>(), 1, 9, 12));
|
||||
|
||||
@@ -5318,11 +5318,12 @@ namespace CalamityMod.NPCs
|
||||
npc.velocity *= 0.9f;
|
||||
}
|
||||
|
||||
// Auric Ore/Repulsers reject Town NPCs and dummies
|
||||
// Auric Ore/Repulsers reject Town NPCs and dummies (Auric Land Mines work on them too)
|
||||
if ((NPCID.Sets.ActsLikeTownNPC[npc.type] || npc.townNPC) && !npc.dontTakeDamage || npc.type == NPCType<SuperDummyNPC>())
|
||||
{
|
||||
int auricOreID = TileType<AuricOre>();
|
||||
int auricRepulserID = TileType<AuricRepulserPanelTile>();
|
||||
int auricLandMineID = TileType<AuricLandMineTile>();
|
||||
|
||||
// Get a list of tiles near the npc
|
||||
// This is just Collision.GetEntityTiles but with a larger detection square because the sheer speed from auric boosts causes the detection to fail at higher speeds
|
||||
@@ -5372,6 +5373,18 @@ namespace CalamityMod.NPCs
|
||||
Tile tile = Framing.GetTileSafely(touchedTile);
|
||||
if (!tile.HasTile || !tile.HasUnactuatedTile)
|
||||
continue;
|
||||
|
||||
if (tile.TileType == auricLandMineID)
|
||||
{
|
||||
SoundStyle explode = new("CalamityMod/Sounds/Item/DudFire");
|
||||
SoundEngine.PlaySound(explode with { Pitch = 0.8f }, touchedTile.ToWorldCoordinates());
|
||||
GenericSparkle sparker = new GenericSparkle(touchedTile.ToWorldCoordinates(), Vector2.Zero, Color.Goldenrod, Color.Gold, 2.5f, 9, Main.rand.NextFloat(-0.01f, 0.01f), 2.68f);
|
||||
GeneralParticleHandler.SpawnParticle(sparker);
|
||||
Projectile.NewProjectile(new EntitySource_TileInteraction(npc, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType<AuricLandMineExplosion>(), 40000, 0f);
|
||||
WorldGen.KillTile(touchedTile.X, touchedTile.Y, noItem: true);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tile.TileType != auricOreID && tile.TileType != auricRepulserID)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public int soundtimer = 0; // Counts how long the slot machine has been spinning + the cooldown
|
||||
|
||||
public SlotId RouletteSoundSlot;
|
||||
public SlotId JingleSoundSlot;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -134,18 +135,18 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// Play a sound and display the jackpot text
|
||||
if (shottimer == 1)
|
||||
{
|
||||
SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center);
|
||||
JingleSoundSlot = SoundEngine.PlaySound(Main.zenithWorld ? TheSevensStriker.JackpotGFB : TheSevensStriker.JackpotSound, player.Center);
|
||||
CombatText.NewText(player.getRect(), Color.Gold, CalamityUtils.GetTextValue("Misc.SevensJackpot"), true);
|
||||
}
|
||||
// Every 7 frames, shoot 7 coins. The first 7 frames are excluded for timing purposes
|
||||
if (shottimer % 7 == 0 && shottimer > 7)
|
||||
if (shottimer % 7 == 0 && shottimer > 7 && shottimer <= 56)
|
||||
{
|
||||
int jackpotDamage = (int)(weaponDamage * TheSevensStriker.JackpotMultiplier);
|
||||
int jackpotDamage = (int)(weaponDamage * (Main.zenithWorld ? TheSevensStriker.JackpotMultiplierGFB : TheSevensStriker.JackpotMultiplier));
|
||||
Shoot(7, ModContent.ProjectileType<SevensStrikerPlatinumCoin>(), jackpotDamage, weaponKnockback, (int)scaleFactor * 2f, 0.2f);
|
||||
SoundEngine.PlaySound(TheSevensStriker.CoinSound, Projectile.Center);
|
||||
}
|
||||
// After 7 waves have been shot, reset the gun and roll again
|
||||
if (shottimer > 56)
|
||||
if (shottimer > (Main.zenithWorld ? 88 : 56))
|
||||
{
|
||||
soundtimer = 0;
|
||||
rolling = true;
|
||||
@@ -166,14 +167,14 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
case 1:
|
||||
Shoot(1, ModContent.ProjectileType<SevensStrikerBrick>(), weaponDamage, 0, 2f, 0);
|
||||
CombatText.NewText(player.getRect(), Color.Gray, CalamityUtils.GetTextValue("Misc.SevensBust"), true);
|
||||
SoundEngine.PlaySound(TheSevensStriker.BustSound, Projectile.Center);
|
||||
JingleSoundSlot = SoundEngine.PlaySound(Main.zenithWorld ? TheSevensStriker.BustGFB : TheSevensStriker.BustSound, player.Center);
|
||||
break;
|
||||
// 7 exploding oranges with 100% damage
|
||||
case 2:
|
||||
int doublesDamage = (int)(weaponDamage * TheSevensStriker.DoublesMultiplier);
|
||||
Shoot(7, ModContent.ProjectileType<SevensStrikerOrange>(), doublesDamage, weaponKnockback, 2f, 0.1f);
|
||||
CombatText.NewText(player.getRect(), Color.Orange, CalamityUtils.GetTextValue("Misc.SevensDoubles"), true);
|
||||
SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center);
|
||||
JingleSoundSlot = SoundEngine.PlaySound(TheSevensStriker.DoublesSound, player.Center);
|
||||
break;
|
||||
// 7 piercing grapes with X% damage
|
||||
// Also fires 7 splitting cherries in a tighter spread with Y% damage
|
||||
@@ -183,13 +184,13 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Shoot(7, ModContent.ProjectileType<SevensStrikerCherry>(), cherryDamage, weaponKnockback, 1.5f, 0.1f);
|
||||
Shoot(7, ModContent.ProjectileType<SevensStrikerGrape>(), grapeDamage, weaponKnockback, 2f, 0.2f);
|
||||
CombatText.NewText(player.getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.SevensTriples"), true);
|
||||
SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center);
|
||||
JingleSoundSlot = SoundEngine.PlaySound(TheSevensStriker.TriplesSound, player.Center);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the gun and roll again
|
||||
if (shottimer > 16)
|
||||
if (shottimer > (Main.zenithWorld ? 56 : 16))
|
||||
{
|
||||
soundtimer = 0;
|
||||
rolling = true;
|
||||
@@ -198,9 +199,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
}
|
||||
}
|
||||
// Update the roll sound position
|
||||
// Update the roll and jingle sound positions, if applicable
|
||||
if (SoundEngine.TryGetActiveSound(RouletteSoundSlot, out var rouletteSound) && rouletteSound.IsPlaying)
|
||||
rouletteSound.Position = Projectile.Center;
|
||||
|
||||
if (SoundEngine.TryGetActiveSound(JingleSoundSlot, out var jingle) && jingle.IsPlaying)
|
||||
jingle.Position = player.Center;
|
||||
}
|
||||
// If the player can't use the gun, KILL it
|
||||
else
|
||||
@@ -237,62 +241,73 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// Calculates which attack will occur based on coin.
|
||||
public int CalculateOutcome()
|
||||
{
|
||||
switch (Projectile.ai[0])
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
// Copper Coins have:
|
||||
// 50% chance for a brick
|
||||
// 30% chance for oranges
|
||||
// 15% chance for grapes and cherries
|
||||
// 5% chance for a jackpot
|
||||
case ProjectileID.CopperCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 50)
|
||||
return 1;
|
||||
else if (roll > 50 && roll <= 80)
|
||||
return 2;
|
||||
else if (roll > 80 && roll <= 95)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Silver Coins have:
|
||||
// 20% chance for a brick
|
||||
// 50% chance for oranges
|
||||
// 20% chance for grapes and cherries
|
||||
// 10% chance for a jackpot
|
||||
case ProjectileID.SilverCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 20)
|
||||
return 1;
|
||||
else if (roll > 20 && roll <= 70)
|
||||
return 2;
|
||||
else if (roll > 70 && roll <= 90)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Gold Coins have:
|
||||
// 5% chance for a brick
|
||||
// 30% chance for oranges
|
||||
// 50% chance for grapes and cherries
|
||||
// 15% chance for a jackpot
|
||||
case ProjectileID.GoldCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 5)
|
||||
return 1;
|
||||
else if (roll > 5 && roll <= 35)
|
||||
return 2;
|
||||
else if (roll > 35 && roll <= 85)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Platinum Coins are a guaranteed jackpot
|
||||
case ProjectileID.PlatinumCoin:
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll < 20)
|
||||
return 4;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Projectile.ai[0])
|
||||
{
|
||||
// Copper Coins have:
|
||||
// 50% chance for a brick
|
||||
// 30% chance for oranges
|
||||
// 15% chance for grapes and cherries
|
||||
// 5% chance for a jackpot
|
||||
case ProjectileID.CopperCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 50)
|
||||
return 1;
|
||||
else if (roll > 50 && roll <= 80)
|
||||
return 2;
|
||||
else if (roll > 80 && roll <= 95)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Silver Coins have:
|
||||
// 20% chance for a brick
|
||||
// 50% chance for oranges
|
||||
// 20% chance for grapes and cherries
|
||||
// 10% chance for a jackpot
|
||||
case ProjectileID.SilverCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 20)
|
||||
return 1;
|
||||
else if (roll > 20 && roll <= 70)
|
||||
return 2;
|
||||
else if (roll > 70 && roll <= 90)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Gold Coins have:
|
||||
// 5% chance for a brick
|
||||
// 30% chance for oranges
|
||||
// 50% chance for grapes and cherries
|
||||
// 15% chance for a jackpot
|
||||
case ProjectileID.GoldCoin:
|
||||
{
|
||||
int roll = Main.rand.Next(100);
|
||||
if (roll <= 5)
|
||||
return 1;
|
||||
else if (roll > 5 && roll <= 35)
|
||||
return 2;
|
||||
else if (roll > 35 && roll <= 85)
|
||||
return 3;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
// Platinum Coins are a guaranteed jackpot
|
||||
case ProjectileID.PlatinumCoin:
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
// This should never be returned
|
||||
return 1;
|
||||
@@ -336,12 +351,15 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
return false;
|
||||
}
|
||||
|
||||
// When the gun disappears, stop any in-progress slots sounds and set a cooldown of 12 frames.
|
||||
// When the gun disappears, stop any in-progress slot or jingle sounds and set a cooldown of 12 frames.
|
||||
public override void OnKill(int timeLeft)
|
||||
{
|
||||
if (SoundEngine.TryGetActiveSound(RouletteSoundSlot, out var dringdring))
|
||||
dringdring.Stop();
|
||||
|
||||
if (SoundEngine.TryGetActiveSound(JingleSoundSlot, out var jingle))
|
||||
jingle.Stop();
|
||||
|
||||
Main.player[Projectile.owner].SetDummyItemTime(12);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
Projectile.height = 10;
|
||||
Projectile.width = Projectile.height = 20;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = 1;
|
||||
//Projectile.aiStyle = ProjAIStyleID.StickProjectile;
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 10;
|
||||
Projectile.height = 10;
|
||||
Projectile.width = Projectile.height = 20;
|
||||
Projectile.friendly = true;
|
||||
Projectile.penetrate = 1;
|
||||
Projectile.aiStyle = ProjAIStyleID.StickProjectile;
|
||||
|
||||
@@ -11,7 +11,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class SabatonSlam : ModProjectile, ILocalizedModType
|
||||
public class StomperSlam : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Typeless";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
}
|
||||
if (Projectile.localAI[0] == 0)
|
||||
{
|
||||
scaleFromFall = (Projectile.ai[0] / 22) + 0.5f;
|
||||
scaleFromFall = (Projectile.ai[0] / 20) + 0.5f;
|
||||
damageScaleFromFall = Projectile.ai[0] / 40;
|
||||
Projectile.damage = (int)(300f * damageScaleFromFall + 300f);
|
||||
|
||||
@@ -3,7 +3,7 @@ using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class SabatonBoom : ModProjectile, ILocalizedModType
|
||||
public class TitanHeartBoom : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Typeless";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user