Upgrading the rest of the yoyos

Be warned of Terrarian's fishy businesses
This commit is contained in:
Altixal committed 2023-08-12 19:40:41 +07:00
1 parent 82c52dad54
commit 9f6f8741df
24 files changed
+147 -190

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetStaticDefaults()
{
ItemID.Sets.Yoyo[Item.type] = true;
ItemID.Sets.Yoyo[Item.type] = true;
ItemID.Sets.GamepadExtraRange[Item.type] = 15;
ItemID.Sets.GamepadSmartQuickReach[Item.type] = true;
}
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 30;
Item.height = 26;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 88; // 110 pre-nerf
Item.damage = 60; // 110 pre-nerf
Item.knockBack = 4f;
Item.useTime = 22;
Item.useAnimation = 22;
+1 -1
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
Item.width = Item.height = 60;
Item.damage = 70;
Item.damage = 60;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.noUseGraphic = true;
Item.noMelee = true;
+2 -2
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetStaticDefaults()
{
ItemID.Sets.Yoyo[Item.type] = true;
ItemID.Sets.Yoyo[Item.type] = true;
ItemID.Sets.GamepadExtraRange[Item.type] = 15;
ItemID.Sets.GamepadSmartQuickReach[Item.type] = true;
}
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.width = 50;
Item.height = 36;
Item.DamageType = DamageClass.MeleeNoSpeed;
Item.damage = 82;
Item.damage = 55;
Item.knockBack = 3.5f;
Item.useTime = 25;
Item.useAnimation = 25;
@@ -157,7 +157,7 @@ Azathoth: {
Tooltip:
'''
Fires cosmic orbs that blast nearby enemies with lasers
A very agile yoyo
An exceptionally agile yoyo
'Destroy the universe in the blink of an eye'
'''
}
@@ -687,7 +687,7 @@ Lacerator: {
Tooltip:
'''
Enemies that are hit by the yoyo will have their life drained
A very agile yoyo
An exceptionally agile yoyo
[GFB]
'''
TooltipNormal: Someone thought this was a viable weapon against DoG at one point lol
@@ -923,7 +923,11 @@ Pwnagehammer: {
Quagmire: {
DisplayName: Quagmire
Tooltip: Fires spore clouds
Tooltip:
'''
Fires spore clouds
A very agile yoyo
'''
}
RedSun: {
@@ -1017,7 +1021,7 @@ SolarFlare: {
Tooltip:
'''
Emits large holy explosions on hit
A very agile yoyo
An exceptionally agile yoyo
'''
}
@@ -1210,7 +1214,7 @@ TheMicrowave: {
Tooltip:
'''
Fries nearby enemies with radiation
A very agile yoyo
An exceptionally agile yoyo
'Cooking, Astral Infection style'
'''
}
@@ -72,7 +72,6 @@ CrescentMoonFlail.DisplayName: Crescent Moon
CrescentMoonProj.DisplayName: Crescent Moon
CrystylCrusherRay.DisplayName: Crystyl Crusher Ray
Cyclone.DisplayName: Cyclone
Dark.DisplayName: Dark
DarkBall.DisplayName: Dark Ball
DarkBeam.DisplayName: Dark Beam
DarkIceZero.DisplayName: Dark Ice
@@ -121,6 +120,8 @@ Exoboom.DisplayName: Exoplasma Explosion
Exocomet.DisplayName: Comet
ExtantAbhorrence.DisplayName: Extant Abhorrence
ExtantAbhorrenceMonolith.DisplayName: Abhorrent Monolith
FallenBlast.DisplayName: Fallen Paladin's Wrath
FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo
FallenPaladinsHammerProj.DisplayName: Fallen Paladin's Hammer
Feather.DisplayName: Feather
Flarefrost.DisplayName: Flarefrost
@@ -135,7 +136,10 @@ GalaxiaTropicRing.DisplayName: Star Ring
GalaxyBlast.DisplayName: Blast
GalaxyBlastType2.DisplayName: Blast
GalaxyBlastType3.DisplayName: Blast
GalaxySmasherBlast.DisplayName: Galactic Blast
GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo
GalaxySmasherHammer.DisplayName: Galaxy Smasher
GalaxySmasherMini.DisplayName: Galaxy Smasher
GalaxyStar.DisplayName: Star
GalileosMoon.DisplayName: Crescent Moon
GalileosPlanet.DisplayName: Planet
@@ -162,7 +166,6 @@ JudgementProj.DisplayName: Judgement
LamentationsOfTheChained.DisplayName: Lamentations of the Chained
LaserFountain.DisplayName: Fountain
LifeScythe.DisplayName: Scythe
Light.DisplayName: Light
LightBeam.DisplayName: Light Beam
LightningThing.DisplayName: Lightning
LuxorsGiftMelee.DisplayName: Gift
@@ -204,7 +207,10 @@ PrismTooth.DisplayName: Photon Ripper
PurityProjection.DisplayName: Purity Projection
PurityProjectionSigil.DisplayName: Purity Sigil
PwnagehammerEcho.DisplayName: Pwnagehammer Echo
PwnagehammerExplosionSmall.DisplayName: Pwnage Blast
PwnagehammerExplosionBig.DisplayName: Pwnage Blast
PwnagehammerProj.DisplayName: Pwnagehammer
PwnagehammerSmallExplosion.DisplayName: Pwnage Blast
RainBolt.DisplayName: Bolt
RainbowBoom.DisplayName: Boom
Razorwind.DisplayName: Razorwind
@@ -261,6 +267,8 @@ VulcaniteLanceProj.DisplayName: Lance
YateveoBloomSpear.DisplayName: Yateveo Bloom
SpineOfThanatosProjectile.DisplayName: Spine of Thanatos
StarnightBeam.DisplayName: Beam
StellarContemptBlast.DisplayName: Stellar Blast
StellarContemptEcho.DisplayName: Echoes of Contempt
StellarContemptHammer.DisplayName: Stellar Contempt
StormBeam.DisplayName: Beam
StormMark.DisplayName: Mark
@@ -333,6 +341,8 @@ Whiterain.DisplayName: Rain
WulfrumScrew.DisplayName: Screw
WulfrumScrewdriverProj.DisplayName: Screwdriver
YateveoBloomProj.DisplayName: Yateveo Bloom
YinYoDark.DisplayName: Dark Shard
YinYoLight.DisplayName: Light Shard
AirSpinnerYoyo.DisplayName: Air Spinner
AortaYoyo.DisplayName: Aorta
AzathothYoyo.DisplayName: Azathoth
@@ -350,14 +360,4 @@ ShimmersparkYoyo.DisplayName: Shimmerspark
SmokingCometYoyo.DisplayName: Smoking Comet
SolarFlareYoyo.DisplayName: Solar Flare
SulphurousGrabberYoyo.DisplayName: Sulphurous Grabber
YinYoyo.DisplayName: Yin-Yo
FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo
FallenBlast.DisplayName: Fallen Paladin's Wrath
StellarContemptEcho.DisplayName: Echoes of Contempt
PwnagehammerSmallExplosion.DisplayName: Pwnage Blast
PwnagehammerExplosionSmall.DisplayName: Pwnage Blast
PwnagehammerExplosionBig.DisplayName: Pwnage Blast
GalaxySmasherMini.DisplayName: Galaxy Smasher
GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo
StellarContemptBlast.DisplayName: Stellar Blast
GalaxySmasherBlast.DisplayName: Galactic Blast
YinYoyo.DisplayName: Yin-Yo
@@ -92,7 +92,9 @@ namespace CalamityMod.Projectiles
// original: INF lifetime | 400px range | 17.5px/f top speed | 0 extra updates
{ ProjectileID.Terrarian, RebalanceYoyo(-1f, 512f, 60f, 2) },
{ ProjectileID.TerrarianBeam, Do(LocalIFrames(-1)) }, // Terrarian yoyo orbs
// Due to Terrarian's increased updates and thus increased orb spawns, giving orbs local iframes basically multiplies orb DPS by 3
// Vanilla currently uses ID static iframes which prevents such an issue. Change this with extreme caution.
// { ProjectileID.TerrarianBeam, Do(LocalIFrames(-1)) }, // Terrarian yoyo orbs
// original: INF lifetime | 360px range | 16.5px/f top speed | 0 extra updates
{ ProjectileID.TheEyeOfCthulhu, RebalanceYoyo(-1f, 480f, 36f, 1) }, // the yoyo, of course
+3 -4
View File
@@ -18,16 +18,15 @@ namespace CalamityMod.Projectiles.Melee
public override void SetDefaults()
{
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.width = 200;
Projectile.height = 200;
Projectile.width = Projectile.height = 200;
Projectile.friendly = true;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.alpha = 255;
Projectile.ignoreWater = true;
Projectile.timeLeft = 300;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
}
public override void AI()
@@ -3,10 +3,10 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class Dark : ModProjectile, ILocalizedModType
public class YinYoDark : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
private const int speedTimerMax = 60;
private const int speedTimerMax = 30;
private int speedTimer = speedTimerMax;
public override void SetStaticDefaults()
@@ -17,14 +17,15 @@ namespace CalamityMod.Projectiles.Melee
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.width = Projectile.height = 10;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.timeLeft = 300;
Projectile.penetrate = 3;
Projectile.timeLeft = 120;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 30;
}
public override void AI()
File renamed without changes.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

@@ -3,10 +3,10 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class Light : ModProjectile, ILocalizedModType
public class YinYoLight : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
private const int speedTimerMax = 60;
private const int speedTimerMax = 30;
private int speedTimer = 0;
public override void SetStaticDefaults()
@@ -17,14 +17,15 @@ namespace CalamityMod.Projectiles.Melee
public override void SetDefaults()
{
Projectile.width = 10;
Projectile.height = 10;
Projectile.width = Projectile.height = 10;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.timeLeft = 300;
Projectile.penetrate = 3;
Projectile.timeLeft = 120;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 30;
}
public override void AI()
File renamed without changes.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

+8 -8
View File
@@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class AzathothYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 3;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 700f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 880f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8;
ProjectileID.Sets.TrailingMode[Projectile.type] = 1;
@@ -21,20 +23,18 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 24;
Projectile.height = 24;
Projectile.scale = 1.2f;
Projectile.width = Projectile.height = 24;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 6;
Projectile.localNPCHitCooldown = 2 * MaxUpdates;
}
public override void AI()
{
if (Main.rand.NextBool(6))
if (Main.rand.NextBool(2 * MaxUpdates))
{
if (Projectile.owner == Main.myPlayer)
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.35f, ModContent.ProjectileType<CosmicOrb>(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
+8 -8
View File
@@ -9,11 +9,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class FaultLineYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 14f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 420f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 13f;
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
@@ -22,15 +24,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.15f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
+6 -6
View File
@@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class LaceratorYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 3;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 560f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8;
ProjectileID.Sets.TrailingMode[Projectile.type] = 1;
@@ -21,15 +23,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.1f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 8;
Projectile.localNPCHitCooldown = 3 * MaxUpdates;
}
public override void AI()
+6 -7
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class MicrowaveYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 3;
private const float Radius = 100f;
private SlotId mmmmmm;
private bool spawnedAura = false;
@@ -23,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 450f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 14f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 512f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 54f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
@@ -33,15 +34,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void SendExtraAI(BinaryWriter writer) => writer.Write(soundCooldown);
+6 -13
View File
@@ -15,13 +15,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
// Ensures that the main AI only runs once per frame, despite the projectile's multiple updates
private int extraUpdateCounter = 0;
private const int UpdatesPerFrame = 2;
private const int UpdatesPerFrame = 3;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 640f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 13f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / UpdatesPerFrame;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8;
ProjectileID.Sets.TrailingMode[Projectile.type] = 1;
@@ -30,15 +30,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.6f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = UpdatesPerFrame;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 3 * UpdatesPerFrame;
Projectile.localNPCHitCooldown = 6 * UpdatesPerFrame;
}
// localAI[1] is the shot counter. Every 5 frames, The Obliterator tries to fire a laser at a nearby target.
@@ -98,13 +96,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
ref NPC target = ref Main.npc[targets[Main.rand.Next(targets.Count)]];
const float laserSpeed = 6f;
int laserDamage = (int)(Projectile.damage * 0.5f);
const float laserKB = 3f;
Vector2 velocity = target.Center - Projectile.Center;
velocity = velocity.SafeNormalize(Vector2.Zero) * laserSpeed;
if (Projectile.owner == Main.myPlayer)
{
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserSpawnPosition, velocity, ModContent.ProjectileType<NebulaShot>(), laserDamage, laserKB, Projectile.owner);
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserSpawnPosition, velocity, ModContent.ProjectileType<NebulaShot>(), Projectile.damage, Projectile.knockBack, Projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed;
}
@@ -123,9 +119,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/Yoyos/ObliteratorYoyoGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 2f, SpriteEffects.None, 0);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
}
+8 -11
View File
@@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class OblivionYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16.5f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 448f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 48f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
@@ -21,15 +23,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.1f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
@@ -39,10 +39,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
Projectile.Kill();
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 240);
public override bool PreDraw(ref Color lightColor)
{
+4 -6
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
private const int HitsPerOrbVolley = 3;
// The aura hits once per this many frames.
private const int AuraLocalIFrames = 10;
private const int AuraLocalIFrames = 12;
// Ensures that the main AI only runs once per frame, despite the projectile's multiple updates
private const int UpdatesPerFrame = 3;
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 800f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / UpdatesPerFrame;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8;
ProjectileID.Sets.TrailingMode[Projectile.type] = 1;
@@ -62,15 +62,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 20;
Projectile.height = 20;
Projectile.scale = 1.2f;
Projectile.width = Projectile.height = 20;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = UpdatesPerFrame;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 7 * UpdatesPerFrame;
Projectile.localNPCHitCooldown = 6 * UpdatesPerFrame;
}
public override void AI()
+5 -6
View File
@@ -10,25 +10,24 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class PandemicYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 450f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16.5f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 48f / MaxUpdates;
}
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
+15 -41
View File
@@ -9,72 +9,46 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class QuagmireYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 12f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 15f;
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates;
}
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.25f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
{
if ((Projectile.position - Main.player[Projectile.owner].position).Length() > 3200f) //200 blocks
Projectile.Kill();
if (Main.rand.NextBool(5))
if (Main.rand.NextBool(5 * MaxUpdates))
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 44, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
if (Projectile.owner == Main.myPlayer)
{
int proj;
if (Main.rand.NextBool(10))
if (Main.rand.NextBool(5 * MaxUpdates))
{
proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.35f, Projectile.velocity.Y * 0.35f, ProjectileID.SporeGas, (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed;
Main.projectile[proj].usesLocalNPCImmunity = true;
Main.projectile[proj].localNPCHitCooldown = 30;
}
}
if (Main.rand.NextBool(30))
{
proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ProjectileID.SporeGas2, (int)(Projectile.damage * 0.6), Projectile.knockBack, Projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed;
Main.projectile[proj].usesLocalNPCImmunity = true;
Main.projectile[proj].localNPCHitCooldown = 30;
}
}
if (Main.rand.NextBool(50))
{
proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.15f, Projectile.velocity.Y * 0.15f, ProjectileID.SporeGas3, (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed;
Main.projectile[proj].usesLocalNPCImmunity = true;
Main.projectile[proj].localNPCHitCooldown = 30;
}
Projectile spore = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.15f, 0.35f), ProjectileID.SporeGas + Main.rand.Next(3), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner);
spore.DamageType = DamageClass.MeleeNoSpeed;
spore.usesLocalNPCImmunity = true;
spore.localNPCHitCooldown = 30;
}
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Venom, 180);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Venom, 180);
public override bool PreDraw(ref Color lightColor)
{
+8 -9
View File
@@ -9,11 +9,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class ShimmersparkYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 16f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 17f;
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 448f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates;
}
public override void SetDefaults()
@@ -25,9 +27,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
@@ -44,9 +46,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 120);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frostburn2, 120);
}
}
+6 -6
View File
@@ -10,11 +10,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class SolarFlareYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 3;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 560f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 60f / MaxUpdates;
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8;
ProjectileID.Sets.TrailingMode[Projectile.type] = 1;
@@ -23,15 +25,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1.15f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 8;
Projectile.localNPCHitCooldown = 6 * MaxUpdates;
}
public override void AI()
@@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; // 32 effective, 48 bubbled
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
@@ -29,14 +29,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 18;
Projectile.height = 18;
Projectile.scale = 1f;
Projectile.width = Projectile.height = 18;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
// Hit cooldown set in AI
}
public override void AI()
@@ -45,21 +43,17 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
{
if (bubbleStronk)
{
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 20f;
Projectile.extraUpdates = 2;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10 * Projectile.extraUpdates;
Projectile.MaxUpdates = 3;
bubbleStronkCounter++;
}
else
{
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f;
Projectile.extraUpdates = 1;
Projectile.usesLocalNPCImmunity = false;
Projectile.MaxUpdates = 2;
bubbleStronkCounter = 0;
}
Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates;
if (bubbleStronkCounter >= 240)
if (bubbleStronkCounter >= 180)
bubbleStronk = false;
for (int i = 0; i < Main.maxProjectiles; i++)
@@ -82,14 +76,14 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
bubbleCounter++;
if (bubbleCounter >= 60)
{
int bubbleAmt = 7;
int bubbleAmt = 3;
for (float i = 0; i < bubbleAmt; i++)
{
int projType = ModContent.ProjectileType<SulphurousGrabberBubble>();
if (Main.rand.NextBool(10))
projType = ModContent.ProjectileType<SulphurousGrabberBubble2>();
float angle = MathHelper.TwoPi / bubbleAmt * i + (float)Math.Sin(arbitraryTimer / 20f) * MathHelper.PiOver2;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 8f, projType, Projectile.damage / 4, Projectile.knockBack / 4, Projectile.owner);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 8f, projType, Projectile.damage / 2, Projectile.knockBack / 4, Projectile.owner);
}
bubbleCounter = 0;
}
@@ -111,9 +105,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
}
}
+9 -9
View File
@@ -9,30 +9,30 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public class YinYoyo : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public const int MaxUpdates = 2;
public override void SetStaticDefaults()
{
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 14f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 17f;
ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f;
ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f;
ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 32f / MaxUpdates;
}
public override void SetDefaults()
{
Projectile.aiStyle = ProjAIStyleID.Yoyo;
Projectile.width = 16;
Projectile.height = 16;
Projectile.scale = 1f;
Projectile.width = Projectile.height = 16;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.MeleeNoSpeed;
Projectile.penetrate = -1;
Projectile.MaxUpdates = 2;
Projectile.MaxUpdates = MaxUpdates;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 20;
Projectile.localNPCHitCooldown = 10 * MaxUpdates;
}
public override void AI()
{
CalamityUtils.MagnetSphereHitscan(Projectile, 300f, 10f, 144f, 5, Main.rand.NextBool(2) ? ModContent.ProjectileType<Dark>() : ModContent.ProjectileType<Light>());
CalamityUtils.MagnetSphereHitscan(Projectile, 300f, 10f, 144f, 5, Main.rand.NextBool(2) ? ModContent.ProjectileType<YinYoDark>() : ModContent.ProjectileType<YinYoLight>());
if ((Projectile.position - Main.player[Projectile.owner].position).Length() > 3200f) //200 blocks
Projectile.Kill();
}