This commit is contained in:
Phuc Nguyen (Brav) committed 2022-09-19 22:18:37 -04:00
commit 57881ca8b8
104 files changed
+494 -2852

No files matched your search

+1 -3
View File
@@ -8,9 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Penumbra");
Description.SetDefault("Stealth regenerates 15% faster while moving\n" +
"At night, stealth additionally regenerates 15% faster while standing still\n" +
"Both boosts increase to 20% during a solar eclipse");
Description.SetDefault("Stealth regenerates 10% faster while moving and 15% faster while standing still");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+3 -2
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shadow");
Description.SetDefault("You're invisible, certain rogue weapons give and gain buffs, and stealth generation is boosted.");
Description.SetDefault("You are a shadow, rogue weapons spawn projectiles on hit, and stealth generation is boosted by 8%");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -16,8 +16,9 @@ namespace CalamityMod.Buffs.Potions
public override void Update(Player player, ref int buffIndex)
{
player.invis = true;
player.Calamity().shadow = true;
if (player.yoraiz0rEye < 2 && CalamityConfig.Instance.StealthInvisibility)
player.yoraiz0rEye = 2;
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ModLoader;
File diff suppressed because it is too large. Load diff
+6
View File
@@ -544,6 +544,12 @@ namespace CalamityMod.CalPlayer
drawInfo.GoreCache.Add(heart);
}
}
if (calamityPlayer.shadow && CalamityConfig.Instance.StealthInvisibility)
{
r *= 0f;
g *= 0f;
b *= 0f;
}
}
#endregion
+2 -20
View File
@@ -670,10 +670,6 @@ namespace CalamityMod.CalPlayer
}
}
// Proficiency level ups
if (CalamityConfig.Instance.Proficiency)
GetExactLevelUp();
// Max mana bonuses
Player.statManaMax2 +=
(permafrostsConcoction ? 50 : 0) +
@@ -1101,6 +1097,8 @@ namespace CalamityMod.CalPlayer
silvaMageCooldown--;
if (tarraMageHealCooldown > 0)
tarraMageHealCooldown--;
if (scuttlerCooldown > 0)
scuttlerCooldown--;
if (rogueCrownCooldown > 0)
rogueCrownCooldown--;
if (spectralVeilImmunity > 0)
@@ -2570,18 +2568,6 @@ namespace CalamityMod.CalPlayer
if (CalamityLists.highTestFishList.Contains(Player.ActiveItem().type))
Player.accFishingLine = true;
if (CalamityLists.boomerangList.Contains(Player.ActiveItem().type) && Player.invis)
Player.GetDamage<ThrowingDamageClass>() += 0.1f;
if (CalamityLists.javelinList.Contains(Player.ActiveItem().type) && Player.invis)
Player.GetArmorPenetration<GenericDamageClass>() += 5;
if (CalamityLists.flaskBombList.Contains(Player.ActiveItem().type) && Player.invis)
rogueVelocity += 0.1f;
if (CalamityLists.spikyBallList.Contains(Player.ActiveItem().type) && Player.invis)
Player.GetCritChance<RogueDamageClass>() += 10;
if (planarSpeedBoost != 0)
{
if (Player.ActiveItem().type != ModContent.ItemType<PridefulHuntersPlanarRipper>())
@@ -3126,7 +3112,6 @@ namespace CalamityMod.CalPlayer
if (eArtifact)
{
Player.manaCost *= 0.85f;
Player.GetDamage<ThrowingDamageClass>() += 0.15f;
Player.maxMinions += 2;
}
@@ -3488,9 +3473,6 @@ namespace CalamityMod.CalPlayer
Player.GetCritChance<MeleeDamageClass>() += 5;
}
if (CalamityConfig.Instance.Proficiency)
GetStatBonuses();
// Amalgam boosts
if (Main.myPlayer == Player.whoAmI)
{
-128
View File
@@ -22,16 +22,6 @@ namespace CalamityMod.CalPlayer
private void EnterWorldSync()
{
StandardSync();
SyncExactLevel(false, 0);
SyncExactLevel(false, 1);
SyncExactLevel(false, 2);
SyncExactLevel(false, 3);
SyncExactLevel(false, 4);
SyncLevel(false, 0);
SyncLevel(false, 1);
SyncLevel(false, 2);
SyncLevel(false, 3);
SyncLevel(false, 4);
}
internal void MouseControlsSync()
@@ -42,74 +32,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Creating and Sending Packets
private void SyncExactLevel(bool server, int levelType)
{
ModPacket packet = Mod.GetPacket();
switch (levelType)
{
case 0:
packet.Write((byte)CalamityModMessageType.ExactMeleeLevelSync);
packet.Write(Player.whoAmI);
packet.Write(exactMeleeLevel);
break;
case 1:
packet.Write((byte)CalamityModMessageType.ExactRangedLevelSync);
packet.Write(Player.whoAmI);
packet.Write(exactRangedLevel);
break;
case 2:
packet.Write((byte)CalamityModMessageType.ExactMagicLevelSync);
packet.Write(Player.whoAmI);
packet.Write(exactMagicLevel);
break;
case 3:
packet.Write((byte)CalamityModMessageType.ExactSummonLevelSync);
packet.Write(Player.whoAmI);
packet.Write(exactSummonLevel);
break;
case 4:
packet.Write((byte)CalamityModMessageType.ExactRogueLevelSync);
packet.Write(Player.whoAmI);
packet.Write(exactRogueLevel);
break;
}
Player.SendPacket(packet, server);
}
private void SyncLevel(bool server, int levelType)
{
ModPacket packet = Mod.GetPacket(256);
switch (levelType)
{
case 0:
packet.Write((byte)CalamityModMessageType.MeleeLevelSync);
packet.Write(Player.whoAmI);
packet.Write(meleeLevel);
break;
case 1:
packet.Write((byte)CalamityModMessageType.RangedLevelSync);
packet.Write(Player.whoAmI);
packet.Write(rangedLevel);
break;
case 2:
packet.Write((byte)CalamityModMessageType.MagicLevelSync);
packet.Write(Player.whoAmI);
packet.Write(magicLevel);
break;
case 3:
packet.Write((byte)CalamityModMessageType.SummonLevelSync);
packet.Write(Player.whoAmI);
packet.Write(summonLevel);
break;
case 4:
packet.Write((byte)CalamityModMessageType.RogueLevelSync);
packet.Write(Player.whoAmI);
packet.Write(rogueLevel);
break;
}
Player.SendPacket(packet, server);
}
public void SyncDefenseDamage(bool server)
{
ModPacket packet = Mod.GetPacket(256);
@@ -207,56 +129,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Reading and Handling Packets
internal void HandleExactLevels(BinaryReader reader, int levelType)
{
switch (levelType)
{
case 0:
exactMeleeLevel = reader.ReadInt32();
break;
case 1:
exactRangedLevel = reader.ReadInt32();
break;
case 2:
exactMagicLevel = reader.ReadInt32();
break;
case 3:
exactSummonLevel = reader.ReadInt32();
break;
case 4:
exactRogueLevel = reader.ReadInt32();
break;
}
if (Main.netMode == NetmodeID.Server)
SyncExactLevel(true, levelType);
}
internal void HandleLevels(BinaryReader reader, int levelType)
{
switch (levelType)
{
case 0:
meleeLevel = reader.ReadInt32();
break;
case 1:
rangedLevel = reader.ReadInt32();
break;
case 2:
magicLevel = reader.ReadInt32();
break;
case 3:
summonLevel = reader.ReadInt32();
break;
case 4:
rogueLevel = reader.ReadInt32();
break;
}
if (Main.netMode == NetmodeID.Server)
SyncLevel(true, levelType);
}
internal void HandleRage(BinaryReader reader)
{
rage = reader.ReadSingle();
+13 -52
View File
@@ -393,7 +393,7 @@ namespace CalamityMod.CalPlayer
ProjLifesteal(target, proj, damage, crit);
ProjOnHit(proj, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue);
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), proj.CountsAsClass<ThrowingDamageClass>(), true);
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.CountsAsClass<SummonDamageClass>(), proj.CountsAsClass<ThrowingDamageClass>(), true);
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
if (target.type == NPCID.TargetDummy || target.type == NPCType<SuperDummyNPC>())
@@ -615,7 +615,7 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<Plague>(), 300);
}
ProjOnHit(proj, target.Center, crit, true);
PvpDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.IsSummon(), proj.CountsAsClass<ThrowingDamageClass>(), true);
PvpDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.CountsAsClass<SummonDamageClass>(), proj.CountsAsClass<ThrowingDamageClass>(), true);
}
}
#endregion
@@ -762,7 +762,7 @@ namespace CalamityMod.CalPlayer
RangedOnHit(proj, modProj, position, crit, npcCheck);
if (proj.CountsAsClass<MagicDamageClass>())
MagicOnHit(proj, modProj, position, crit, npcCheck);
if (proj.IsSummon())
if (proj.CountsAsClass<SummonDamageClass>() && !proj.CountsAsClass<SummonMeleeSpeedDamageClass>())
SummonOnHit(proj, modProj, position, crit, npcCheck);
if (proj.CountsAsClass<ThrowingDamageClass>())
RogueOnHit(proj, modProj, position, crit, npcCheck);
@@ -902,6 +902,7 @@ namespace CalamityMod.CalPlayer
private void SummonOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck)
{
var source = proj.GetSource_FromThis();
if (npcCheck)
{
if (phantomicArtifact)
@@ -1161,7 +1162,10 @@ namespace CalamityMod.CalPlayer
int featherDamage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(15);
int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType<StickyFeather>(), featherDamage, 3f, proj.owner);
if (feather.WithinBounds(Main.maxProjectiles))
{
Main.projectile[feather].DamageType = DamageClass.Generic;
Main.projectile[feather].extraUpdates += 3;
}
}
spawnedFeathers = true;
}
@@ -1234,55 +1238,12 @@ namespace CalamityMod.CalPlayer
if (shadow && shadowPotCooldown <= 0 && modProj.stealthStrikeHitCount < 5)
{
if (CalamityLists.javelinProjList.Contains(proj.type))
{
int randrot = Main.rand.Next(-30, 391);
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
Main.projectile[soul].DamageType = DamageClass.Generic;
shadowPotCooldown = 30;
}
if (CalamityLists.spikyBallProjList.Contains(proj.type))
{
int scythe = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<CosmicScythe>(), (int)(proj.damage * 0.05), 3f, proj.owner, 1f, 0f);
if (scythe.WithinBounds(Main.maxProjectiles))
Main.projectile[scythe].DamageType = DamageClass.Generic;
Main.projectile[scythe].usesLocalNPCImmunity = true;
Main.projectile[scythe].localNPCHitCooldown = 10;
Main.projectile[scythe].penetrate = 2;
shadowPotCooldown = 30;
}
if (CalamityLists.daggerProjList.Contains(proj.type))
{
Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f));
shardVelocity.Normalize();
shardVelocity *= 5f;
int shard = Projectile.NewProjectile(spawnSource, proj.Center, shardVelocity, ProjectileType<EquanimityDarkShard>(), (int)(proj.damage * 0.15), 0f, proj.owner);
if (shard.WithinBounds(Main.maxProjectiles))
Main.projectile[shard].DamageType = DamageClass.Generic;
Main.projectile[shard].timeLeft = 150;
shadowPotCooldown = 30;
}
if (CalamityLists.boomerangProjList.Contains(proj.type))
{
int spiritDamage = (int)(proj.damage * 0.2);
Projectile ghost = CalamityUtils.SpawnOrb(proj, spiritDamage, ProjectileID.SpectreWrath, 800f, 4f);
if (ghost.whoAmI.WithinBounds(Main.maxProjectiles))
{
ghost.DamageType = DamageClass.Generic;
ghost.penetrate = 1;
}
shadowPotCooldown = 30;
}
if (CalamityLists.flaskBombProjList.Contains(proj.type))
{
int blackhole = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<ShadowBlackhole>(), (int)(proj.damage * 0.05), 3f, proj.owner, 0f, 0f);
if (blackhole.WithinBounds(Main.maxProjectiles))
Main.projectile[blackhole].DamageType = DamageClass.Generic;
Main.projectile[blackhole].Center = proj.Center;
shadowPotCooldown = 30;
}
int randrot = Main.rand.Next(-30, 391);
Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot));
int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType<PenumbraSoul>(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f);
if (soul.WithinBounds(Main.maxProjectiles))
Main.projectile[soul].DamageType = DamageClass.Generic;
shadowPotCooldown = 30;
}
if (npcCheck)
-7
View File
@@ -198,12 +198,6 @@ namespace CalamityMod
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.EarlyHardmodeProgressionRework")]
public bool EarlyHardmodeProgressionRework { get; set; }
[Label("$Mods.CalamityMod.Config.EntryTitle.Proficiency")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.Proficiency")]
public bool Proficiency { get; set; }
[Label("$Mods.CalamityMod.Config.EntryTitle.BossZen")]
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
@@ -408,7 +402,6 @@ namespace CalamityMod
new("RemoveReforgeRNG", ItemID.TinHammer),
new("EarlyHardmodeProgressionRework", ItemID.Pwnhammer),
new("Proficiency", ModContent.ItemType<MagicLevelMeter>()),
new("BossZen", ModContent.ItemType<ZenPotion>()),
new("TownNPCsSpawnAtNight", ItemID.ClothierVoodooDoll),
new("TownNPCSpawnRateMultiplier", ItemID.GuideVoodooDoll),
-317
View File
@@ -109,16 +109,6 @@ namespace CalamityMod
public static List<int> needsDebuffIconDisplayList;
public static List<int> trapProjectileList;
public static List<int> scopedWeaponList;
public static List<int> boomerangList;
public static List<int> javelinList;
public static List<int> daggerList;
public static List<int> flaskBombList;
public static List<int> spikyBallList;
public static List<int> boomerangProjList;
public static List<int> javelinProjList;
public static List<int> daggerProjList;
public static List<int> flaskBombProjList;
public static List<int> spikyBallProjList;
public static List<int> lavaFishList;
public static List<int> highTestFishList;
public static List<int> flamethrowerList;
@@ -1328,303 +1318,6 @@ namespace CalamityMod
ItemType<TyrannysEnd>()
};
boomerangList = new List<int>()
{
ItemType<Brimblade>(),
ItemType<BlazingStar>(),
ItemType<Celestus>(),
ItemType<DynamicPursuer>(),
ItemType<ElementalDisk>(),
ItemType<EnchantedAxe>(),
ItemType<EpidemicShredder>(),
ItemType<Equanimity>(),
ItemType<Eradicator>(),
ItemType<SubductionSlicer>(),
ItemType<Glaive>(),
ItemType<GhoulishGouger>(),
ItemType<Icebreaker>(),
ItemType<KelvinCatalyst>(),
ItemType<Kylie>(),
ItemType<MangroveChakram>(),
ItemType<MoltenAmputator>(),
ItemType<NanoblackReaper>(),
ItemType<SandDollar>(),
ItemType<FishboneBoomerang>(),
ItemType<InfestedClawmerang>(),
ItemType<Valediction>(),
ItemType<FrostcrushValari>(),
ItemType<DefectiveSphere>(),
ItemType<TerraDisk>(),
ItemType<ToxicantTwister>(),
ItemType<TrackingDisk>()
};
boomerangProjList = new List<int>()
{
ProjectileType<DynamicPursuerProjectile>(),
ProjectileType<ElementalDiskProj>(),
ProjectileType<ElementalDiskSplit>(),
ProjectileType<BlazingStarProj>(),
ProjectileType<CelestusBoomerang>(),
ProjectileType<BrimbladeProj>(),
ProjectileType<Brimblade2>(),
ProjectileType<EnchantedAxeProj>(),
ProjectileType<EpidemicShredderProjectile>(),
ProjectileType<EquanimityProj>(),
ProjectileType<EradicatorProjectile>(),
ProjectileType<SubductionSlicerProj>(),
ProjectileType<GhoulishGougerBoomerang>(),
ProjectileType<GlaiveProj>(),
ProjectileType<KylieBoomerang>(),
ProjectileType<MangroveChakramProjectile>(),
ProjectileType<MoltenAmputatorProj>(),
ProjectileType<FallenPaladinsHammerProj>(),
ProjectileType<SandDollarProj>(),
ProjectileType<SandDollarStealth>(),
ProjectileType<FishboneBoomerangProjectile>(),
ProjectileType<InfestedClawmerangProj>(),
ProjectileType<TriactisHammerProj>(),
ProjectileType<ValedictionBoomerang>(),
ProjectileType<GalaxySmasherHammer>(),
ProjectileType<KelvinCatalystBoomerang>(),
ProjectileType<NanoblackMain>(),
ProjectileType<StellarContemptHammer>(),
ProjectileType<IcebreakerHammer>(),
ProjectileType<PwnagehammerProj>(),
ProjectileType<ValariBoomerang>(),
ProjectileType<SphereSpiked>(),
ProjectileType<SphereBladed>(),
ProjectileType<SphereYellow>(),
ProjectileType<ButcherKnife>(),
ProjectileType<TerraDiskProjectile>(),
ProjectileType<TerraDiskProjectile2>(),
ProjectileType<ToxicantTwisterTwoPointZero>(),
ProjectileType<TrackingDiskProjectile>()
};
javelinList = new List<int>()
{
ItemType<CrystalPiercer>(),
ItemType<PalladiumJavelin>(),
ItemType<WaveSkipper>(),
ItemType<EclipsesFall>(),
ItemType<IchorSpear>(),
ItemType<Wrathwing>(),
ItemType<LuminousStriker>(),
ItemType<ScarletDevil>(),
ItemType<ScourgeoftheDesert>(),
ItemType<ScourgeoftheSeas>(),
ItemType<SpearofDestiny>(),
ItemType<SpearofPaleolith>(),
ItemType<ShardofAntumbra>(),
ItemType<PhantasmalRuin>(),
ItemType<PhantomLance>(),
ItemType<ProfanedPartisan>(),
ItemType<Turbulance>(),
ItemType<NightsGaze>(),
ItemType<FrequencyManipulator>(),
ItemType<TheAtomSplitter>()
};
javelinProjList = new List<int>()
{
ProjectileType<CrystalPiercerProjectile>(),
ProjectileType<DuneHopperProjectile>(),
ProjectileType<EclipsesFallMain>(),
ProjectileType<EclipsesStealth>(),
ProjectileType<IchorSpearProj>(),
ProjectileType<WrathwingSpear>(),
ProjectileType<LuminousStrikerProj>(),
ProjectileType<PalladiumJavelinProjectile>(),
ProjectileType<PhantasmalRuinProj>(),
ProjectileType<PhantomLanceProj>(),
ProjectileType<ProfanedPartisanProj>(),
ProjectileType<ScarletDevilProjectile>(),
ProjectileType<ScourgeoftheDesertProj>(),
ProjectileType<ScourgeoftheSeasProjectile>(),
ProjectileType<ScourgeoftheCosmosProj>(),
ProjectileType<SpearofDestinyProjectile>(),
ProjectileType<SpearofPaleolithProj>(),
ProjectileType<AntumbraShardProjectile>(),
ProjectileType<TurbulanceProjectile>(),
ProjectileType<NightsGazeProjectile>(),
ProjectileType<FrequencyManipulatorProjectile>(),
ProjectileType<TheAtomSplitterProjectile>()
};
daggerList = new List<int>()
{
ItemType<AshenStalactite>(),
ItemType<CobaltKunai>(),
ItemType<FeatherKnife>(),
ItemType<GelDart>(),
ItemType<MonkeyDarts>(),
ItemType<MythrilKnife>(),
ItemType<OrichalcumSpikedGemstone>(),
ItemType<TarragonThrowingDart>(),
ItemType<WulfrumKnife>(),
ItemType<Cinquedea>(),
ItemType<CosmicKunai>(),
ItemType<CorpusAvertor>(),
ItemType<Crystalline>(),
ItemType<CursedDagger>(),
ItemType<Malachite>(),
ItemType<Mycoroot>(),
ItemType<Prismalline>(),
ItemType<RadiantStar>(),
ItemType<ShatteredSun>(),
ItemType<StellarKnife>(),
ItemType<StormfrontRazor>(),
ItemType<TimeBolt>(),
ItemType<LunarKunai>(),
ItemType<GildedDagger>(),
ItemType<GleamingDagger>(),
ItemType<InfernalKris>(),
ItemType<UtensilPoker>(),
ItemType<ShinobiBlade>(),
ItemType<JawsOfOblivion>(),
ItemType<LeviathanTeeth>(),
ItemType<DeificThunderbolt>(),
ItemType<Sacrifice>(),
ItemType<Seraphim>()
};
daggerProjList = new List<int>()
{
ProjectileType<AshenStalactiteProj>(),
ProjectileType<AshenStalagmiteProj>(),
ProjectileType<CinquedeaProj>(),
ProjectileType<CobaltKunaiProjectile>(),
ProjectileType<CosmicKunaiProj>(),
ProjectileType<CrystallineProj>(),
ProjectileType<Crystalline2>(),
ProjectileType<CursedDaggerProj>(),
ProjectileType<EmpyreanKnife>(),
ProjectileType<FeatherKnifeProjectile>(),
ProjectileType<GelDartProjectile>(),
ProjectileType<GildedDaggerProj>(),
ProjectileType<GleamingDaggerProj>(),
ProjectileType<IllustriousKnife>(),
ProjectileType<LunarKunaiProj>(),
ProjectileType<MalachiteProj>(),
ProjectileType<MalachiteBolt>(),
ProjectileType<MalachiteStealth>(),
ProjectileType<MonkeyDart>(),
ProjectileType<MycorootProj>(),
ProjectileType<MythrilKnifeProjectile>(),
ProjectileType<OrichalcumSpikedGemstoneProjectile>(),
ProjectileType<PrismallineProj>(),
ProjectileType<Prismalline2>(),
ProjectileType<Prismalline3>(),
ProjectileType<RadiantStarKnife>(),
ProjectileType<RadiantStar2>(),
ProjectileType<ShatteredSunKnife>(),
ProjectileType<StellarKnifeProj>(),
ProjectileType<StormfrontRazorProjectile>(),
ProjectileType<TarragonThrowingDartProjectile>(),
ProjectileType<TimeBoltKnife>(),
ProjectileType<WulfrumKnifeProj>(),
ProjectileType<Fork>(),
ProjectileType<Knife>(),
ProjectileType<CarvingFork>(),
ProjectileType<InfernalKrisProjectile>(),
ProjectileType<ShinobiBladeProjectile>(),
ProjectileType<JawsProjectile>(),
ProjectileType<LeviathanTooth>(),
ProjectileType<DeificThunderboltProj>(),
ProjectileType<SacrificeProjectile>(),
ProjectileType<SeraphimProjectile>()
};
flaskBombList = new List<int>()
{
ItemType<Plaguenade>(),
ItemType<BallisticPoisonBomb>(),
ItemType<BrackishFlask>(),
ItemType<DuststormInABottle>(),
ItemType<SeafoamBomb>(),
ItemType<ConsecratedWater>(),
ItemType<DesecratedWater>(),
ItemType<TotalityBreakers>(),
ItemType<BlastBarrel>(),
ItemType<Penumbra>(),
ItemType<Supernova>(),
ItemType<ShockGrenade>(),
ItemType<Exorcism>(),
ItemType<MeteorFist>(),
ItemType<StarofDestruction>(),
ItemType<CraniumSmasher>(),
ItemType<ContaminatedBile>(),
ItemType<AcidicRainBarrel>(),
ItemType<SkyfinBombers>(),
ItemType<SpentFuelContainer>(),
ItemType<SealedSingularity>(),
ItemType<PlasmaGrenade>(),
ItemType<WavePounder>()
};
flaskBombProjList = new List<int>()
{
ProjectileType<BallisticPoisonBombProj>(),
ProjectileType<BlastBarrelProjectile>(),
ProjectileType<BrackishFlaskProj>(),
ProjectileType<DuststormInABottleProj>(),
ProjectileType<PlaguenadeProj>(),
ProjectileType<SeafoamBombProj>(),
ProjectileType<TotalityFlask>(),
ProjectileType<ConsecratedWaterProjectile>(),
ProjectileType<DesecratedWaterProj>(),
ProjectileType<PenumbraBomb>(),
ProjectileType<SupernovaBomb>(),
ProjectileType<ShockGrenadeProjectile>(),
ProjectileType<ExorcismProj>(),
ProjectileType<MeteorFistProj>(),
ProjectileType<CraniumSmasherProj>(),
ProjectileType<CraniumSmasherExplosive>(),
ProjectileType<CraniumSmasherStealth>(),
ProjectileType<DestructionStar>(),
ProjectileType<DestructionBolt>(),
ProjectileType<ContaminatedBileFlask>(),
ProjectileType<GreenDonkeyKongReference>(),
ProjectileType<SkyfinNuke>(),
ProjectileType<SpentFuelContainerProjectile>(),
ProjectileType<SealedSingularityProj>(),
ProjectileType<PlasmaGrenadeProjectile>(),
ProjectileType<WavePounderProjectile>()
};
spikyBallList = new List<int>()
{
ItemType<BouncySpikyBall>(),
ItemType<GodsParanoia>(),
ItemType<NastyCholla>(),
ItemType<HellsSun>(),
ItemType<SkyStabber>(),
ItemType<StickySpikyBall>(),
ItemType<WebBall>(),
ItemType<PoisonPack>(),
ItemType<Nychthemeron>(),
ItemType<MetalMonstrosity>(),
ItemType<BurningStrife>(),
ItemType<SystemBane>()
};
spikyBallProjList = new List<int>()
{
ProjectileType<BouncyBol>(),
ProjectileType<GodsParanoiaProj>(),
ProjectileType<HellsSunProj>(),
ProjectileType<NastyChollaBol>(),
ProjectileType<StickyBol>(),
ProjectileType<SkyStabberProj>(),
ProjectileType<WebBallBol>(),
ProjectileType<PoisonBol>(),
ProjectileType<NychthemeronProjectile>(),
ProjectileType<MetalChunk>(),
ProjectileType<BurningStrifeProj>(),
ProjectileType<SystemBaneProjectile>()
};
highTestFishList = new List<int>()
{
ItemID.GoldenFishingRod,
@@ -2703,16 +2396,6 @@ namespace CalamityMod
needsDebuffIconDisplayList = null;
trapProjectileList = null;
scopedWeaponList = null;
boomerangList = null;
javelinList = null;
daggerList = null;
flaskBombList = null;
spikyBallList = null;
boomerangProjList = null;
javelinProjList = null;
daggerProjList = null;
flaskBombProjList = null;
spikyBallProjList = null;
lavaFishList = null;
highTestFishList = null;
flamethrowerList = null;
-48
View File
@@ -24,41 +24,6 @@ namespace CalamityMod
CalamityModMessageType msgType = (CalamityModMessageType)reader.ReadByte();
switch (msgType)
{
//
// Proficiency levels
//
case CalamityModMessageType.MeleeLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 0);
break;
case CalamityModMessageType.RangedLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 1);
break;
case CalamityModMessageType.MagicLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 2);
break;
case CalamityModMessageType.SummonLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 3);
break;
case CalamityModMessageType.RogueLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleLevels(reader, 4);
break;
case CalamityModMessageType.ExactMeleeLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 0);
break;
case CalamityModMessageType.ExactRangedLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 1);
break;
case CalamityModMessageType.ExactMagicLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 2);
break;
case CalamityModMessageType.ExactSummonLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 3);
break;
case CalamityModMessageType.ExactRogueLevelSync:
Main.player[reader.ReadInt32()].Calamity().HandleExactLevels(reader, 4);
break;
//
// Player mechanic syncs
//
@@ -335,19 +300,6 @@ namespace CalamityMod
public enum CalamityModMessageType : byte
{
// Proficiency levels
// TODO -- simplify proficiency netcode, there do not need to be this many separate packet types
MeleeLevelSync,
RangedLevelSync,
MagicLevelSync,
SummonLevelSync,
RogueLevelSync,
ExactMeleeLevelSync,
ExactRangedLevelSync,
ExactMagicLevelSync,
ExactSummonLevelSync,
ExactRogueLevelSync,
// Player mechanic syncs
DefenseDamageSync, // TODO -- this can't be synced every 60 frames, it needs to be synced when the player gets hit, or every time it heals up
RageSync, // TODO -- this can't be synced every 60 frames, it needs to be synced every time the player is
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 693 B

+5 -7
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,8 +11,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Coin of Deceit");
Tooltip.SetDefault("Stealth strikes only expend 75% of your max stealth\n" +
"6% increased rogue crit chance");
Tooltip.SetDefault("Stealth strikes only expend 90% of your max stealth");
}
public override void SetDefaults()
@@ -26,16 +25,15 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.GetCritChance<ThrowingDamageClass>() += 6;
player.Calamity().stealthStrike75Cost = true;
player.Calamity().stealthStrike90Cost = true;
}
public override void AddRecipes()
{
CreateRecipe().
AddRecipeGroup("AnyGoldBar", 4).
AddRecipeGroup("AnyCopperBar", 8).
AddIngredient<Acidwood>(5).
AddRecipeGroup("AnyEvilBar", 8).
AddIngredient<WulfrumMetalScrap>(5).
AddTile(TileID.Anvils).
Register();
}
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Corrosive Spine");
Tooltip.SetDefault("10% increased movement speed\n" +
Tooltip.SetDefault("5% increased movement speed\n" +
"All rogue weapons inflict venom and spawn clouds on enemy hits\n" +
"You release a ton of clouds everywhere on hit");
}
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.moveSpeed += 0.1f;
player.moveSpeed += 0.05f;
player.Calamity().corrosiveSpine = true;
if (player.immune)
{
+2 -4
View File
@@ -12,9 +12,8 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Dark God's Sheath");
Tooltip.SetDefault("+20 maximum stealth\n" +
Tooltip.SetDefault("+10 maximum stealth\n" +
"Mobile stealth generation accelerates while not attacking\n" +
"Stealth strikes have a 100% critical hit chance\n" +
"Stealth strikes only expend 50% of your max stealth\n" +
"6% increased rogue damage, and 6% increased rogue crit chance");
}
@@ -31,9 +30,8 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.stealthStrikeAlwaysCrits = true;
modPlayer.stealthStrikeHalfCost = true;
modPlayer.rogueStealthMax += 0.2f;
modPlayer.rogueStealthMax += 0.1f;
modPlayer.darkGodSheath = true;
player.GetCritChance<ThrowingDamageClass>() += 6;
player.GetDamage<ThrowingDamageClass>() += 0.06f;
+2 -4
View File
@@ -15,12 +15,11 @@ namespace CalamityMod.Items.Accessories
SacrificeTotal = 1;
DisplayName.SetDefault("Eclipse Mirror");
Tooltip.SetDefault("Its reflection shows naught but darkness\n" +
"+20 maximum stealth\n" +
"+10 maximum stealth\n" +
"6% increased rogue damage, and 6% increased rogue crit chance\n" +
"Vastly reduces enemy aggression, even in the abyss\n" +
"Stealth generates 20% faster when standing still\n" +
"Mobile stealth generation exponentially accelerates while not attacking\n" +
"Stealth strikes have a 100% critical hit chance\n" +
"Stealth strikes only expend 50% of your max stealth\n" +
"Grants the ability to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area\n" +
"Evading an attack grants full stealth but has a 90 second cooldown\n" +
@@ -40,9 +39,8 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.stealthGenStandstill += 0.2f;
modPlayer.rogueStealthMax += 0.2f;
modPlayer.rogueStealthMax += 0.1f;
modPlayer.eclipseMirror = true;
modPlayer.stealthStrikeAlwaysCrits = true;
modPlayer.stealthStrikeHalfCost = true;
player.GetCritChance<ThrowingDamageClass>() += 6;
player.GetDamage<ThrowingDamageClass>() += 0.06f;
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories
SacrificeTotal = 1;
DisplayName.SetDefault("Eldritch Soul Artifact");
Tooltip.SetDefault("Knowledge\n" +
"Boosts melee speed by 10%, ranged velocity by 25%, rogue damage by 15%, max minions by 2 and reduces mana cost by 15%\n" +
"Boosts melee speed by 10%, ranged velocity by 25%, rogue stealth regen by 10%, max minions by 2 and reduces mana cost by 15%\n" +
"Grants immunity to Whispering Death");
}
+1 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
SacrificeTotal = 1;
DisplayName.SetDefault("Ethereal Extorter");
Tooltip.SetDefault(@"Rogue projectiles explode into homing souls on death
10% increased rogue damage and +10 maximum stealth, however, life regen is reduced by 1");
10% increased rogue damage and +10 maximum stealth");
}
public override void SetDefaults()
@@ -29,7 +29,6 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.etherealExtorter = true;
player.GetDamage<ThrowingDamageClass>() += 0.1f;
player.lifeRegen -= 1;
modPlayer.rogueStealthMax += 0.1f;
}
}
+3 -5
View File
@@ -1,9 +1,9 @@
using CalamityMod.Buffs.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
@@ -28,8 +28,6 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().fungalClump;
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
@@ -44,7 +42,7 @@ namespace CalamityMod.Items.Accessories
{
var source = player.GetSource_Accessory(Item);
int damage = (int)player.GetBestClassDamage().ApplyTo(FungalClumpDamage);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI, 0f, 0f);
int p = Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), damage, 1f, player.whoAmI);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = FungalClumpDamage;
}
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Glove of Recklessness");
Tooltip.SetDefault("Increases rogue attack speed by 12% but decreases damage by 10%\n" +
Tooltip.SetDefault("Increases rogue attack speed by 15% but decreases damage by 10%\n" +
"Adds inaccuracy to rogue weapons");
}
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfRecklessness = true;
player.GetDamage<RogueDamageClass>() -= 0.1f;
player.GetAttackSpeed<RogueDamageClass>() += 0.12f;
player.GetAttackSpeed<RogueDamageClass>() += 0.15f;
}
}
}
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Glove of Precision");
Tooltip.SetDefault("Decreases rogue attack speed by 20% but increases damage and crit by 12% and velocity by 25%");
Tooltip.SetDefault("Decreases rogue attack speed by 15% but increases damage and crit by 12% and velocity by 25%");
}
public override void SetDefaults()
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories
player.GetDamage<RogueDamageClass>() += 0.12f;
player.GetCritChance<RogueDamageClass>() += 12;
modPlayer.rogueVelocity += 0.25f;
player.GetAttackSpeed<RogueDamageClass>() -= 0.2f;
player.GetAttackSpeed<RogueDamageClass>() -= 0.15f;
}
}
}
-129
View File
@@ -1,129 +0,0 @@
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
public class MagicLevelMeter : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Magic Level Meter");
Tooltip.SetDefault("Tells you how high your magic proficiency is");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
int level = Main.player[Main.myPlayer].Calamity().magicLevel;
int exactLevel = Main.player[Main.myPlayer].Calamity().exactMagicLevel;
int damageGain = 0;
int manaUsage = 0;
int critGain = 0;
switch (exactLevel)
{
case 0:
break;
case 1:
damageGain = 1;
break;
case 2:
damageGain = 2;
break;
case 3:
damageGain = 2;
manaUsage = 1;
break;
case 4:
damageGain = 2;
manaUsage = 1;
critGain = 1;
break;
case 5:
damageGain = 2;
manaUsage = 2;
critGain = 1;
break;
case 6:
damageGain = 3;
manaUsage = 2;
critGain = 1;
break;
case 7:
damageGain = 3;
manaUsage = 2;
critGain = 2;
break;
case 8:
damageGain = 3;
manaUsage = 3;
critGain = 2;
break;
case 9:
damageGain = 4;
manaUsage = 3;
critGain = 2;
break;
case 10:
damageGain = 4;
manaUsage = 4;
critGain = 2;
break;
case 11:
damageGain = 4;
manaUsage = 4;
critGain = 3;
break;
case 12:
damageGain = 4;
manaUsage = 5;
critGain = 3;
break;
case 13:
damageGain = 5;
manaUsage = 5;
critGain = 3;
break;
case 14:
damageGain = 5;
manaUsage = 6;
critGain = 3;
break;
case 15:
damageGain = 6;
manaUsage = 6;
critGain = 3;
break;
}
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = "Tells you how high your magic proficiency is\n" +
"While equipped you will gain magic proficiency faster\n" +
"The higher your magic level the higher your magic damage, critical strike chance, and the lower your mana cost\n" +
"Magic proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" +
"Magic level (max of 15): " + exactLevel + "\n" +
"Magic damage increase: " + damageGain + "%\n" +
"Mana usage decrease: " + manaUsage + "%\n" +
"Magic crit increase: " + critGain + "%";
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fasterMagicLevel = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

-130
View File
@@ -1,130 +0,0 @@
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
public class MeleeLevelMeter : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Melee Level Meter");
Tooltip.SetDefault("Tells you how high your melee proficiency is");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
int level = Main.player[Main.myPlayer].Calamity().meleeLevel;
int exactLevel = Main.player[Main.myPlayer].Calamity().exactMeleeLevel;
int damageGain = 0;
int meleeSpeed = 0;
int critGain = 0;
switch (exactLevel)
{
case 0:
break;
case 1:
damageGain = 1;
break;
case 2:
damageGain = 2;
break;
case 3:
damageGain = 2;
meleeSpeed = 1;
break;
case 4:
damageGain = 2;
meleeSpeed = 1;
critGain = 1;
break;
case 5:
damageGain = 3;
meleeSpeed = 1;
critGain = 1;
break;
case 6:
damageGain = 4;
meleeSpeed = 1;
critGain = 1;
break;
case 7:
damageGain = 4;
meleeSpeed = 2;
critGain = 1;
break;
case 8:
damageGain = 4;
meleeSpeed = 2;
critGain = 2;
break;
case 9:
damageGain = 5;
meleeSpeed = 2;
critGain = 2;
break;
case 10:
damageGain = 5;
meleeSpeed = 3;
critGain = 2;
break;
case 11:
damageGain = 5;
meleeSpeed = 3;
critGain = 3;
break;
case 12:
damageGain = 5;
meleeSpeed = 4;
critGain = 3;
break;
case 13:
damageGain = 6;
meleeSpeed = 4;
critGain = 3;
break;
case 14:
damageGain = 6;
meleeSpeed = 5;
critGain = 3;
break;
case 15:
damageGain = 6;
meleeSpeed = 6;
critGain = 3;
break;
}
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = "Tells you how high your melee proficiency is\n" +
"While equipped you will gain melee proficiency faster\n" +
"The higher your melee level the higher your melee damage, speed, and critical strike chance\n" +
"Melee proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" +
"Melee level (max of 15): " + exactLevel + "\n" +
"Melee damage increase: " + damageGain + "%\n" +
"Melee speed increase: " + meleeSpeed + "%\n" +
"Melee crit increase: " + critGain + "%";
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fasterMeleeLevel = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

-130
View File
@@ -1,130 +0,0 @@
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
public class RangedLevelMeter : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Ranged Level Meter");
Tooltip.SetDefault("Tells you how high your ranged proficiency is");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
int level = Main.player[Main.myPlayer].Calamity().rangedLevel;
int exactLevel = Main.player[Main.myPlayer].Calamity().exactRangedLevel;
int damageGain = 0;
int moveSpeed = 0;
int critGain = 0;
switch (exactLevel)
{
case 0:
break;
case 1:
damageGain = 1;
break;
case 2:
damageGain = 2;
break;
case 3:
damageGain = 2;
critGain = 1;
break;
case 4:
damageGain = 2;
moveSpeed = 1;
critGain = 1;
break;
case 5:
damageGain = 2;
moveSpeed = 2;
critGain = 1;
break;
case 6:
damageGain = 2;
moveSpeed = 3;
critGain = 1;
break;
case 7:
damageGain = 2;
moveSpeed = 3;
critGain = 2;
break;
case 8:
damageGain = 3;
moveSpeed = 3;
critGain = 2;
break;
case 9:
damageGain = 3;
moveSpeed = 4;
critGain = 2;
break;
case 10:
damageGain = 4;
moveSpeed = 4;
critGain = 2;
break;
case 11:
damageGain = 4;
moveSpeed = 4;
critGain = 3;
break;
case 12:
damageGain = 4;
moveSpeed = 5;
critGain = 3;
break;
case 13:
damageGain = 5;
moveSpeed = 5;
critGain = 3;
break;
case 14:
damageGain = 5;
moveSpeed = 6;
critGain = 3;
break;
case 15:
damageGain = 6;
moveSpeed = 6;
critGain = 3;
break;
}
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = "Tells you how high your ranged proficiency is\n" +
"While equipped you will gain ranged proficiency faster\n" +
"The higher your ranged level the higher your ranged damage, critical strike chance, and movement speed\n" +
"Ranged proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" +
"Ranged level (max of 15): " + exactLevel + "\n" +
"Ranged damage increase: " + damageGain + "%\n" +
"Movement speed increase: " + moveSpeed + "%\n" +
"Ranged crit increase: " + critGain + "%";
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fasterRangedLevel = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

-130
View File
@@ -1,130 +0,0 @@
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
public class RogueLevelMeter : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Rogue Level Meter");
Tooltip.SetDefault("Tells you how high your rogue proficiency is");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
int level = Main.player[Main.myPlayer].Calamity().rogueLevel;
int exactLevel = Main.player[Main.myPlayer].Calamity().exactRogueLevel;
int damageGain = 0;
int velocityGain = 0;
int critGain = 0;
switch (exactLevel)
{
case 0:
break;
case 1:
damageGain = 1;
break;
case 2:
damageGain = 2;
break;
case 3:
damageGain = 2;
velocityGain = 1;
break;
case 4:
damageGain = 2;
velocityGain = 1;
critGain = 1;
break;
case 5:
damageGain = 2;
velocityGain = 2;
critGain = 1;
break;
case 6:
damageGain = 2;
velocityGain = 3;
critGain = 1;
break;
case 7:
damageGain = 3;
velocityGain = 3;
critGain = 1;
break;
case 8:
damageGain = 3;
velocityGain = 3;
critGain = 2;
break;
case 9:
damageGain = 3;
velocityGain = 4;
critGain = 2;
break;
case 10:
damageGain = 4;
velocityGain = 4;
critGain = 2;
break;
case 11:
damageGain = 4;
velocityGain = 4;
critGain = 3;
break;
case 12:
damageGain = 4;
velocityGain = 5;
critGain = 3;
break;
case 13:
damageGain = 5;
velocityGain = 5;
critGain = 3;
break;
case 14:
damageGain = 5;
velocityGain = 6;
critGain = 3;
break;
case 15:
damageGain = 6;
velocityGain = 6;
critGain = 3;
break;
}
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = "Tells you how high your rogue proficiency is\n" +
"While equipped you will gain rogue proficiency faster\n" +
"The higher your rogue level the higher your rogue damage, critical strike chance, and velocity\n" +
"Rogue proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" +
"Rogue level (max of 15): " + exactLevel + "\n" +
"Rogue damage increase: " + damageGain + "%\n" +
"Rogue velocity increase: " + velocityGain + "%\n" +
"Rogue crit increase: " + critGain + "%";
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fasterRogueLevel = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Ruin Medallion");
Tooltip.SetDefault("Stealth strikes only expend 50% of your max stealth\n" +
Tooltip.SetDefault("Stealth strikes only expend 75% of your max stealth\n" +
"6% increased rogue damage, and 6% increased rogue crit chance");
}
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.stealthStrikeHalfCost = true;
modPlayer.stealthStrike75Cost = true;
player.GetCritChance<ThrowingDamageClass>() += 6;
player.GetDamage<ThrowingDamageClass>() += 0.06f;
}
+4 -4
View File
@@ -12,9 +12,9 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Sand Cloak");
Tooltip.SetDefault("+1 defense and 5% increased movement speed\n" +
Tooltip.SetDefault("+2 defense and 5% increased movement speed\n" +
"TOOLTIP LINE HERE\n" +
"This effect has a 30 second cooldown before it can be used again");
"This effect has a 25 second cooldown before it can be used again");
}
public override void SetDefaults()
@@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
if (line != null)
line.Text = "Press " + hotkey + " to consume 25% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen";
line.Text = "Press " + hotkey + " to consume 10% of your maximum stealth to create a protective dust veil which provides +6 defense and +2 life regen";
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statDefense += 1;
player.statDefense += 2;
player.moveSpeed += 0.05f;
player.Calamity().sandCloak = true;
}
+2 -5
View File
@@ -11,8 +11,7 @@ namespace CalamityMod.Items.Accessories
{
SacrificeTotal = 1;
DisplayName.SetDefault("Silencing Sheath");
Tooltip.SetDefault("+20 maximum stealth\n" +
"Stealth generates 15% faster");
Tooltip.SetDefault("+10 maximum stealth");
}
public override void SetDefaults()
@@ -27,9 +26,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.rogueStealthMax += 0.2f;
modPlayer.stealthGenStandstill += 0.15f;
modPlayer.stealthGenMoving += 0.15f;
modPlayer.rogueStealthMax += 0.1f;
}
public override void AddRecipes()
+5 -9
View File
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CalamityMod.Balancing;
using CalamityMod.Balancing;
using CalamityMod.CalPlayer;
using CalamityMod.World;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -26,13 +26,9 @@ namespace CalamityMod.Items.Accessories
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
Player player = Main.player[Main.myPlayer];
-115
View File
@@ -1,115 +0,0 @@
using CalamityMod.CalPlayer;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using System.Linq;
namespace CalamityMod.Items.Accessories
{
public class SummonLevelMeter : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
DisplayName.SetDefault("Summon Level Meter");
Tooltip.SetDefault("Tells you how high your summon proficiency is");
}
public override void SetDefaults()
{
Item.width = 26;
Item.height = 26;
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.Orange;
Item.accessory = true;
}
public override void ModifyTooltips(List<TooltipLine> list)
{
int level = Main.player[Main.myPlayer].Calamity().summonLevel;
int exactLevel = Main.player[Main.myPlayer].Calamity().exactSummonLevel;
int damageGain = 0;
int minionKB = 0;
switch (exactLevel)
{
case 0:
break;
case 1:
damageGain = 1;
break;
case 2:
damageGain = 2;
break;
case 3:
damageGain = 2;
minionKB = 30;
break;
case 4:
damageGain = 3;
minionKB = 30;
break;
case 5:
damageGain = 3;
minionKB = 60;
break;
case 6:
damageGain = 4;
minionKB = 90;
break;
case 7:
damageGain = 4;
minionKB = 120;
break;
case 8:
damageGain = 5;
minionKB = 150;
break;
case 9:
damageGain = 6;
minionKB = 180;
break;
case 10:
damageGain = 7;
minionKB = 180;
break;
case 11:
damageGain = 7;
minionKB = 210;
break;
case 12:
damageGain = 8;
minionKB = 240;
break;
case 13:
damageGain = 9;
minionKB = 270;
break;
case 14:
damageGain = 10;
minionKB = 300;
break;
case 15:
damageGain = 12;
minionKB = 300;
break;
}
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0");
if (line != null)
line.Text = "Tells you how high your summon proficiency is\n" +
"While equipped you will gain summon proficiency faster\n" +
"The higher your summon level the higher your minion damage and knockback\n" +
"Summon proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" +
"Summon level (max of 15): " + exactLevel + "\n" +
"Minion damage increase: " + damageGain + "%\n" +
"Minion knockback increase: " + minionKB;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fasterSummonLevel = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

@@ -51,6 +51,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian
AddRecipeGroup("AnySnowBlock", 30).
AddRecipeGroup("AnyIceBlock", 15).
AddIngredient(ItemID.BorealWood, 45).
AddIngredient(ItemID.FlinxFur, 2).
AddTile(TileID.Anvils).
Register();
}
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian
AddRecipeGroup("AnySnowBlock", 20).
AddRecipeGroup("AnyIceBlock", 10).
AddIngredient(ItemID.BorealWood, 30).
AddIngredient(ItemID.FlinxFur).
AddTile(TileID.Anvils).
Register();
}
@@ -79,6 +79,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian
AddRecipeGroup("AnySnowBlock", 10).
AddRecipeGroup("AnyIceBlock", 5).
AddIngredient(ItemID.BorealWood, 15).
AddIngredient(ItemID.FlinxFur).
AddTile(TileID.Anvils).
Register();
}
+1 -2
View File
@@ -42,8 +42,7 @@ namespace CalamityMod.Items.Armor.Umbraphile
modPlayer.rogueStealthMax += 1.1f;
player.setBonus = "+110 maximum stealth\n" +
"Rogue weapons have a chance to create explosions on hit\n" +
"Stealth strikes always create an explosion\n" +
"Penumbra potions always build stealth at max effectiveness";
"Stealth strikes always create an explosion";
player.Calamity().wearingRogueArmor = true;
}
+1 -1
View File
@@ -214,7 +214,7 @@ namespace CalamityMod.Items
{
velocity *= modPlayer.rogueVelocity;
if (modPlayer.gloveOfRecklessness)
velocity = velocity.RotatedByRandom(MathHelper.ToRadians(6f));
velocity = velocity.RotatedByRandom(MathHelper.ToRadians(12f));
}
if (modPlayer.eArtifact && item.CountsAsClass<RangedDamageClass>())
velocity *= 1.25f;
+2 -2
View File
@@ -311,9 +311,9 @@ namespace CalamityMod.Items
EditTooltipByNum(0, (line) => line.Text += extraLine);
}
// Invisibility Potion provides various rogue boosts
// Invisibility Potion provides stealth regen
if (item.type == ItemID.InvisibilityPotion)
EditTooltipByNum(0, (line) => line.Text += "\nBoosts various rogue stats depending on held weapon");
EditTooltipByNum(0, (line) => line.Text += "\n8% increased rogue stealth regen");
// Golden Fishing Rod inherently contains High Test Fishing Line
if (item.type == ItemID.GoldenFishingRod)
+2 -2
View File
@@ -290,7 +290,7 @@ namespace CalamityMod.Items
{ ItemID.MaceWhip, autoReuse },
{ ItemID.MagicalHarp, Do(DamageExact(50), ShootSpeedExact(12f)) },
{ ItemID.MagicDagger, Do(AutoReuse, DamageExact(77), UseExact(16), ShootSpeedExact(30)) },
{ ItemID.MagicMissile, Do(DamageRatio(1.2f)) },
{ ItemID.MagicMissile, Do(DamageRatio(1.2f), ManaExact(5)) },
{ ItemID.MagnetSphere, Do(DamageRatio(1.1f)) },
{ ItemID.ManaCrystal, autoReuse },
{ ItemID.Marrow, Do(PointBlank, AutoReuse, DamageExact(69)) },
@@ -402,7 +402,7 @@ namespace CalamityMod.Items
{ ItemID.QueenSlimeCrystal, nonConsumableBossSummon },
{ ItemID.QueenSpiderStaff, Do(UseExact(25)) },
{ ItemID.RainbowCrystalStaff, Do(UseExact(15)) },
{ ItemID.RainbowRod, Do(DamageExact(50), UseExact(35)) },
{ ItemID.RainbowRod, Do(DamageExact(50), ManaExact(12), UseExact(35)) },
{ ItemID.RainbowWhip, autoReuse },
{ ItemID.Rally, Do(AutoReuse, DamageExact(20)) },
{ ItemID.RavenStaff, Do(AutoReuse, UseExact(20)) },
+2 -2
View File
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Placeables
Item.useTime = 10;
Item.autoReuse = true;
Item.consumable = true;
Item.width = 13;
Item.height = 10;
Item.width = 16;
Item.height = 16;
Item.maxStack = 999;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 209 B

@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Placeables.Walls
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.width = 24;
Item.height = 24;
Item.maxStack = 999;
Item.useTurn = true;
Item.autoReuse = true;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 280 B

+1 -3
View File
@@ -12,9 +12,7 @@ namespace CalamityMod.Items.Potions
{
SacrificeTotal = 20;
DisplayName.SetDefault("Penumbra Potion");
Tooltip.SetDefault("Rogue stealth generates 15% faster while moving\n"
+ "At night, stealth also generates 15% faster while standing still\n"
+ "During an eclipse both boosts increase to 20%");
Tooltip.SetDefault("Rogue stealth generates 10% faster while moving and 15% faster while standing still");
}
public override void SetDefaults()
+4 -4
View File
@@ -13,10 +13,10 @@ namespace CalamityMod.Items.Potions
{
SacrificeTotal = 20;
DisplayName.SetDefault("Shadow Potion");
Tooltip.SetDefault("Causes the player to disappear while not attacking\n" +
"Holding different types of rogue weapons give the player boosts\n" +
"Different types of rogue weapons spawn different projectiles on hit\n" +
"Stealth generation is increased by 10%");
Tooltip.SetDefault("Turns the player into a shadow with glowing eyes\n" +
"Rogue weapons spawn projectiles on hit\n" +
"Stealth generation is increased by 8%\n" +
"Visual effects can be disabled with the Stealth Invisibility config");
}
public override void SetDefaults()
+3 -3
View File
@@ -14,9 +14,9 @@ namespace CalamityMod.Items.Weapons.Rogue
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blazing Star");
Tooltip.SetDefault("Stacks up to 4\n" +
Tooltip.SetDefault("Stacks up to 3\n" +
"Stealth strikes release all stars at once with infinite piercing");
SacrificeTotal = 4;
SacrificeTotal = 3;
}
public override void SetDefaults()
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.value = CalamityGlobalItem.Rarity3BuyPrice;
Item.rare = ItemRarityID.LightRed;
Item.UseSound = SoundID.Item1;
Item.maxStack = 4;
Item.maxStack = 3;
Item.shootSpeed = Speed;
Item.shoot = ModContent.ProjectileType<BlazingStarProj>();
+12 -4
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
DisplayName.SetDefault("Bouncy Spiky Ball");
Tooltip.SetDefault(@"Throws a very bouncy ball that ricochets off walls and enemies
Receives a small boost in damage and velocity after bouncing off an enemy
Stealth strikes provide a bigger boost after ricocheting");
Stealth strikes throw four at once and provide a bigger boost after ricocheting");
SacrificeTotal = 99;
}
@@ -44,9 +44,17 @@ Stealth strikes provide a bigger boost after ricocheting");
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
int spread = 3;
for (int i = 0; i < 4; i++)
{
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, damage, knockback, player.whoAmI);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].Calamity().stealthStrike = true;
}
spread -= Main.rand.Next(1,4);
}
return false;
}
return true;
-2
View File
@@ -41,8 +41,6 @@ namespace CalamityMod.Items.Weapons.Rogue
{
if (player.Calamity().StealthStrikeAvailable())
{
damage = (int)(damage * 1.4f);
for (int i = -6; i <= 6; i += 6)
{
Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i));
+10 -10
View File
@@ -21,17 +21,17 @@ Stealth strike throws a volley of knives");
public override void SetDefaults()
{
Item.width = 18;
Item.damage = 25;
Item.noMelee = true;
Item.consumable = true;
Item.noUseGraphic = true;
Item.useAnimation = 11;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 18;
Item.knockBack = 2f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.height = 32;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.damage = 16;
Item.useAnimation = Item.useTime = 20;
Item.knockBack = 2f;
Item.autoReuse = true;
Item.consumable = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.UseSound = SoundID.Item1;
Item.maxStack = 999;
Item.shoot = ModContent.ProjectileType<FeatherKnifeProjectile>();
Item.shootSpeed = 25f;
+2 -2
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
{
DisplayName.SetDefault("Sticky Spiky Ball");
Tooltip.SetDefault(@"Throws a spiky ball that sticks to everything
Stealth strikes throw seven at once and last a lot longer");
Stealth strikes throw four at once and last a lot longer");
SacrificeTotal = 99;
}
@@ -43,7 +43,7 @@ Stealth strikes throw seven at once and last a lot longer");
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int spread = 3;
for (int i = 0; i < 7; i++)
for (int i = 0; i < 4; i++)
{
Vector2 perturbedspeed = new Vector2(velocity.X + Main.rand.Next(-3,4), velocity.Y + Main.rand.Next(-3,4)).RotatedBy(MathHelper.ToRadians(spread));
int proj = Projectile.NewProjectile(source, position, perturbedspeed, type, damage, knockback, player.whoAmI);
@@ -1,6 +1,6 @@
using System.Linq;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -8,11 +8,11 @@ using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Weapons.Melee
namespace CalamityMod.Items.Weapons.Summon
{
public class Cnidarian : ModItem
{
public override string Texture => "CalamityMod/Items/Weapons/Melee/CnidarianFishingRod";
public override string Texture => "CalamityMod/Items/Weapons/Summon/CnidarianFishingRod";
public override void SetStaticDefaults()
{
@@ -135,7 +135,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
Texture2D properSprite = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/Cnidarian").Value;
Texture2D properSprite = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/Cnidarian").Value;
spriteBatch.DrawNewInventorySprite(properSprite, new Vector2(42f, 34), position, drawColor, origin, scale);
return false;
@@ -143,7 +143,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
{
Texture2D properSprite = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/Cnidarian").Value;
Texture2D properSprite = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/Cnidarian").Value;
spriteBatch.Draw(properSprite, Item.position - Main.screenPosition, null, lightColor, rotation, properSprite.Size() / 2f, scale, 0, 0);
return false;
File renamed without changes.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 982 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 827 B

+4 -2
View File
@@ -10,6 +10,8 @@ namespace CalamityMod.Items.Weapons.Summon
{
public class TacticalPlagueEngine : ModItem
{
public static int BaseDamage = 52;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tactical Plague Engine");
@@ -21,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
public override void SetDefaults()
{
Item.damage = 52;
Item.damage = BaseDamage;
Item.mana = 10;
Item.width = 28;
Item.height = 20;
@@ -44,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 1f);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = Item.damage;
Main.projectile[p].originalDamage = BaseDamage;
}
return false;
}
+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Typeless;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
-11
View File
@@ -171,17 +171,6 @@ namespace CalamityMod.Localization
new [] { "BossRushTierFourEndText2", "Go forth and conquer 'til the ritual's end!" },
new [] { "BossRushTierFiveEndText", "Hmm? You expected a reward beyond this mere pebble? Patience, the true reward will become apparent in time..." },
new [] { "MeleeLevelUp", "Melee weapon proficiency level up!" },
new [] { "MeleeLevelUpFinal", "Melee weapon proficiency maxed out!" },
new [] { "RangedLevelUp", "Ranged weapon proficiency level up!" },
new [] { "RangedLevelUpFinal", "Ranged weapon proficiency maxed out!" },
new [] { "MagicLevelUp", "Magic weapon proficiency level up!" },
new [] { "MagicLevelUpFinal", "Magic weapon proficiency maxed out!" },
new [] { "SummonLevelUp", "Summoner weapon proficiency level up!" },
new [] { "SummonLevelUpFinal", "Summoner weapon proficiency maxed out!" },
new [] { "RogueLevelUp", "Rogue weapon proficiency level up!" },
new [] { "RogueLevelUpFinal", "Rogue weapon proficiency maxed out!" },
new [] { "OpenSunkenSea", "The depths of the underground desert are rumbling..." },
new [] { "SandstormTrigger", "The desert wind is blowing furiously!" },
-2
View File
@@ -43,7 +43,6 @@ Config:
"FasterTilePlacement": "Faster Base Tile Placement Speed",
"NerfExpertDebuffs": "Remove Increased Debuff Duration",
"ParticleLimit": "Max Particle Limit",
"Proficiency": "Proficiency",
"RageMeterPosX": "Rage Meter X Position",
"RageMeterPosY": "Rage Meter Y Position",
"RemoveReforgeRNG": "Remove Reforge RNG",
@@ -90,7 +89,6 @@ Config:
"FasterTilePlacement": "Increases the player's base tile placement speed",
"NerfExpertDebuffs": "Disables Expert Mode doubling (and Master Mode tripling) the duration of debuffs on the player.\nCalamity is balanced around this setting being enabled.",
"ParticleLimit": "Sets the maximum of particle effects that can exist at once.\nParticles are separate from dust and gores.\nTurn down to improve performance.",
"Proficiency": "Enables the Proficiency system which allows the player to gain slight stat bonuses by persistently using one damage class.\nDisabling the system does not remove levels players already have, but disables their stat bonuses and prevents experience gain.",
"RageMeterPosX": "The X position of the Rage Meter, measured as a % of your screen width.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.",
"RageMeterPosY": "The Y position of the Rage Meter, measured as a % of your screen height.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.",
"RemoveReforgeRNG": "Removes randomness from the Goblin Tinkerer's reforges for both weapons and accessories.\nDisable this if using mods that change reforging on their own to prevent conflicts.",
+4 -4
View File
@@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
NPC.damage = 90; //70
NPC.width = 56; //36
NPC.height = 36;
NPC.width = 40; //36
NPC.height = 48;
NPC.defense = 30;
NPC.lifeMax = 60000;
NPC.aiStyle = -1; //new
@@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss
NPC.position.Y = NPC.position.Y + num192;
if (num191 < 0f)
NPC.spriteDirection = -1;
else if (num191 > 0f)
NPC.spriteDirection = 1;
else if (num191 > 0f)
NPC.spriteDirection = -1;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 769 B

+4 -4
View File
@@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
NPC.damage = 90; //70
NPC.width = 36; //36
NPC.height = 36;
NPC.width = 40; //36
NPC.height = 48;
NPC.defense = 30;
NPC.lifeMax = 60000;
NPC.aiStyle = -1; //new
@@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss
NPC.position.Y = NPC.position.Y + num192;
if (num191 < 0f)
NPC.spriteDirection = -1;
else if (num191 > 0f)
NPC.spriteDirection = 1;
else if (num191 > 0f)
NPC.spriteDirection = -1;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 354 B

+4 -4
View File
@@ -42,8 +42,8 @@ namespace CalamityMod.NPCs.Abyss
{
NPC.Calamity().canBreakPlayerDefense = true;
NPC.damage = 135;
NPC.width = 66; //36
NPC.height = 86; //20
NPC.width = 40; //36
NPC.height = 84; //20
NPC.defense = 10;
NPC.lifeMax = 48000;
NPC.aiStyle = -1;
@@ -139,11 +139,11 @@ namespace CalamityMod.NPCs.Abyss
}
if (NPC.velocity.X < 0f)
{
NPC.spriteDirection = -1;
NPC.spriteDirection = 1;
}
else if (NPC.velocity.X > 0f)
{
NPC.spriteDirection = 1;
NPC.spriteDirection = -1;
}
if (Main.player[NPC.target].dead)
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 287 B

+4 -4
View File
@@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss
public override void SetDefaults()
{
NPC.damage = 65; //70
NPC.width = 54; //28
NPC.height = 76; //28
NPC.width = 40; //28
NPC.height = 54; //28
NPC.defense = 50;
NPC.lifeMax = 60000;
NPC.aiStyle = -1; //new
@@ -117,9 +117,9 @@ namespace CalamityMod.NPCs.Abyss
NPC.position.Y = NPC.position.Y + num192;
if (num191 < 0f)
NPC.spriteDirection = -1;
else if (num191 > 0f)
NPC.spriteDirection = 1;
else if (num191 > 0f)
NPC.spriteDirection = -1;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 264 B

+12 -9
View File
@@ -4365,6 +4365,17 @@ namespace CalamityMod.NPCs
// Apply balancing resists/vulnerabilities.
BalancingChangesManager.ApplyFromProjectile(npc, ref damage, projectile);
if (CalamityLists.GrenadeResistIDs.Contains(projectile.type))
{
// Eater of Worlds has a vanilla resist in Expert+, this gives it to him in Normal mode
bool hasResist = CalamityLists.EaterofWorldsIDs.Contains(npc.type) && !Main.expertMode;
// Add a resist for BoC's creepers and Prehardmode worm bosses
if (npc.type == NPCID.Creeper || CalamityLists.DesertScourgeIDs.Contains(npc.type) || CalamityLists.PerforatorIDs.Contains(npc.type))
hasResist = true;
if (hasResist)
damage = (int)(damage * 0.2);
}
if (CalamityLists.pierceResistList.Contains(npc.type))
PierceResistGlobal(projectile, npc, ref damage);
@@ -4375,14 +4386,6 @@ namespace CalamityMod.NPCs
// TODO -- What in god's name is this?
private void PierceResistGlobal(Projectile projectile, NPC npc, ref int damage)
{
if (CalamityLists.GrenadeResistIDs.Contains(projectile.type))
{
if (!CalamityLists.EaterofWorldsIDs.Contains(npc.type))
damage = (int)(damage * 0.2);
else if (!Main.expertMode)
damage = (int)(damage * 0.2);
}
// Thanatos segments do not trigger pierce resistance if they are closed
if (CalamityLists.ThanatosIDs.Contains(npc.type) && unbreakableDR)
return;
@@ -4393,7 +4396,7 @@ namespace CalamityMod.NPCs
damage -= (int)(damage * damageReduction);
if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !CalamityLists.pierceResistExceptionList.Contains(projectile.type) && !projectile.IsSummon() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99)
if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !CalamityLists.pierceResistExceptionList.Contains(projectile.type) && !projectile.CountsAsClass<SummonDamageClass>() && projectile.aiStyle != 15 && projectile.aiStyle != 39 && projectile.aiStyle != 99)
projectile.Calamity().timesPierced++;
}
#endregion
+1 -6
View File
@@ -1597,12 +1597,7 @@ namespace CalamityMod.NPCs
if (type == NPCID.GoblinTinkerer)
{
SetShopItem(ref shop, ref nextSlot, ItemID.StinkPotion, true, Item.buyPrice(0, 1, 0, 0));
SetShopItem(ref shop, ref nextSlot, ItemType<MeleeLevelMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<RangedLevelMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<MagicLevelMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<SummonLevelMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<RogueLevelMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<StatMeter>(), price: Item.buyPrice(0, 5));
SetShopItem(ref shop, ref nextSlot, ItemType<StatMeter>());
}
if (type == NPCID.Mechanic)
+2 -2
View File
@@ -1897,8 +1897,8 @@ namespace CalamityMod.NPCs.Providence
ModContent.ProjectileType<ApparatusExplosion>()
};
bool allowedClass = projectile.IsSummon() || (!projectile.CountsAsClass<MeleeDamageClass>() && !projectile.CountsAsClass<RangedDamageClass>() &&
!projectile.CountsAsClass<MagicDamageClass>() && !projectile.CountsAsClass<ThrowingDamageClass>());
bool allowedClass = projectile.CountsAsClass<SummonDamageClass>() || (!projectile.CountsAsClass<MeleeDamageClass>() && !projectile.CountsAsClass<RangedDamageClass>() &&
!projectile.CountsAsClass<MagicDamageClass>() && !projectile.CountsAsClass<ThrowingDamageClass>() && !projectile.CountsAsClass<SummonMeleeSpeedDamageClass>());
bool allowedDamage = allowedClass && damage <= 75; //Flat 75 regardless of difficulty.
//Absorber on-hit effects likely won't proc this but Deific Amulet and Astral Bulwark stars will proc this.
bool allowedBabs = Main.player[projectile.owner].Calamity().pArtifact && !Main.player[projectile.owner].Calamity().profanedCrystalBuffs;
+8 -6
View File
@@ -135,6 +135,10 @@ namespace CalamityMod.Projectiles
{
CreatedByPlayerDash = source is ProjectileSource_PlayerDashHit;
IEntitySource sourceItem = source as EntitySource_ItemUse_WithAmmo;
if (sourceItem != null)
extorterBoost = true;
// TODO -- it would be nice to move frame one hacks here, but this runs in the middle of NewProjectile
// which is way too early, the projectile's own initialization isn't even done yet
}
@@ -2397,9 +2401,6 @@ namespace CalamityMod.Projectiles
damage = (int)Math.Ceiling(damage * proximityDamageFactor);
}
if (!projectile.npcProj && !projectile.trap && projectile.CountsAsClass<RogueDamageClass>() && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
// Aerial Bane does 50% damage to "airborne" enemies. This is just simple math to revert that as it is a very unbalanced mechanic.
if (projectile.type == ProjectileID.DD2BetsyArrow)
{
@@ -2569,7 +2570,7 @@ namespace CalamityMod.Projectiles
{
if (projectile.CountsAsClass<RogueDamageClass>())
{
if (modPlayer.etherealExtorter && Main.player[projectile.owner].ownedProjectileCounts[ProjectileType<LostSoulFriendly>()] < 5)
if (modPlayer.etherealExtorter && extorterBoost && Main.player[projectile.owner].ownedProjectileCounts[ProjectileType<LostSoulFriendly>()] < 5)
{
for (int i = 0; i < 2; i++)
{
@@ -2582,13 +2583,14 @@ namespace CalamityMod.Projectiles
}
}
if (modPlayer.scuttlersJewel && stealthStrike)
if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0)
{
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(15);
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType<JewelSpike>(), damage, projectile.knockBack, projectile.owner);
Main.projectile[spike].frame = 4;
if (spike.WithinBounds(Main.maxProjectiles))
Main.projectile[spike].DamageType = DamageClass.Generic;
modPlayer.scuttlerCooldown = 30;
}
}
-287
View File
@@ -1,287 +0,0 @@
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Magic
{
public class MagnusBeam : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Beam");
}
public override void SetDefaults()
{
Projectile.width = 8;
Projectile.height = 8;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.penetrate = 1;
Projectile.extraUpdates = 2;
Projectile.alpha = 0;
}
public override void AI()
{
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X);
float num29 = 5f;
float num30 = 150f;
float scaleFactor = 6f;
Vector2 value7 = new Vector2(10f, 20f);
float num31 = 1f;
int num32 = 3 * Projectile.MaxUpdates;
int num33 = Utils.SelectRandom(Main.rand, new int[]
{
56,
92,
229,
206,
181
});
int num34 = 261;
if (Projectile.ai[1] == 0f)
{
Projectile.ai[1] = 1f;
Projectile.localAI[0] = (float)-(float)Main.rand.Next(48);
}
else if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer)
{
int num35 = -1;
float num36 = num30;
for (int num37 = 0; num37 < 200; num37++)
{
if (Main.npc[num37].active && Main.npc[num37].CanBeChasedBy(Projectile, false))
{
Vector2 center3 = Main.npc[num37].Center;
float num38 = Vector2.Distance(center3, Projectile.Center);
if (num38 < num36 && num35 == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, center3, 1, 1))
{
num36 = num38;
num35 = num37;
}
}
}
if (num36 < 8f)
{
Projectile.Kill();
return;
}
if (num35 != -1)
{
Projectile.ai[1] = num29 + 1f;
Projectile.ai[0] = (float)num35;
Projectile.netUpdate = true;
}
}
else if (Projectile.ai[1] > num29)
{
Projectile.ai[1] += 1f;
int num39 = (int)Projectile.ai[0];
if (!Main.npc[num39].active || !Main.npc[num39].CanBeChasedBy(Projectile, false))
{
Projectile.ai[1] = 1f;
Projectile.ai[0] = 0f;
Projectile.netUpdate = true;
}
else
{
Projectile.velocity.ToRotation();
Vector2 vector6 = Main.npc[num39].Center - Projectile.Center;
if (vector6.Length() < 20f)
{
Projectile.Kill();
return;
}
if (vector6 != Vector2.Zero)
{
vector6.Normalize();
vector6 *= scaleFactor;
}
float num40 = 30f;
Projectile.velocity = (Projectile.velocity * (num40 - 1f) + vector6) / num40;
}
}
if (Projectile.ai[1] >= 1f && Projectile.ai[1] < num29)
{
Projectile.ai[1] += 1f;
if (Projectile.ai[1] == num29)
{
Projectile.ai[1] = 1f;
}
}
Projectile.localAI[0] += 1f;
if (Projectile.localAI[0] == 48f)
{
Projectile.localAI[0] = 0f;
}
else if (Projectile.alpha == 0)
{
for (int num41 = 0; num41 < 2; num41++)
{
Vector2 value8 = Vector2.UnitX * -30f;
value8 = -Vector2.UnitY.RotatedBy((double)(Projectile.localAI[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7 - Projectile.rotation.ToRotationVector2() * 10f;
int num42 = Dust.NewDust(Projectile.Center, 0, 0, num34, 0f, 0f, 160, default, 1f);
Main.dust[num42].scale = num31;
Main.dust[num42].noGravity = true;
Main.dust[num42].position = Projectile.Center + value8 + Projectile.velocity * 2f;
Main.dust[num42].velocity = Vector2.Normalize(Projectile.Center + Projectile.velocity * 2f * 8f - Main.dust[num42].position) * 2f + Projectile.velocity * 2f;
}
}
if (Main.rand.NextBool(12))
{
Vector2 value9 = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int num44 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 100, default, 1f);
Main.dust[num44].velocity *= 0.1f;
Main.dust[num44].position = Projectile.Center + value9 * (float)Projectile.width / 2f + Projectile.velocity * 2f;
Main.dust[num44].fadeIn = 0.9f;
}
if (Main.rand.NextBool(64))
{
Vector2 value10 = -Vector2.UnitX.RotatedByRandom(0.4).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int num46 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 155, default, 0.8f);
Main.dust[num46].velocity *= 0.3f;
Main.dust[num46].position = Projectile.Center + value10 * (float)Projectile.width / 2f;
if (Main.rand.NextBool(2))
{
Main.dust[num46].fadeIn = 1.4f;
}
}
if (Main.rand.NextBool(4))
{
for (int num47 = 0; num47 < 2; num47++)
{
Vector2 value11 = -Vector2.UnitX.RotatedByRandom(0.8).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int num48 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, num33, 0f, 0f, 0, default, 1.2f);
Main.dust[num48].velocity *= 0.3f;
Main.dust[num48].noGravity = true;
Main.dust[num48].position = Projectile.Center + value11 * (float)Projectile.width / 2f;
if (Main.rand.NextBool(2))
{
Main.dust[num48].fadeIn = 1.4f;
}
}
}
if (Main.rand.NextBool(3))
{
Vector2 value13 = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int num50 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, num34, 0f, 0f, 100, default, 1f);
Main.dust[num50].velocity *= 0.3f;
Main.dust[num50].position = Projectile.Center + value13 * (float)Projectile.width / 2f;
Main.dust[num50].fadeIn = 1.2f;
Main.dust[num50].scale = 1.5f;
Main.dust[num50].noGravity = true;
}
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.25f / 255f);
for (int num151 = 0; num151 < 2; num151++)
{
int num154 = 14;
int num155 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - num154 * 2, Projectile.height - num154 * 2, 263, 0f, 0f, 100, default, 1.35f);
Main.dust[num155].noGravity = true;
Main.dust[num155].velocity *= 0.1f;
Main.dust[num155].velocity += Projectile.velocity * 0.5f;
}
if (Main.rand.NextBool(8))
{
int num156 = 16;
int num157 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width - num156 * 2, Projectile.height - num156 * 2, 263, 0f, 0f, 100, default, 1f);
Main.dust[num157].velocity *= 0.25f;
Main.dust[num157].noGravity = true;
Main.dust[num157].velocity += Projectile.velocity * 0.5f;
}
}
public override bool PreDraw(ref Color lightColor)
{
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 480);
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 480);
if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech)
return;
Player player = Main.player[Projectile.owner];
player.statLife += 1;
player.statMana += 25;
player.HealEffect(1);
player.ManaEffect(25);
}
public override void Kill(int timeLeft)
{
int num47 = Utils.SelectRandom(Main.rand, new int[]
{
56,
92,
229,
206,
181
});
int num48 = 263;
int num49 = 263;
int height = 50;
float num50 = 1.7f;
float num51 = 0.8f;
float num52 = 2f;
Vector2 value3 = (Projectile.rotation - 1.57079637f).ToRotationVector2();
Vector2 value4 = value3 * Projectile.velocity.Length() * (float)Projectile.MaxUpdates;
SoundEngine.PlaySound(SoundID.Item14, Projectile.position);
Projectile.position = Projectile.Center;
Projectile.width = Projectile.height = height;
Projectile.Center = Projectile.position;
Projectile.maxPenetrate = -1;
Projectile.penetrate = -1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.Damage();
for (int num53 = 0; num53 < 40; num53++)
{
num47 = Utils.SelectRandom(Main.rand, new int[]
{
56,
92,
229,
206,
181
});
int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num47, 0f, 0f, 200, default, num50);
Dust dust = Main.dust[num54];
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust.noGravity = true;
dust.velocity *= 3f;
dust.velocity += value4 * Main.rand.NextFloat();
num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num48, 0f, 0f, 100, default, num51);
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust.velocity *= 2f;
dust.noGravity = true;
dust.fadeIn = 1f;
dust.color = Color.Crimson * 0.5f;
dust.velocity += value4 * Main.rand.NextFloat();
}
for (int num55 = 0; num55 < 20; num55++)
{
int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num49, 0f, 0f, 0, default, num52);
Dust dust = Main.dust[num56];
dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f;
dust.noGravity = true;
dust.velocity *= 0.5f;
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
}
}
}
}
+3 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue
Projectile.friendly = true;
Projectile.penetrate = 16;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.localNPCHitCooldown = 5;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
Projectile.timeLeft = 300;
@@ -76,6 +76,8 @@ namespace CalamityMod.Projectiles.Rogue
}
if (Projectile.owner == Main.myPlayer)
{
if (hitCount < 4)
hitCount = 4;
for (int i = 0; i < hitCount; i++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
@@ -1,8 +1,9 @@
using System;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
@@ -11,11 +12,9 @@ using Terraria.ID;
using Terraria.ModLoader;
using static CalamityMod.CalamityUtils;
using static Terraria.ModLoader.ModContent;
using CalamityMod.DataStructures;
namespace CalamityMod.Projectiles.Melee
namespace CalamityMod.Projectiles.Summon
{
public class CnidarianJellyfishOnTheString : ModProjectile
{
public const int SegmentCount = 10;
File renamed without changes.

Before

Width:  |  Height:  |  Size: 533 B

After

Width:  |  Height:  |  Size: 533 B

@@ -4,7 +4,7 @@ using Terraria;
using Terraria.Audio;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
namespace CalamityMod.Projectiles.Summon
{
public class CnidarianSpark : ModProjectile
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

+1 -1
View File
@@ -345,7 +345,7 @@ namespace CalamityMod.Projectiles.Summon
8f,
Projectile.owner,
Projectile.whoAmI);
deathLaser.originalDamage = damage;
deathLaser.originalDamage = LaserBaseDamage;
if (player.HeldItem != null && deathLaser.whoAmI.WithinBounds(Main.maxProjectiles))
deathLaser.DamageType = DamageClass.Summon;
}
+1 -1
View File
@@ -266,7 +266,7 @@ namespace CalamityMod.Projectiles.Summon
targetVec *= speedMult;
SoundEngine.PlaySound(SoundID.Item20, Projectile.position);
int fireball = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, targetVec, ModContent.ProjectileType<HowlsHeartFireball>(), Projectile.damage, Projectile.knockBack, Projectile.owner, targetIndex, 0f);
Main.projectile[fireball].originalDamage = Projectile.damage;
Main.projectile[fireball].originalDamage = Projectile.originalDamage;
Main.projectile[fireball].netUpdate = true;
Main.projectile[fireball].frame = Main.rand.Next(4);
Projectile.netUpdate = true;
@@ -35,6 +35,7 @@ namespace CalamityMod.Projectiles.Summon
if (!hit)
mult = enrage ? 0.2f : 0.1f; //punishing to miss
int damage = (int)((Projectile.damage * 0.2f) * mult);
int origDmg = (int)((Projectile.originalDamage * 0.2f) * mult);
float outerAngleVariance = MathHelper.TwoPi / (float)outerSplits;
float outerOffsetAngle = MathHelper.Pi / (2f * outerSplits);
@@ -52,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon
int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + outerPosVec, velocity, ModContent.ProjectileType<ProfanedCrystalMageFireballSplit>(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].originalDamage = damage;
Main.projectile[proj].originalDamage = origDmg;
Main.projectile[proj].DamageType = DamageClass.Summon;
}
if (innerSplits > 0) //only runs if there's still inner splits to create
@@ -64,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon
proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + innerPosVec, velocity, ModContent.ProjectileType<ProfanedCrystalMageFireballSplit>(), damage, Projectile.knockBack, Projectile.owner, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
{
Main.projectile[proj].originalDamage = damage;
Main.projectile[proj].originalDamage = origDmg;
Main.projectile[proj].DamageType = DamageClass.Summon;
}
}
+6 -5
View File
@@ -62,6 +62,7 @@ namespace CalamityMod.Projectiles.Summon
softcappedDamageMultiplier = ((damageMultiplier - 3f) * 0.1f) + 3f;
int radiantOrbDamage = (int)(Projectile.damage * softcappedDamageMultiplier);
int radiantOrbOriginalDamage = (int)(Projectile.originalDamage * softcappedDamageMultiplier);
int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, AllocatedSlots));
// Hard-cap the orb appear rate and damage.
@@ -76,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon
GeneralTimer++;
NPC potentialTarget = Projectile.Center.MinionHoming(TargetCheckDistance, Owner);
if (potentialTarget != null && Main.myPlayer == Projectile.owner)
AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage);
AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage, radiantOrbOriginalDamage);
}
public void VerifyIdentityOfCaller()
@@ -93,7 +94,7 @@ namespace CalamityMod.Projectiles.Summon
}
}
public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage)
public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage, int radiantOrbOriginalDamage)
{
if (GeneralTimer % 35f == 34f)
{
@@ -103,7 +104,7 @@ namespace CalamityMod.Projectiles.Summon
Vector2 fireVelocity = Projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 15f;
int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, fireVelocity, ModContent.ProjectileType<SarosSunfire>(), radiantOrbDamage / 2, Projectile.knockBack, Projectile.owner);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = radiantOrbDamage / 2;
Main.projectile[p].originalDamage = radiantOrbOriginalDamage / 2;
}
}
@@ -113,14 +114,14 @@ namespace CalamityMod.Projectiles.Summon
Vector2 bootlegRadianceOrbVelocity = Projectile.SafeDirectionTo(target.Center) * 2f;
int p2 = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType<SarosMicrosun>(), radiantOrbDamage, Projectile.knockBack * 4f, Projectile.owner);
if (Main.projectile.IndexInRange(p2))
Main.projectile[p2].originalDamage = radiantOrbDamage;
Main.projectile[p2].originalDamage = radiantOrbOriginalDamage;
for (int i = 0; i < 3; i++)
{
float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f);
Vector2 fireVelocity = Projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 19f;
int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, fireVelocity, ModContent.ProjectileType<SarosSunfire>(), radiantOrbDamage / 2, Projectile.knockBack, Projectile.owner);
if (Main.projectile.IndexInRange(p))
Main.projectile[p].originalDamage = radiantOrbDamage / 2;
Main.projectile[p].originalDamage = radiantOrbOriginalDamage / 2;
}
}
}
+7 -4
View File
@@ -1,4 +1,6 @@
using CalamityMod.Buffs.Summon;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.CalPlayer;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
@@ -41,9 +43,10 @@ namespace CalamityMod.Projectiles.Summon
// The false gun's damage is changed to the appropriate value every time a Tactical Plague Jet wants to fire a bullet.
private static void DefineFalseGun()
{
int p90ID = ModContent.ItemType<Items.Weapons.Ranged.P90>();
int p90ID = ModContent.ItemType<P90>();
FalseGun = new Item();
FalseGun.SetDefaults(p90ID, true);
FalseGun.damage = TacticalPlagueEngine.BaseDamage;
FalseGun.consumeAmmoOnFirstShotOnly = false;
FalseGun.consumeAmmoOnLastShotOnly = false;
@@ -174,14 +177,14 @@ namespace CalamityMod.Projectiles.Summon
}
// Fire the selected bullet, nothing special.
else {
projIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(potentialTarget.Center) * shootSpeed, projID, damage, kb, Projectile.owner);}
else
projIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.SafeDirectionTo(potentialTarget.Center) * shootSpeed, projID, damage, kb, Projectile.owner);
// Regardless of what was fired, force it to be a summon projectile so that summon accessories work.
if (projIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[projIndex].DamageType = DamageClass.Summon;
Main.projectile[projIndex].originalDamage = Projectile.originalDamage;
Main.projectile[projIndex].minion = false;
}
}
+2 -2
View File
@@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.knockBack,
Projectile.owner,
(-Vector2.Normalize(offset)).ToRotation());
Main.projectile[beam].originalDamage = Projectile.damage;
Main.projectile[beam].originalDamage = Projectile.originalDamage;
}
}
// Summon a giant beam
@@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.knockBack,
Projectile.owner,
0f);
Main.projectile[beam].originalDamage = Projectile.damage;
Main.projectile[beam].originalDamage = Projectile.originalDamage;
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Summon
{
Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2CircularEdge(8f, 8f);
int seeker = Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, Main.rand.NextVector2Circular(12f, 12f), ModContent.ProjectileType<PlagueSeeker>(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner);
Main.projectile[seeker].originalDamage = Projectile.damage / 2;
Main.projectile[seeker].originalDamage = Projectile.originalDamage / 2;
Main.projectile[seeker].DamageType = DamageClass.Summon;
}
}
@@ -6,7 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
namespace CalamityMod.Projectiles.Typeless
{
public class FungalClumpMinion : ModProjectile
{
@@ -28,11 +28,9 @@ namespace CalamityMod.Projectiles.Summon
Projectile.friendly = true;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.minionSlots = 0f;
Projectile.timeLeft = 18000;
Projectile.penetrate = -1;
Projectile.timeLeft *= 5;
Projectile.minion = true;
Projectile.tileCollide = false;
}
@@ -59,6 +57,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
Projectile.damage = (int)player.GetBestClassDamage().ApplyTo(Projectile.originalDamage);
//Animation
Projectile.frameCounter++;
if (Projectile.frameCounter > 6)
@@ -74,16 +74,16 @@ namespace CalamityMod.Projectiles.Summon
//Initializing dust and damage
if (Projectile.localAI[0] == 0f)
{
int num226 = 36;
for (int num227 = 0; num227 < num226; num227++)
int dustAmt = 36;
for (int i = 0; i < dustAmt; i++)
{
Vector2 vector6 = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Projectile.Center;
Vector2 vector7 = vector6 - Projectile.Center;
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 56, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f);
Main.dust[num228].noGravity = true;
Main.dust[num228].noLight = true;
Main.dust[num228].velocity = vector7;
Vector2 spawnPos = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
spawnPos = spawnPos.RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Projectile.Center;
Vector2 velocity = spawnPos - Projectile.Center;
int idx = Dust.NewDust(spawnPos + velocity, 0, 0, 56, velocity.X * 1.5f, velocity.Y * 1.5f, 100, default, 1.4f);
Main.dust[idx].noGravity = true;
Main.dust[idx].noLight = true;
Main.dust[idx].velocity = velocity;
}
Projectile.localAI[0] += 1f;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

+269
View File
@@ -0,0 +1,269 @@
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class MagnusBeam : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Beam");
}
public override void SetDefaults()
{
Projectile.width = 8;
Projectile.height = 8;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.penetrate = 1;
Projectile.extraUpdates = 2;
Projectile.alpha = 0;
}
public override void AI()
{
Projectile.rotation = Projectile.velocity.ToRotation();
float limit = 5f;
float scaleFactor = 6f;
if (Projectile.ai[1] == 0f)
{
Projectile.ai[1] = 1f;
Projectile.localAI[0] = (float)-(float)Main.rand.Next(48);
}
else if (Projectile.ai[1] == 1f && Projectile.owner == Main.myPlayer)
{
int targetIdx = -1;
float npcRange = 150f;
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && Main.npc[i].CanBeChasedBy(Projectile, false))
{
Vector2 npcPos = Main.npc[i].Center;
float npcDist = Vector2.Distance(npcPos, Projectile.Center);
if (npcDist < npcRange && targetIdx == -1 && Collision.CanHitLine(Projectile.Center, 1, 1, npcPos, 1, 1))
{
npcRange = npcDist;
targetIdx = i;
}
}
}
if (npcRange < 8f)
{
Projectile.Kill();
return;
}
if (targetIdx != -1)
{
Projectile.ai[1] = limit + 1f;
Projectile.ai[0] = (float)targetIdx;
Projectile.netUpdate = true;
}
}
else if (Projectile.ai[1] > limit)
{
Projectile.ai[1] += 1f;
int idx = (int)Projectile.ai[0];
if (!Main.npc[idx].active || !Main.npc[idx].CanBeChasedBy(Projectile, false))
{
Projectile.ai[1] = 1f;
Projectile.ai[0] = 0f;
Projectile.netUpdate = true;
}
else
{
Projectile.velocity.ToRotation();
Vector2 toNPC = Main.npc[idx].Center - Projectile.Center;
if (toNPC.Length() < 20f)
{
Projectile.Kill();
return;
}
if (toNPC != Vector2.Zero)
{
toNPC.Normalize();
toNPC *= scaleFactor;
}
float homingSpeed = 30f;
Projectile.velocity = (Projectile.velocity * (homingSpeed - 1f) + toNPC) / homingSpeed;
}
}
if (Projectile.ai[1] >= 1f && Projectile.ai[1] < limit)
{
Projectile.ai[1] += 1f;
if (Projectile.ai[1] == limit)
{
Projectile.ai[1] = 1f;
}
}
int dustTypeRand = Utils.SelectRandom(Main.rand, new int[]
{
56,
92,
229,
206,
181
});
int dustType = 261;
Projectile.localAI[0] += 1f;
if (Projectile.localAI[0] == 48f)
{
Projectile.localAI[0] = 0f;
}
else if (Projectile.alpha == 0)
{
for (int i = 0; i < 2; i++)
{
Vector2 offset = Vector2.UnitX * -30f;
offset = -Vector2.UnitY.RotatedBy((double)(Projectile.localAI[0] * 0.1308997f + i * MathHelper.Pi), default) * new Vector2(10f, 20f) - Projectile.rotation.ToRotationVector2() * 10f;
int idx = Dust.NewDust(Projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1f);
Main.dust[idx].scale = 1f;
Main.dust[idx].noGravity = true;
Main.dust[idx].position = Projectile.Center + offset + Projectile.velocity * 2f;
Main.dust[idx].velocity = Vector2.Normalize(Projectile.Center + Projectile.velocity * 2f * 8f - Main.dust[idx].position) * 2f + Projectile.velocity * 2f;
}
}
if (Main.rand.NextBool(12))
{
Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 100, default, 1f);
Main.dust[idx].velocity *= 0.1f;
Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f + Projectile.velocity * 2f;
Main.dust[idx].fadeIn = 0.9f;
}
if (Main.rand.NextBool(64))
{
Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.4).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 234, 0f, 0f, 155, default, 0.8f);
Main.dust[idx].velocity *= 0.3f;
Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f;
if (Main.rand.NextBool(2))
{
Main.dust[idx].fadeIn = 1.4f;
}
}
if (Main.rand.NextBool(4))
{
for (int i = 0; i < 2; i++)
{
Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.8).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustTypeRand, 0f, 0f, 0, default, 1.2f);
Main.dust[idx].velocity *= 0.3f;
Main.dust[idx].noGravity = true;
Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f;
if (Main.rand.NextBool(2))
{
Main.dust[idx].fadeIn = 1.4f;
}
}
}
if (Main.rand.NextBool(3))
{
Vector2 offset = -Vector2.UnitX.RotatedByRandom(0.2).RotatedBy((double)Projectile.velocity.ToRotation(), default);
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 1f);
Main.dust[idx].velocity *= 0.3f;
Main.dust[idx].position = Projectile.Center + offset * (float)Projectile.width / 2f;
Main.dust[idx].fadeIn = 1.2f;
Main.dust[idx].scale = 1.5f;
Main.dust[idx].noGravity = true;
}
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.25f / 255f);
for (int i = 0; i < 2; i++)
{
int sizeFactor = 14;
int idx = Dust.NewDust(Projectile.position, Projectile.width - sizeFactor * 2, Projectile.height - sizeFactor * 2, 263, 0f, 0f, 100, default, 1.35f);
Main.dust[idx].noGravity = true;
Main.dust[idx].velocity *= 0.1f;
Main.dust[idx].velocity += Projectile.velocity * 0.5f;
}
if (Main.rand.NextBool(8))
{
int sizeFactor = 16;
int idx = Dust.NewDust(Projectile.position, Projectile.width - sizeFactor * 2, Projectile.height - sizeFactor * 2, 263, 0f, 0f, 100, default, 1f);
Main.dust[idx].velocity *= 0.25f;
Main.dust[idx].noGravity = true;
Main.dust[idx].velocity += Projectile.velocity * 0.5f;
}
}
public override bool PreDraw(ref Color lightColor)
{
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 480);
if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech)
return;
Player player = Main.player[Projectile.owner];
player.statLife += 1;
player.statMana += 25;
player.HealEffect(1);
player.ManaEffect(25);
}
public override void Kill(int timeLeft)
{
int dustType1 = 263;
int dustType2 = 263;
int height = 50;
float scale1 = 1.7f;
float scale2 = 0.8f;
float scale3 = 2f;
Vector2 value3 = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2();
Vector2 velocity = value3 * Projectile.velocity.Length() * (float)Projectile.MaxUpdates;
SoundEngine.PlaySound(SoundID.Item14, Projectile.position);
Projectile.ExpandHitboxBy(height);
Projectile.maxPenetrate = -1;
Projectile.penetrate = -1;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.Damage();
for (int i = 0; i < 40; i++)
{
int dustType = Utils.SelectRandom(Main.rand, new int[]
{
56,
92,
229,
206,
181
});
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 200, default, scale1);
Dust dust = Main.dust[idx];
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust.noGravity = true;
dust.velocity *= 3f;
dust.velocity += velocity * Main.rand.NextFloat();
idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType1, 0f, 0f, 100, default, scale2);
dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f;
dust.velocity *= 2f;
dust.noGravity = true;
dust.fadeIn = 1f;
dust.color = Color.Crimson * 0.5f;
dust.velocity += velocity * Main.rand.NextFloat();
}
for (int i = 0; i < 20; i++)
{
int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType2, 0f, 0f, 0, default, scale3);
Dust dust = Main.dust[idx];
dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f;
dust.noGravity = true;
dust.velocity *= 0.5f;
dust.velocity += velocity * (0.6f + 0.6f * Main.rand.NextFloat());
}
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

+2 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Typeless
{
public class SandCloakVeil : ModProjectile
{
private const float radius = 225f;
private const float radius = 272f;
private const int duration = 900;
public override void SetStaticDefaults()
@@ -27,6 +27,7 @@ namespace CalamityMod.Projectiles.Typeless
Projectile.timeLeft = duration;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 10;
Projectile.scale = 1.2f;
}
public override void AI()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@@ -13,7 +13,6 @@ namespace CalamityMod.Tiles.DraedonStructures
Main.tileBlockLight[Type] = true;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.SetMerge(Type, ModContent.TileType<RustedPlating>());
HitSound = SoundID.Tink;
DustType = 30;
-1
View File
@@ -13,7 +13,6 @@ namespace CalamityMod.Tiles.DraedonStructures
Main.tileBlockLight[Type] = true;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.SetMerge(Type, ModContent.TileType<LaboratoryPlating>());
HitSound = SoundID.Tink;
DustType = 32;
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff. Show more