Localized DropHelper conditions + Suggestions

- Removed Cosmic Elemental
- Fairies from Fairy Boots no longer have Lifeform Analyzer rarity
- Astral Grass can now drop Hay
- Fusion Feeders can now drop Shark Fins
- Mirage Jelly can now drop Jellyfish Necklace
- Adjusted Bloodworm spawn rates
- Disabled Profaned enemy spawns while in the Crags
- Providence now drops Aegis/Wings per player
- Filtered some dialogues via the ChildSafety settings
This commit is contained in:
Altixal committed 2023-06-14 22:08:32 +07:00
1 parent 798fd4cca1
commit 54318bd30b
27 files changed
+102 -231

No files matched your search

+4
View File
@@ -518,6 +518,10 @@ namespace CalamityMod.CalPlayer
}
// Ores below here
// Celestial Tracers give immunity to block contact effects
if (cTracers)
return;
// Astral Ore inflicts Astral Infection briefly on contact
if (tile.TileType == astralOreID)
Player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 2);
-1
View File
@@ -989,7 +989,6 @@ namespace CalamityMod
NPCType<BloomSlime>(),
NPCType<Bohldohr>(),
NPCType<CalamityEye>(),
NPCType<CosmicElemental>(),
NPCType<CrimulanBlightSlime>(),
NPCType<Cryon>(),
NPCType<CryoSlime>(),
@@ -1,28 +0,0 @@
using CalamityMod.Tiles;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Placeables.Banners
{
public class CosmicElementalBanner : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetDefaults()
{
Item.width = 10;
Item.height = 24;
Item.maxStack = 9999;
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 10;
Item.useStyle = ItemUseStyleID.Swing;
Item.consumable = true;
Item.rare = ItemRarityID.Blue;
Item.value = Item.buyPrice(0, 0, 10, 0);
Item.createTile = ModContent.TileType<MonsterBanner>();
Item.placeStyle = 75;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

@@ -19,11 +19,9 @@ CelestialTracers: {
Acceleration multiplier: 3.0
Excellent vertical speed
Flight time: 250
50% increased running acceleration
Greater mobility on ice
Water and lava walking
Immunity to the On Fire! debuff
Temporary immunity to lava
50% increased running acceleration and greater mobility on ice
Provides the ability to walk on water, honey, and lava
Grants immunity to fire, lava, and harmful block effects
Being hit for over 200 damage will make you immune for an extended period of time
'Taking speed EVEN FURTHER BEYOND!'
'''
@@ -50,11 +48,9 @@ ElysianTracers: {
Acceleration multiplier: 2.75
Great vertical speed
Flight time: 180
36% increased running acceleration
Greater mobility on ice
Water and lava walking
Immunity to the On Fire! debuff
Temporary immunity to lava
36% increased running acceleration and greater mobility on ice
Provides the ability to walk on water, honey, and lava
Grants immunity to fire and lava
'Ludicrous speed!'
'''
}
@@ -135,11 +131,9 @@ SeraphTracers: {
Acceleration multiplier: 2.5
Good vertical speed
Flight time: 140
24% increased running acceleration
Greater mobility on ice
Water and lava walking
Immunity to the On Fire! debuff
Temporary immunity to lava
24% increased running acceleration and greater mobility on ice
Provides the ability to walk on water, honey, and lava
Grants immunity to fire and lava
'Ludicrous speed!'
'''
}
@@ -255,11 +255,6 @@ ColossalSquidBanner: {
Tooltip: "{$CommonItemTooltip.BannerBonus}Colossal Squid"
}
CosmicElementalBanner: {
DisplayName: Cosmic Elemental Banner
Tooltip: "{$CommonItemTooltip.BannerBonus}Cosmic Elemental"
}
CrimulanBlightSlimeBanner: {
DisplayName: Crimulan Blight Slime Banner
Tooltip: "{$CommonItemTooltip.BannerBonus}Crimulan Blight Slime"
@@ -1,3 +1,26 @@
// Drop Conditions
DropCondition: {
FirstKill: Drops only on the first kill
MechBoss: Drops on the first kill of the final Mechanical Boss
Cynosure: Drops once you have defeated both Draedon and Calamitas
ProvidenceHallow:
'''
Drops if Providence was summoned in the Hallow
or if Providence is only attacked during nighttime
'''
ProvidenceUnderworld:
'''
Drops if Providence was summoned in the Underworld
or if Providence is only attacked during nighttime
'''
ProvidenceNight: Drops if Providence is only attacked during nighttime
ProvidenceChallenge:
'''
Drops if Providence was defeated only with the {0}
{$Bestiary_ItemDropConditions.IsExpert}
'''
}
// Status
WikiStatus1: "[i:149][c/EE4939:Note: The Fandom wiki is no longer supported by Calamity.] [i:149]"
WikiStatus2: "[i:149][c/EE4939:Check out the Official Calamity Mod Wiki at ][c/3989FF:calamitymod.wiki.gg][c/EE4939:!] [i:149]"
@@ -148,7 +148,6 @@ AuroraSpirit.DisplayName: Aurora Spirit
BloomSlime.DisplayName: Bloom Slime
Bohldohr.DisplayName: Bohldohr
Cnidrion.DisplayName: Cnidrion
CosmicElemental.DisplayName: Cosmic Elemental
CrawlerAmber.DisplayName: Amber Crawler
CrawlerAmethyst.DisplayName: Amethyst Crawler
CrawlerCrystal.DisplayName: Crystal Crawler
@@ -323,8 +322,8 @@ FAP: {
BloodMoonSlap: Sorry, I have no moral compass at the moment.
Normal1: I HATE WALMART! ...Anyway, what do you want this time?
Normal2: Drink something that turns you into a magical flying unicorn so you can be just like me.
Normal3: Did anyone ever tell you that large assets cause back pain? Well, they were right.
Normal4: Deals so good I'll [$$!$] myself! ...Sorry, just had a minor stroke!
Normal3: Deals so good I'll [$$!$] myself! ...Sorry, just had a minor stroke!
Normal4: Did anyone ever tell you that large assets cause back pain? Well, they were right.
Archmage: I never realized how well-endowed {0} was. It had to be the largest icicle I'd ever seen.
BrimstoneWitch: The abuse {0} went through is something I can hardly comprehend. I'd offer her a drink, but I don't think she'd enjoy it.
Tavernkeep1: My booze will always be better than {0}'s, and nobody can convince me otherwise.
@@ -55,7 +55,7 @@ MechanicChat: {
MoonLordDefeated: What do you mean your traps aren't making the cut? Don't look at me!
Eclipse: Um... should my nightlight be on?
AcidRain: Maybe I should've waterproofed my gadgets... They're starting to corrode.
DrunkPrincess: Well, I like " + Main.npc[fapsol].GivenName + ", but I, ah... I have my eyes on someone else.
DrunkPrincess: Well, I like {0}, but I, ah... I have my eyes on someone else.
}
MerchantChat: {
@@ -111,8 +111,8 @@ SteampunkerChat: {
StylistChat: {
Hardmode: Please don't catch space lice. Or {0} lice. Or just lice in general.
DrunkPrincess1: Sometimes I catch {0} sneaking up from behind me.
DrunkPrincess2: "{0} is always trying to brighten my mood... even if, deep down, I know she's sad..."
DrunkPrincess1: "{0} is always trying to brighten my mood... even if, deep down, I know she's sad..."
DrunkPrincess2: Sometimes I catch {0} sneaking up from behind me.
ProfanedSoulCrystal1: They look so cute and yet, I can feel their immense power just by being near them. What are you?
ProfanedSoulCrystal2: I hate to break it to you, but you don't have hair to cut or style, hun.
ProfanedDonuts: Aww, they're so cute, do they have names?
+1
View File
@@ -226,6 +226,7 @@ namespace CalamityMod.NPCs.Abyss
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<LifeJelly>(), 7, 5));
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<ManaJelly>(), 7, 5));
npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType<VitalJelly>(), 7, 5));
npcLoot.Add(ItemID.JellyfishNecklace, 10);
}
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
+2 -2
View File
@@ -118,8 +118,8 @@ namespace CalamityMod.NPCs.AcidRain
// Increase bloodworm spawn rate relative to the number of existing bloodworms, parabolic multiplier ranging from 5x spawn rate with 0 blood worms to 1x with 5 or more
int bloodwormAmt = NPC.CountNPCS(NPC.type);
float spawnMult = bloodwormAmt > 5 ? 1f : (float)(0.16 * Math.Pow(5 - bloodwormAmt, 2)) + 1f;
float baseSpawnRate = AcidRainEvent.OldDukeHasBeenEncountered ? 2.569f : 5.138f;
float spawnRate = SpawnCondition.WormCritter.Chance * baseSpawnRate * spawnMult;
float baseSpawnRate = DownedBossSystem.downedBoomerDuke ? 0.5f : AcidRainEvent.OldDukeHasBeenEncountered ? 2f : 1f;
float spawnRate = baseSpawnRate * spawnMult;
return spawnRate;
}
+1
View File
@@ -309,6 +309,7 @@ namespace CalamityMod.NPCs.Astral
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
npcLoot.Add(ItemID.SharkFin, 8);
npcLoot.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType<Stardust>(), 1, 2, 3, 3, 4));
}
}
+4 -10
View File
@@ -3657,17 +3657,10 @@ namespace CalamityMod.NPCs
break;
case NPCAIStyleID.GraniteElemental:
if (npc.type == NPCType<CosmicElemental>())
switch (npc.type)
{
return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod);
}
else
{
switch (npc.type)
{
case NPCID.GraniteFlyer:
return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod);
}
case NPCID.GraniteFlyer:
return CalamityGlobalAI.BuffedGraniteElementalAI(npc, Mod);
}
break;
@@ -3714,6 +3707,7 @@ namespace CalamityMod.NPCs
npc.lavaImmune = true;
npc.dontTakeDamage = true;
npc.noTileCollide = true;
npc.rarity = 0;
// Teleport to the player if far enough away.
if (Vector2.Distance(npc.Center, targetData.Center) > 1000f)
+1 -1
View File
@@ -1124,7 +1124,7 @@ namespace CalamityMod.NPCs
if (Main.rand.NextBool(15) && Main.hardMode)
chat = CalamityUtils.GetText("Vanilla.StylistChat.Hardmode").Format(worldEvil);
if (Main.rand.NextBool(15) && fapsol != -1)
chat = CalamityUtils.GetText("Vanilla.StylistChat.DrunkPrincess" + Main.rand.Next(1, 2 + 1)).Format(Main.npc[fapsol].GivenName);
chat = CalamityUtils.GetText("Vanilla.StylistChat.DrunkPrincess" + (ChildSafety.Disabled ? Main.rand.Next(1, 2 + 1) : 1)).Format(Main.npc[fapsol].GivenName);
if ((Main.rand.NextBool(npc.GivenName == "Amber" ? 10 : 15)) && Main.LocalPlayer.Calamity().pArtifact)
{
if (Main.LocalPlayer.Calamity().profanedCrystalBuffs)
-130
View File
@@ -1,130 +0,0 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent;
using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Utilities;
namespace CalamityMod.NPCs.NormalNPCs
{
public class CosmicElemental : ModNPC
{
public override void SetStaticDefaults()
{
Main.npcFrameCount[NPC.type] = 11;
NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0);
value.Position.Y -= 6f;
value.PortraitPositionYOverride = -32f;
NPCID.Sets.NPCBestiaryDrawOffset[Type] = value;
}
public override void SetDefaults()
{
NPC.npcSlots = 0.5f;
NPC.aiStyle = NPCAIStyleID.GraniteElemental;
NPC.damage = 20;
NPC.width = NPC.height = 30;
NPC.defense = 10;
NPC.lifeMax = 25;
NPC.knockBackResist = 0.5f;
NPC.value = Item.buyPrice(0, 0, 3, 0);
NPC.HitSound = SoundID.NPCHit7;
NPC.DeathSound = SoundID.NPCDeath6;
Banner = NPC.type;
BannerItem = ModContent.ItemType<CosmicElementalBanner>();
NPC.Calamity().VulnerableToSickness = false;
}
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Caverns,
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("A curious construct, and though its origins are unknown, it has been decidedly proven that the core of its body leads to somewhere not of our world.")
});
}
public override void FindFrame(int frameHeight)
{
NPC.frameCounter++;
if (NPC.frameCounter > 6)
{
NPC.frame.Y += frameHeight;
NPC.frameCounter = 0;
}
if (NPC.ai[0] == -1f)
{
if (NPC.frame.Y >= frameHeight * 11)
NPC.frame.Y = frameHeight * 10;
else if (NPC.frame.Y <= frameHeight * 5)
NPC.frame.Y = frameHeight * 6;
NPC.rotation += NPC.velocity.X * 0.2f;
}
else
{
if (NPC.frame.Y >= frameHeight * 6)
NPC.frame.Y = 0;
NPC.rotation = NPC.velocity.X * 0.1f;
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
int height = texture.Height / Main.npcFrameCount[NPC.type];
int width = texture.Width;
SpriteEffects spriteEffects = SpriteEffects.None;
if (NPC.spriteDirection == -1)
{
spriteEffects = SpriteEffects.FlipHorizontally;
}
Main.spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(width / 2f, height / 2f), NPC.scale, spriteEffects, 0f);
return false;
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || spawnInfo.Player.Calamity().ZoneAbyss || spawnInfo.Player.Calamity().ZoneSunkenSea)
{
return 0f;
}
return SpawnCondition.Cavern.Chance * 0.01f;
}
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
{
int debuffType = CalamityWorld.getFixedBoi ? ModContent.BuffType<GodSlayerInferno>() : BuffID.Confused;
if (hurtInfo.Damage > 0)
target.AddBuff(debuffType, 180, true);
}
public override void HitEffect(NPC.HitInfo hit)
{
for (int k = 0; k < 5; k++)
{
Dust.NewDust(NPC.position, NPC.width, NPC.height, 70, hit.HitDirection, -1f, 0, default, 1f);
}
if (NPC.life <= 0)
{
for (int k = 0; k < 20; k++)
{
Dust.NewDust(NPC.position, NPC.width, NPC.height, 70, hit.HitDirection, -1f, 0, default, 1f);
}
}
}
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
npcLoot.Add(ItemID.BoneSword, 20);
npcLoot.Add(ItemID.Starfury, 50);
npcLoot.Add(ItemID.EnchantedSword, 50);
npcLoot.Add(ItemID.Terragrim, 100);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord)
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity)
{
return 0f;
}
+1 -1
View File
@@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || NPC.AnyNPCs(NPC.type))
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || NPC.AnyNPCs(NPC.type) || spawnInfo.Player.Calamity().ZoneCalamity)
{
return 0f;
}
+1 -1
View File
@@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord)
if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneCalamity)
{
return 0f;
}
+2 -2
View File
@@ -1884,12 +1884,12 @@ namespace CalamityMod.NPCs.Providence
// Drops Rune of Cos on first kill
npcLoot.AddIf(() => !DownedBossSystem.downedProvidence, ModContent.ItemType<RuneofKos>(), desc: DropHelper.FirstKillText);
npcLoot.AddIf(info =>
npcLoot.AddConditionalPerPlayer(info =>
{
Providence prov = info.npc.ModNPC<Providence>();
return prov.biomeType != 2 || !prov.hasTakenDaytimeDamage;
}, ModContent.ItemType<ElysianWings>(), desc: DropHelper.ProvidenceHallowText);
npcLoot.AddIf(info =>
npcLoot.AddConditionalPerPlayer(info =>
{
Providence prov = info.npc.ModNPC<Providence>();
return prov.biomeType == 2 || !prov.hasTakenDaytimeDamage;
+16 -8
View File
@@ -9,6 +9,7 @@ using System.Collections.Generic;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Bestiary;
using Terraria.GameContent.Events;
using Terraria.GameContent.Personalities;
@@ -136,18 +137,21 @@ namespace CalamityMod.NPCs.TownNPCs
dialogue.Add(this.GetLocalizedValue("Chat.Normal1"));
dialogue.Add(this.GetLocalizedValue("Chat.Normal2"));
dialogue.Add(this.GetLocalizedValue("Chat.Normal3"));
dialogue.Add(this.GetLocalizedValue("Chat.Normal4"));
if (ChildSafety.Disabled)
dialogue.Add(this.GetLocalizedValue("Chat.Normal4"));
int tavernKeep = NPC.FindFirstNPC(NPCID.DD2Bartender);
if (tavernKeep != -1)
{
dialogue.Add(this.GetLocalization("Chat.Tavernkeep1").Format(Main.npc[tavernKeep].GivenName));
dialogue.Add(this.GetLocalization("Chat.Tavernkeep2").Format(Main.npc[tavernKeep].GivenName));
dialogue.Add(this.GetLocalizedValue("Chat.Tavernkeep3"));
if (ChildSafety.Disabled)
dialogue.Add(this.GetLocalizedValue("Chat.Tavernkeep3"));
}
int permadong = NPC.FindFirstNPC(ModContent.NPCType<DILF>());
if (permadong != -1)
if (permadong != -1 && ChildSafety.Disabled)
dialogue.Add(this.GetLocalization("Chat.Archmage").Format(Main.npc[wife].GivenName));
int witch = NPC.FindFirstNPC(ModContent.NPCType<WITCH>());
@@ -157,8 +161,11 @@ namespace CalamityMod.NPCs.TownNPCs
if (wifeIsAround)
{
dialogue.Add(this.GetLocalization("Chat.Stylist1").Format(Main.npc[wife].GivenName));
dialogue.Add(this.GetLocalization("Chat.Stylist2").Format(Main.npc[wife].GivenName));
dialogue.Add(this.GetLocalization("Chat.Stylist3").Format(Main.npc[wife].GivenName));
if (ChildSafety.Disabled)
{
dialogue.Add(this.GetLocalization("Chat.Stylist2").Format(Main.npc[wife].GivenName));
dialogue.Add(this.GetLocalization("Chat.Stylist3").Format(Main.npc[wife].GivenName));
}
}
if (Main.dayTime)
@@ -200,7 +207,7 @@ namespace CalamityMod.NPCs.TownNPCs
if (Main.invasionType == InvasionID.MartianMadness)
dialogue.Add(this.GetLocalizedValue("Chat.Martians"));
if (DownedBossSystem.downedCryogen)
if (DownedBossSystem.downedCryogen && ChildSafety.Disabled)
dialogue.Add(this.GetLocalizedValue("Chat.CryogenDefeated"));
if (DownedBossSystem.downedLeviathan)
@@ -218,7 +225,7 @@ namespace CalamityMod.NPCs.TownNPCs
if (player.Calamity().chibii)
dialogue.Add(this.GetLocalizedValue("Chat.HasChibii"));
if (player.Calamity().aquaticHeart && !player.Calamity().aquaticHeartHide)
if (player.Calamity().aquaticHeart && !player.Calamity().aquaticHeartHide && ChildSafety.Disabled)
dialogue.Add(this.GetLocalizedValue("Chat.HasAnahitaTrans"));
if (player.Calamity().fabsolVodka)
@@ -228,7 +235,8 @@ namespace CalamityMod.NPCs.TownNPCs
{
dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn1"));
dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn2"));
dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn3"));
if (ChildSafety.Disabled)
dialogue.Add(this.GetLocalizedValue("Chat.HasAlicorn3"));
}
return dialogue;
+2 -1
View File
@@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Magic;
using CalamityMod.UI.CalamitasEnchants;
using System.Collections.Generic;
using Terraria;
using Terraria.GameContent;
using Terraria.GameContent.Bestiary;
using Terraria.GameContent.Events;
using Terraria.GameContent.Personalities;
@@ -116,7 +117,7 @@ namespace CalamityMod.NPCs.TownNPCs
}
int fab = NPC.FindFirstNPC(NPCType<FAP>());
if (fab != -1)
if (fab != -1 && ChildSafety.Disabled)
dialogue.Add(this.GetLocalization("Chat.DrunkPrincess").Format(Main.npc[fab].GivenName), 1.45);
if (NPC.AnyNPCs(NPCType<SEAHOE>()))
+11 -4
View File
@@ -1,5 +1,6 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent.Metadata;
@@ -50,11 +51,17 @@ namespace CalamityMod.Tiles.Astral
}
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
if (Main.rand.Next(20) == 0)
{
Item.NewItem(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16f, ModContent.ItemType<Items.Placeables.AstralGrassSeeds>());
Vector2 worldPosition = new Vector2(i, j).ToWorldCoordinates();
Player nearestPlayer = Main.player[Player.FindClosest(worldPosition, 16, 16)];
if (nearestPlayer.active)
{
if (nearestPlayer.ActiveItem().type == ItemID.Sickle)
yield return new Item(ItemID.Hay, Main.rand.Next(1, 2 + 1));
if (Main.rand.NextBool(20))
yield return new Item(ModContent.ItemType<Items.Placeables.AstralGrassSeeds>());
}
}
}
+11 -4
View File
@@ -1,5 +1,6 @@
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameContent.Metadata;
@@ -55,11 +56,17 @@ namespace CalamityMod.Tiles.Astral
height = 32;
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
public override IEnumerable<Item> GetItemDrops(int i, int j)
{
if (Main.rand.Next(20) == 0)
{
Item.NewItem(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16f, ModContent.ItemType<Items.Placeables.AstralGrassSeeds>());
Vector2 worldPosition = new Vector2(i, j).ToWorldCoordinates();
Player nearestPlayer = Main.player[Player.FindClosest(worldPosition, 16, 16)];
if (nearestPlayer.active)
{
if (nearestPlayer.ActiveItem().type == ItemID.Sickle)
yield return new Item(ItemID.Hay, Main.rand.Next(2, 4 + 1));
if (Main.rand.NextBool(20))
yield return new Item(ModContent.ItemType<Items.Placeables.AstralGrassSeeds>());
}
}
}
+7 -7
View File
@@ -112,14 +112,14 @@ namespace CalamityMod
#endregion
#region Bestiary Text
public static string FirstKillText = "Drops only on the first kill";
public static string MechBossText = "Drops on the first kill of the final Mechanical Boss";
public static string CynosureText = "Drops once you have defeated both Draedon and Calamitas";
public static string FirstKillText = CalamityUtils.GetTextValue("Misc.DropCondition.FirstKill");
public static string MechBossText = CalamityUtils.GetTextValue("Misc.DropCondition.MechBoss");
public static string CynosureText = CalamityUtils.GetTextValue("Misc.DropCondition.Cynosure");
public static string ProvidenceHallowText = "Drops if Providence was summoned in the Hallow\nor if Providence is only attacked during nighttime";
public static string ProvidenceUnderworldText = "Drops if Providence was summoned in the Underworld\nor if Providence is only attacked during nighttime";
public static string ProvidenceNightText = "Drops if Providence is only attacked during nighttime";
public static string ProvidenceChallengeText = $"Drops if Providence was defeated only with the [i:{ModContent.ItemType<ProfanedSoulArtifact>()}] Profaned Soul Artifact\nThis is an Expert Mode drop rate";
public static string ProvidenceHallowText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceHallow");
public static string ProvidenceUnderworldText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceUnderworld");
public static string ProvidenceNightText = CalamityUtils.GetTextValue("Misc.DropCondition.ProvidenceNight");
public static string ProvidenceChallengeText = CalamityUtils.GetText("Misc.DropCondition.ProvidenceChallenge").Format($"[i:{ModContent.ItemType<ProfanedSoulArtifact>()}]" + CalamityUtils.GetItemName<ProfanedSoulArtifact>().ToString());
#endregion
-3
View File
@@ -580,9 +580,6 @@ namespace CalamityMod
case 73:
npc = ModContent.NPCType<CrawlerCrystal>();
break;
case 75:
npc = ModContent.NPCType<CosmicElemental>();
break;
case 76:
npc = ModContent.NPCType<Horse>();
break;
-1
View File
@@ -318,7 +318,6 @@ namespace CalamityMod
{ ModContent.NPCType<ArmoredDiggerBody>(), new Tuple<bool, int[]>(true, Array.Empty<int>()) },
{ ModContent.NPCType<ArmoredDiggerTail>(), new Tuple<bool, int[]>(true, Array.Empty<int>()) },
{ ModContent.NPCType<Eidolist>(), new Tuple<bool, int[]>(true, Array.Empty<int>()) },
{ ModContent.NPCType<CosmicElemental>(), new Tuple<bool, int[]>(true, Array.Empty<int>()) },
{ ModContent.NPCType<SeaUrchin>(), new Tuple<bool, int[]>(false, new int[] { BuffID.Poisoned, BuffID.Venom }) },
{ ModContent.NPCType<Frogfish>(), new Tuple<bool, int[]>(false, new int[] { BuffID.Poisoned, BuffID.Venom }) },