Merge branch 'master' into post-scal-assets
No files matched your search
@@ -1089,6 +1089,10 @@ namespace CalamityMod.CalPlayer
|
||||
public FireParticleSet ProvidenceBurnEffectDrawer = new FireParticleSet(-1, int.MaxValue, Color.Yellow, Color.Red * 1.2f, 10f, 0.65f);
|
||||
#endregion Draw Effects
|
||||
|
||||
#region Draedon Summoning
|
||||
public bool AbleToSelectExoMech = false;
|
||||
#endregion Draedon Summoning
|
||||
|
||||
#endregion
|
||||
|
||||
#region SavingAndLoading
|
||||
@@ -2122,6 +2126,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
lastProjectileHit = null;
|
||||
|
||||
AbleToSelectExoMech = false;
|
||||
|
||||
CalamityPlayerMiscEffects.EnchantHeldItemEffects(player, player.Calamity(), player.ActiveItem());
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -5,12 +5,14 @@ using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
@@ -126,6 +128,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Potions (Quick Buff && Potion Sickness)
|
||||
HandlePotions(player, modPlayer);
|
||||
|
||||
// Check if schematics are present on the mouse, for the sake of registering their recipes.
|
||||
CheckIfMouseItemIsSchematic(player);
|
||||
|
||||
// Update all particle sets for items.
|
||||
// This must be done here instead of in the item logic because these sets are not properly instanced
|
||||
// in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items.
|
||||
@@ -156,57 +161,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (CalamityWorld.revenge || CalamityWorld.malice)
|
||||
{
|
||||
// This effect is way too annoying during the fight so I disabled it - Fab
|
||||
// Signus headcrab effect
|
||||
/*if (CalamityGlobalNPC.signus != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.signus].active)
|
||||
{
|
||||
if (Vector2.Distance(player.Center, Main.npc[CalamityGlobalNPC.signus].Center) <= 5200f)
|
||||
{
|
||||
float signusLifeRatio = 1f - (Main.npc[CalamityGlobalNPC.signus].life / Main.npc[CalamityGlobalNPC.signus].lifeMax);
|
||||
|
||||
// Reduce the power of Signus darkness based on your light level.
|
||||
float multiplier = 1f;
|
||||
switch (modPlayer.GetTotalLightStrength())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
multiplier = 0.75f;
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
multiplier = 0.5f;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
multiplier = 0.25f;
|
||||
break;
|
||||
default:
|
||||
multiplier = 0f;
|
||||
break;
|
||||
}
|
||||
|
||||
// Increased darkness in Death Mode
|
||||
if (CalamityWorld.death)
|
||||
multiplier += (1f - multiplier) * 0.1f;
|
||||
|
||||
// Total darkness
|
||||
float signusDarkness = signusLifeRatio * multiplier;
|
||||
|
||||
// Headcrab effect
|
||||
if (!modPlayer.ZoneAbyss && !player.headcovered)
|
||||
{
|
||||
float screenObstructionAmt = MathHelper.Clamp(signusDarkness, 0f, 0.63f);
|
||||
float targetValue = MathHelper.Clamp(screenObstructionAmt * 0.33f, 0.1f, 0.2f);
|
||||
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, screenObstructionAmt, targetValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Adjusts the life steal cap in rev/death
|
||||
float lifeStealCap = CalamityWorld.malice ? 30f : CalamityWorld.death ? 50f : 60f;
|
||||
/*if (Main.masterMode)
|
||||
@@ -4287,6 +4241,54 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Mouse Item Checks
|
||||
public static void CheckIfMouseItemIsSchematic(Player player)
|
||||
{
|
||||
if (Main.myPlayer != player.whoAmI)
|
||||
return;
|
||||
|
||||
bool shouldSync = false;
|
||||
|
||||
// ActiveItem doesn't need to be checked as the other possibility involves
|
||||
// the item in question already being in the inventory.
|
||||
if (Main.mouseItem != null && !Main.mouseItem.IsAir)
|
||||
{
|
||||
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicSunkenSea>() && !RecipeUnlockHandler.HasFoundSunkenSeaSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundSunkenSeaSchematic = true;
|
||||
shouldSync = true;
|
||||
}
|
||||
|
||||
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicPlanetoid>() && !RecipeUnlockHandler.HasFoundPlanetoidSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundPlanetoidSchematic = true;
|
||||
shouldSync = true;
|
||||
}
|
||||
|
||||
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicJungle>() && !RecipeUnlockHandler.HasFoundJungleSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundJungleSchematic = true;
|
||||
shouldSync = true;
|
||||
}
|
||||
|
||||
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicHell>() && !RecipeUnlockHandler.HasFoundHellSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundHellSchematic = true;
|
||||
shouldSync = true;
|
||||
}
|
||||
|
||||
if (Main.mouseItem.type == ModContent.ItemType<EncryptedSchematicIce>() && !RecipeUnlockHandler.HasFoundIceSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundIceSchematic = true;
|
||||
shouldSync = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldSync)
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Potion Handling
|
||||
private static void HandlePotions(Player player, CalamityPlayer modPlayer)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Wings;
|
||||
using CalamityMod.Items.Ammo.FiniteUse;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.DraedonMisc;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
@@ -76,7 +77,6 @@ namespace CalamityMod
|
||||
public class CalamityLists
|
||||
{
|
||||
public static IList<string> donatorList;
|
||||
public static List<int> trueMeleeProjectileList; // DO NOT, EVER, DELETE THIS LIST, OR I WILL COME FOR YOU :D
|
||||
public static List<int> rangedProjectileExceptionList;
|
||||
public static List<int> projectileDestroyExceptionList;
|
||||
public static List<int> projectileMinionList;
|
||||
@@ -163,6 +163,8 @@ namespace CalamityMod
|
||||
public static List<int> ZeroMinionSlotExceptionList;
|
||||
public static List<int> DontCopyOriginalMinionAIList;
|
||||
|
||||
public static Dictionary<int, int> EncryptedSchematicIDRelationship;
|
||||
|
||||
public static void LoadLists()
|
||||
{
|
||||
donatorList = new List<string>()
|
||||
@@ -512,73 +514,6 @@ namespace CalamityMod
|
||||
"James"
|
||||
};
|
||||
|
||||
trueMeleeProjectileList = new List<int>()
|
||||
{
|
||||
// Vanilla shit
|
||||
ProjectileID.Spear,
|
||||
ProjectileID.Trident,
|
||||
ProjectileID.TheRottedFork,
|
||||
ProjectileID.Swordfish,
|
||||
ProjectileID.Arkhalis,
|
||||
ProjectileID.DarkLance,
|
||||
ProjectileID.CobaltNaginata,
|
||||
ProjectileID.PalladiumPike,
|
||||
ProjectileID.MythrilHalberd,
|
||||
ProjectileID.OrichalcumHalberd,
|
||||
ProjectileID.AdamantiteGlaive,
|
||||
ProjectileID.TitaniumTrident,
|
||||
ProjectileID.MushroomSpear,
|
||||
ProjectileID.Gungnir,
|
||||
ProjectileID.ObsidianSwordfish,
|
||||
ProjectileID.MonkStaffT1,
|
||||
ProjectileID.MonkStaffT2,
|
||||
|
||||
// Tools
|
||||
ProjectileID.CobaltDrill,
|
||||
ProjectileID.MythrilDrill,
|
||||
ProjectileID.AdamantiteDrill,
|
||||
ProjectileID.PalladiumDrill,
|
||||
ProjectileID.OrichalcumDrill,
|
||||
ProjectileID.TitaniumDrill,
|
||||
ProjectileID.ChlorophyteDrill,
|
||||
ProjectileID.CobaltChainsaw,
|
||||
ProjectileID.MythrilChainsaw,
|
||||
ProjectileID.AdamantiteChainsaw,
|
||||
ProjectileID.PalladiumChainsaw,
|
||||
ProjectileID.OrichalcumChainsaw,
|
||||
ProjectileID.TitaniumChainsaw,
|
||||
ProjectileID.ChlorophyteChainsaw,
|
||||
ProjectileID.VortexDrill,
|
||||
ProjectileID.VortexChainsaw,
|
||||
ProjectileID.NebulaDrill,
|
||||
ProjectileID.NebulaChainsaw,
|
||||
ProjectileID.SolarFlareDrill,
|
||||
ProjectileID.SolarFlareChainsaw,
|
||||
ProjectileID.StardustDrill,
|
||||
ProjectileID.StardustChainsaw,
|
||||
ProjectileID.Hamdrax,
|
||||
ProjectileID.ChlorophyteJackhammer,
|
||||
ProjectileID.SawtoothShark,
|
||||
ProjectileID.ButchersChainsaw,
|
||||
|
||||
// Calamity shit
|
||||
ProjectileType<DevilsSunriseProj>(),
|
||||
ProjectileType<MarniteObliteratorProj>(),
|
||||
ProjectileType<MurasamaSlash>(),
|
||||
ProjectileType<AstralPikeProj>(),
|
||||
ProjectileType<BrimlanceProj>(),
|
||||
ProjectileType<DiseasedPikeSpear>(),
|
||||
ProjectileType<ExsanguinationLanceProjectile>(),
|
||||
ProjectileType<FulgurationHalberdProj>(),
|
||||
ProjectileType<GildedProboscisProj>(),
|
||||
ProjectileType<MarniteSpearProjectile>(),
|
||||
ProjectileType<SausageMakerSpear>(),
|
||||
ProjectileType<YateveoBloomSpear>(),
|
||||
ProjectileType<HydraulicVoltCrasherProjectile>(),
|
||||
ProjectileType<DragonRageStaff>(),
|
||||
ProjectileType<TaintedBladeSlasher>()
|
||||
};
|
||||
|
||||
rangedProjectileExceptionList = new List<int>()
|
||||
{
|
||||
ProjectileID.Phantasm,
|
||||
@@ -2942,12 +2877,19 @@ namespace CalamityMod
|
||||
{
|
||||
ProjectileType<GammaHead>()
|
||||
};
|
||||
|
||||
EncryptedSchematicIDRelationship = new Dictionary<int, int>()
|
||||
{
|
||||
[1] = ItemType<EncryptedSchematicPlanetoid>(),
|
||||
[2] = ItemType<EncryptedSchematicJungle>(),
|
||||
[3] = ItemType<EncryptedSchematicHell>(),
|
||||
[4] = ItemType<EncryptedSchematicIce>(),
|
||||
};
|
||||
}
|
||||
|
||||
public static void UnloadLists()
|
||||
{
|
||||
donatorList = null;
|
||||
trueMeleeProjectileList = null;
|
||||
rangedProjectileExceptionList = null;
|
||||
projectileDestroyExceptionList = null;
|
||||
projectileMinionList = null;
|
||||
@@ -3033,6 +2975,8 @@ namespace CalamityMod
|
||||
MinionsToNotResurrectList = null;
|
||||
ZeroMinionSlotExceptionList = null;
|
||||
DontCopyOriginalMinionAIList = null;
|
||||
|
||||
EncryptedSchematicIDRelationship = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -973,6 +973,13 @@ namespace CalamityMod
|
||||
CalamitasEnchantUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Codebreaker UI.
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Codebreaker Decryption GUI", () =>
|
||||
{
|
||||
CodebreakerUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Popup GUIs.
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Popup GUIs", () =>
|
||||
@@ -980,6 +987,14 @@ namespace CalamityMod
|
||||
PopupGUIManager.UpdateAndDraw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
// Exo Mech selection.
|
||||
layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Exo Mech Selection", () =>
|
||||
{
|
||||
if (Main.LocalPlayer.Calamity().AbleToSelectExoMech)
|
||||
ExoMechSelectionUI.Draw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
}
|
||||
|
||||
// Invasion UIs.
|
||||
|
||||
@@ -184,6 +184,15 @@ namespace CalamityMod
|
||||
case CalamityModMessageType.LabHologramProjector:
|
||||
TELabHologramProjector.ReadSyncPacket(mod, reader);
|
||||
break;
|
||||
case CalamityModMessageType.UpdateCodebreakerConstituents:
|
||||
TECodebreaker.ReadConstituentsUpdateSync(mod, reader);
|
||||
break;
|
||||
case CalamityModMessageType.UpdateCodebreakerContainedStuff:
|
||||
TECodebreaker.ReadContainmentSync(mod, reader);
|
||||
break;
|
||||
case CalamityModMessageType.UpdateCodebreakerDecryptCountdown:
|
||||
TECodebreaker.ReadDecryptCountdownSync(mod, reader);
|
||||
break;
|
||||
|
||||
//
|
||||
// Boss Rush
|
||||
@@ -346,6 +355,9 @@ namespace CalamityMod
|
||||
ChargingStationItemChange,
|
||||
Turret,
|
||||
LabHologramProjector,
|
||||
UpdateCodebreakerConstituents,
|
||||
UpdateCodebreakerContainedStuff,
|
||||
UpdateCodebreakerDecryptCountdown,
|
||||
|
||||
// Boss Rush
|
||||
BossRushStage,
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
using CalamityMod.World;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CustomRecipes
|
||||
{
|
||||
public class ArsenalTierGatedRecipe : ModRecipe
|
||||
{
|
||||
public int Tier;
|
||||
public bool AllowedInOldWorlds;
|
||||
public ArsenalTierGatedRecipe(Mod mod, int tier, bool allowedInOldWorlds = false) : base(mod)
|
||||
{
|
||||
Tier = tier;
|
||||
AllowedInOldWorlds = allowedInOldWorlds;
|
||||
}
|
||||
|
||||
public static bool HasTierBeenLearned(int tier)
|
||||
{
|
||||
switch (tier)
|
||||
{
|
||||
case 1:
|
||||
return RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes;
|
||||
case 2:
|
||||
return RecipeUnlockHandler.HasUnlockedT2ArsenalRecipes;
|
||||
case 3:
|
||||
return RecipeUnlockHandler.HasUnlockedT3ArsenalRecipes;
|
||||
case 4:
|
||||
return RecipeUnlockHandler.HasUnlockedT4ArsenalRecipes;
|
||||
case 5:
|
||||
return RecipeUnlockHandler.HasUnlockedT5ArsenalRecipes;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool RecipeAvailable()
|
||||
{
|
||||
if (AllowedInOldWorlds && !CalamityWorld.IsWorldAfterDraedonUpdate)
|
||||
return true;
|
||||
|
||||
switch (Tier)
|
||||
{
|
||||
case 1:
|
||||
return RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes;
|
||||
case 2:
|
||||
return RecipeUnlockHandler.HasUnlockedT2ArsenalRecipes;
|
||||
case 3:
|
||||
return RecipeUnlockHandler.HasUnlockedT3ArsenalRecipes;
|
||||
case 4:
|
||||
return RecipeUnlockHandler.HasUnlockedT4ArsenalRecipes;
|
||||
case 5:
|
||||
return RecipeUnlockHandler.HasUnlockedT5ArsenalRecipes;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
|
||||
namespace CalamityMod.CustomRecipes
|
||||
{
|
||||
public static class RecipeUnlockHandler
|
||||
{
|
||||
public static bool HasUnlockedT1ArsenalRecipes = false;
|
||||
public static bool HasUnlockedT2ArsenalRecipes = false;
|
||||
public static bool HasUnlockedT3ArsenalRecipes = false;
|
||||
public static bool HasUnlockedT4ArsenalRecipes = false;
|
||||
public static bool HasUnlockedT5ArsenalRecipes = false;
|
||||
|
||||
public static bool HasFoundSunkenSeaSchematic = false;
|
||||
public static bool HasFoundPlanetoidSchematic = false;
|
||||
public static bool HasFoundJungleSchematic = false;
|
||||
public static bool HasFoundHellSchematic = false;
|
||||
public static bool HasFoundIceSchematic = false;
|
||||
|
||||
public static void Save(List<string> boolTagContainer)
|
||||
{
|
||||
boolTagContainer.AddWithCondition("HasUnlockedT1ArsenalRecipes", HasUnlockedT1ArsenalRecipes);
|
||||
boolTagContainer.AddWithCondition("HasUnlockedT2ArsenalRecipes", HasUnlockedT2ArsenalRecipes);
|
||||
boolTagContainer.AddWithCondition("HasUnlockedT3ArsenalRecipes", HasUnlockedT3ArsenalRecipes);
|
||||
boolTagContainer.AddWithCondition("HasUnlockedT4ArsenalRecipes", HasUnlockedT4ArsenalRecipes);
|
||||
boolTagContainer.AddWithCondition("HasUnlockedT5ArsenalRecipes", HasUnlockedT5ArsenalRecipes);
|
||||
|
||||
boolTagContainer.AddWithCondition("HasFoundSunkenSeaSchematic", HasFoundSunkenSeaSchematic);
|
||||
boolTagContainer.AddWithCondition("HasFoundPlanetoidSchematic", HasFoundPlanetoidSchematic);
|
||||
boolTagContainer.AddWithCondition("HasFoundJungleSchematic", HasFoundJungleSchematic);
|
||||
boolTagContainer.AddWithCondition("HasFoundHellSchematic", HasFoundHellSchematic);
|
||||
boolTagContainer.AddWithCondition("HasFoundIceSchematic", HasFoundIceSchematic);
|
||||
|
||||
HasUnlockedT1ArsenalRecipes = false;
|
||||
HasUnlockedT2ArsenalRecipes = false;
|
||||
HasUnlockedT3ArsenalRecipes = false;
|
||||
HasUnlockedT4ArsenalRecipes = false;
|
||||
HasUnlockedT5ArsenalRecipes = false;
|
||||
|
||||
HasFoundSunkenSeaSchematic = false;
|
||||
HasFoundPlanetoidSchematic = false;
|
||||
HasFoundJungleSchematic = false;
|
||||
HasFoundHellSchematic = false;
|
||||
HasFoundIceSchematic = false;
|
||||
}
|
||||
|
||||
public static void Load(IList<string> boolTagContainer)
|
||||
{
|
||||
HasUnlockedT1ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT1ArsenalRecipes");
|
||||
HasUnlockedT2ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT2ArsenalRecipes");
|
||||
HasUnlockedT3ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT3ArsenalRecipes");
|
||||
HasUnlockedT4ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT4ArsenalRecipes");
|
||||
HasUnlockedT5ArsenalRecipes = boolTagContainer.Contains("HasUnlockedT5ArsenalRecipes");
|
||||
|
||||
HasFoundSunkenSeaSchematic = boolTagContainer.Contains("HasFoundSunkenSeaSchematic");
|
||||
HasFoundPlanetoidSchematic = boolTagContainer.Contains("HasFoundPlanetoidSchematic");
|
||||
HasFoundJungleSchematic = boolTagContainer.Contains("HasFoundJungleSchematic");
|
||||
HasFoundHellSchematic = boolTagContainer.Contains("HasFoundHellSchematic");
|
||||
HasFoundIceSchematic = boolTagContainer.Contains("HasFoundIceSchematic");
|
||||
}
|
||||
|
||||
public static void SendData(BinaryWriter writer)
|
||||
{
|
||||
BitsByte flags = new BitsByte();
|
||||
flags[0] = HasUnlockedT1ArsenalRecipes;
|
||||
flags[1] = HasUnlockedT2ArsenalRecipes;
|
||||
flags[2] = HasUnlockedT3ArsenalRecipes;
|
||||
flags[3] = HasUnlockedT4ArsenalRecipes;
|
||||
flags[4] = HasUnlockedT5ArsenalRecipes;
|
||||
flags[5] = HasFoundSunkenSeaSchematic;
|
||||
flags[6] = HasFoundPlanetoidSchematic;
|
||||
flags[7] = HasFoundJungleSchematic;
|
||||
|
||||
BitsByte flags2 = new BitsByte();
|
||||
flags2[0] = HasFoundHellSchematic;
|
||||
flags2[1] = HasFoundIceSchematic;
|
||||
|
||||
writer.Write(flags);
|
||||
writer.Write(flags2);
|
||||
}
|
||||
|
||||
public static void ReceiveData(BinaryReader reader)
|
||||
{
|
||||
BitsByte flags = reader.ReadByte();
|
||||
HasUnlockedT1ArsenalRecipes = flags[0];
|
||||
HasUnlockedT2ArsenalRecipes = flags[1];
|
||||
HasUnlockedT3ArsenalRecipes = flags[2];
|
||||
HasUnlockedT4ArsenalRecipes = flags[3];
|
||||
HasUnlockedT5ArsenalRecipes = flags[4];
|
||||
HasFoundSunkenSeaSchematic = flags[5];
|
||||
HasFoundPlanetoidSchematic = flags[6];
|
||||
HasFoundJungleSchematic = flags[7];
|
||||
|
||||
BitsByte flags2 = reader.ReadByte();
|
||||
HasFoundHellSchematic = flags2[0];
|
||||
HasFoundIceSchematic = flags2[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.World;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CustomRecipes
|
||||
{
|
||||
public class SchematicRecipe : ModRecipe
|
||||
{
|
||||
public string SchematicName;
|
||||
public SchematicRecipe(Mod mod, string schematicName) : base(mod) => SchematicName = schematicName;
|
||||
|
||||
public override bool RecipeAvailable()
|
||||
{
|
||||
// Allow old worlds to craft the new schematics; They don't exist in old worlds
|
||||
if (!CalamityWorld.IsWorldAfterDraedonUpdate)
|
||||
return true;
|
||||
|
||||
switch (SchematicName)
|
||||
{
|
||||
case "Sunken Sea":
|
||||
return RecipeUnlockHandler.HasFoundSunkenSeaSchematic;
|
||||
case "Planetoid":
|
||||
return RecipeUnlockHandler.HasFoundPlanetoidSchematic;
|
||||
case "Jungle":
|
||||
return RecipeUnlockHandler.HasFoundJungleSchematic;
|
||||
case "Hell":
|
||||
return RecipeUnlockHandler.HasFoundHellSchematic;
|
||||
case "Ice":
|
||||
return RecipeUnlockHandler.HasFoundIceSchematic;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,11 @@ namespace CalamityMod.Effects
|
||||
public static Effect LightShader;
|
||||
public static Effect SCalMouseShader;
|
||||
public static Effect TentacleShader;
|
||||
public static Effect TeleportDisplacementShader;
|
||||
public static Effect LightDistortionShader;
|
||||
public static Effect PhaseslayerRipShader;
|
||||
public static Effect FadedUVMapStreakShader;
|
||||
public static Effect FlameStreakShader;
|
||||
public static Effect FadingSolidTrailShader;
|
||||
public static Effect ScarletDevilShader;
|
||||
public static Effect BordernadoFireShader;
|
||||
@@ -32,6 +34,7 @@ namespace CalamityMod.Effects
|
||||
AstralFogShader = CalamityMod.Instance.GetEffect("Effects/CustomShader");
|
||||
LightShader = CalamityMod.Instance.GetEffect("Effects/LightBurstShader");
|
||||
TentacleShader = CalamityMod.Instance.GetEffect("Effects/TentacleShader");
|
||||
TeleportDisplacementShader = CalamityMod.Instance.GetEffect("Effects/TeleportDisplacementShader");
|
||||
SCalMouseShader = CalamityMod.Instance.GetEffect("Effects/SCalMouseShader");
|
||||
LightDistortionShader = CalamityMod.Instance.GetEffect("Effects/DistortionShader");
|
||||
PhaseslayerRipShader = CalamityMod.Instance.GetEffect("Effects/PhaseslayerRipShader");
|
||||
@@ -39,6 +42,7 @@ namespace CalamityMod.Effects
|
||||
BordernadoFireShader = CalamityMod.Instance.GetEffect("Effects/BordernadoFire");
|
||||
PrismCrystalShader = CalamityMod.Instance.GetEffect("Effects/PrismCrystalStreak");
|
||||
FadedUVMapStreakShader = CalamityMod.Instance.GetEffect("Effects/FadedUVMapStreak");
|
||||
FlameStreakShader = CalamityMod.Instance.GetEffect("Effects/Flame");
|
||||
FadingSolidTrailShader = CalamityMod.Instance.GetEffect("Effects/FadingSolidTrail");
|
||||
ImpFlameTrailShader = CalamityMod.Instance.GetEffect("Effects/ImpFlameTrail");
|
||||
SCalShieldShader = CalamityMod.Instance.GetEffect("Effects/SupremeShieldShader");
|
||||
@@ -52,9 +56,11 @@ namespace CalamityMod.Effects
|
||||
|
||||
GameShaders.Misc["CalamityMod:FireMouse"] = new MiscShaderData(new Ref<Effect>(SCalMouseShader), "DyePass");
|
||||
GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref<Effect>(TentacleShader), "BurstPass");
|
||||
GameShaders.Misc["CalamityMod:TeleportDisplacement"] = new MiscShaderData(new Ref<Effect>(TeleportDisplacementShader), "GlitchPass");
|
||||
GameShaders.Misc["CalamityMod:LightDistortion"] = new MiscShaderData(new Ref<Effect>(LightDistortionShader), "DistortionPass");
|
||||
GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"] = new MiscShaderData(new Ref<Effect>(PhaseslayerRipShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:TrailStreak"] = new MiscShaderData(new Ref<Effect>(FadedUVMapStreakShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:Flame"] = new MiscShaderData(new Ref<Effect>(FlameStreakShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:FadingSolidTrail"] = new MiscShaderData(new Ref<Effect>(FadingSolidTrailShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"] = new MiscShaderData(new Ref<Effect>(ScarletDevilShader), "TrailPass");
|
||||
GameShaders.Misc["CalamityMod:Bordernado"] = new MiscShaderData(new Ref<Effect>(BordernadoFireShader), "TrailPass");
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
|
||||
// Read the fade map as a streak.
|
||||
float4 fadeMapColor = tex2D(uImage1, float2(frac(coords.y + cos(uTime) * 0.01), frac(coords.x - uTime * 1.4 * uSaturation)));
|
||||
fadeMapColor.r *= pow(coords.x, 0.2);
|
||||
|
||||
float opacity = lerp(1.45, 1.95, fadeMapColor.r) * color.a;
|
||||
opacity *= pow(sin(coords.y * 3.141), lerp(1, 6, pow(coords.x, 2)));
|
||||
opacity *= pow(sin(coords.x * 3.141), 0.4);
|
||||
opacity *= fadeMapColor.r * 1.5 + 1;
|
||||
opacity *= lerp(0.4, 0.9, fadeMapColor.r);
|
||||
|
||||
float3 transformColor = lerp(float3(1, 205 / 255.0, 119 / 255.0), float3(1, 76 / 255.0, 79 / 255.0), fadeMapColor.r);
|
||||
color.rgb = lerp(color.rgb, transformColor, fadeMapColor.r);
|
||||
return color * opacity * 1.6;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
float2 frameCount;
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float frameY = coords.y * frameCount.y;
|
||||
|
||||
// 17.07947 is 2pi * e, while 25.13274 is 8pi.
|
||||
// When two sinusoids are added in this way and the periods of each sinusoid are irrational,
|
||||
// the resulting sinusoid from the addition has no period, meaning that it has pseudo-random
|
||||
// bumps and valleys. This is ideal for a glitch effect. The * 0.5 at the end is make the range
|
||||
// of the result be -1 to 1 like a typical sine.
|
||||
float offsetBase = (sin(frameY * 17.07947 + uTime * 16) + sin(coords.y * 25.13274)) * 0.5;
|
||||
|
||||
// Here, a power is used to make the valleys and hills sharper, and bias everything else
|
||||
// towards 0, making horizontal stretches more noticable and powerful when they happen.
|
||||
// Higher values of uOpacity will result in more powerful offsets, with a uOpacity of 0
|
||||
// doing nothing at all.
|
||||
float horizontalOffset = pow(offsetBase, 3) * uOpacity / frameCount.x * 0.46;
|
||||
float2 samplePosition = float2(saturate(coords.x + horizontalOffset), coords.y);
|
||||
return tex2D(uImage0, samplePosition) * float4(uSecondaryColor, uSaturation);
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass GlitchPass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace CalamityMod
|
||||
{
|
||||
public enum ExoMech
|
||||
{
|
||||
None,
|
||||
Destroyer,
|
||||
Prime,
|
||||
Twins
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 620 B |
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 422 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 530 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 297 B |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 306 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 541 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 227 B |
@@ -2,6 +2,9 @@ using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.Ravager;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
@@ -111,6 +114,7 @@ namespace CalamityMod.ILEditing
|
||||
aLabDoorClosed = ModContent.TileType<AgedLaboratoryDoorClosed>();
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision += AllowTriggeredFallthrough;
|
||||
IL.Terraria.Main.UpdateTime += PermitNighttimeTownNPCSpawning;
|
||||
On.Terraria.Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate;
|
||||
IL.Terraria.Player.Hurt += RemoveRNGFromBlackBelt;
|
||||
@@ -127,6 +131,9 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.Player.AddBuff += AllowBuffTimeStackingForManaBurn;
|
||||
IL.Terraria.Main.DoDraw += DrawFusableParticles;
|
||||
|
||||
// Ravager platform fall fix
|
||||
On.Terraria.NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision;
|
||||
|
||||
// Damage and health balance
|
||||
IL.Terraria.Main.DamageVar += AdjustDamageVariance;
|
||||
IL.Terraria.NPC.scaleStats += RemoveExpertHardmodeScaling;
|
||||
@@ -164,6 +171,7 @@ namespace CalamityMod.ILEditing
|
||||
labDoorOpen = labDoorClosed = aLabDoorOpen = aLabDoorClosed = -1;
|
||||
|
||||
// Mechanics / features
|
||||
On.Terraria.NPC.ApplyTileCollision -= AllowTriggeredFallthrough;
|
||||
IL.Terraria.Main.UpdateTime -= PermitNighttimeTownNPCSpawning;
|
||||
On.Terraria.Main.UpdateTime_SpawnTownNPCs -= AlterTownNPCSpawnRate;
|
||||
IL.Terraria.Player.Hurt -= RemoveRNGFromBlackBelt;
|
||||
@@ -212,6 +220,15 @@ namespace CalamityMod.ILEditing
|
||||
#region IL Editing Routines and Injections
|
||||
|
||||
#region Mechanics / features
|
||||
|
||||
// Why this isn't a mechanism provided by TML itself or vanilla itself is beyond me.
|
||||
private static void AllowTriggeredFallthrough(On.Terraria.NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight)
|
||||
{
|
||||
if (self.active && self.Calamity().ShouldFallThroughPlatforms)
|
||||
fall = true;
|
||||
orig(self, fall, cPosition, cWidth, cHeight);
|
||||
}
|
||||
|
||||
private static void PermitNighttimeTownNPCSpawning(ILContext il)
|
||||
{
|
||||
// Don't do town NPC spawning at the end (which lies after a !Main.dayTime return).
|
||||
@@ -326,6 +343,15 @@ namespace CalamityMod.ILEditing
|
||||
return orig(i, j, forced);
|
||||
}
|
||||
|
||||
private static bool EnableCalamityBossPlatformCollision(On.Terraria.NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
|
||||
{
|
||||
if ((self.type == ModContent.NPCType<AstrumAureus>() || self.type == ModContent.NPCType<CrabulonIdle>() || self.type == ModContent.NPCType<RavagerBody>()) &&
|
||||
self.target >= 0 && Main.player[self.target].position.Y > self.position.Y + self.height)
|
||||
return true;
|
||||
|
||||
return orig(self);
|
||||
}
|
||||
|
||||
private static void DisableTeleporters(On.Terraria.Wiring.orig_Teleport orig)
|
||||
{
|
||||
if (CalamityPlayer.areThereAnyDamnBosses)
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DarkSunRing : ModItem
|
||||
public class DarkSunRing : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Dark Sun Ring");
|
||||
Tooltip.SetDefault("Contains the power of the dark sun\n" +
|
||||
"12% increase to damage and melee speed\n" +
|
||||
"12% increase to damage and melee speed\n" +
|
||||
"+1 life regen, 15% increased pick speed and +2 max minions\n" +
|
||||
"Increased minion knockback\n" +
|
||||
"During the day the player has +3 life regen\n" +
|
||||
"During the night the player has +15 defense\n" +
|
||||
"Both of these bonuses are granted during an eclipse");
|
||||
"Both of these bonuses are granted during an eclipse");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 7));
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ namespace CalamityMod.Items.Accessories
|
||||
item.width = 54;
|
||||
item.height = 58;
|
||||
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.defense = 10;
|
||||
item.lifeRegen = 1;
|
||||
item.accessory = true;
|
||||
@@ -44,8 +45,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 50);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 20);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -14,19 +14,19 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Dimensional Soul Artifact");
|
||||
Tooltip.SetDefault("Power\n" +
|
||||
"Boosts all damage by 25%, but at what cost?\n" +
|
||||
"Boosts all damage by 25%, but at what cost?\n" +
|
||||
"Increases all damage taken by 15%");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.accessory = true;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
}
|
||||
item.width = 28;
|
||||
item.height = 28;
|
||||
item.accessory = true;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
@@ -37,10 +37,10 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<Elumplate>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<Elumplate>(), 25);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -52,8 +53,8 @@ namespace CalamityMod.Items.Accessories
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<AbyssalMirror>());
|
||||
recipe.AddIngredient(ModContent.ItemType<DarkGodsSheath>());
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 10);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 20);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
@@ -20,14 +21,14 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
"Acceleration multiplier: 2.8\n" +
|
||||
"Excellent vertical speed\n" +
|
||||
"Flight time: 270\n" +
|
||||
"The Silva revive heals you to half health while wearing the Silva armor");
|
||||
"The Silva revive heals you to half health while wearing the Silva armor");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 22;
|
||||
item.height = 20;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
item.accessory = true;
|
||||
@@ -83,7 +84,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 5);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -103,8 +103,9 @@ This extra damage reduction ignores the soft cap";
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SpookyHelmet);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 8);
|
||||
recipe.AddIngredient(ItemID.SoulofFright, 8);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -39,8 +39,9 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SpookyLeggings);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 10);
|
||||
recipe.AddIngredient(ItemID.SoulofFright, 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -37,8 +37,9 @@ namespace CalamityMod.Items.Armor
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SpookyBreastplate);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 12);
|
||||
recipe.AddIngredient(ItemID.SoulofFright, 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 3);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -2,6 +2,7 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor
|
||||
DisplayName.SetDefault("Silva Armor");
|
||||
Tooltip.SetDefault("+80 max life\n" +
|
||||
"12% increased damage and 8% increased critical strike chance\n" +
|
||||
"Grants immunity to the irradiated debuff");
|
||||
"Grants immunity to the irradiated debuff");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -25,7 +26,7 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 24;
|
||||
item.value = Item.buyPrice(0, 72, 0, 0);
|
||||
item.defense = 44;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
@@ -43,9 +44,9 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 10);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<LeadCore>());
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -23,9 +24,9 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 24;
|
||||
item.value = Item.buyPrice(0, 90, 0, 0);
|
||||
item.defense = 13; //110
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
@@ -60,8 +61,8 @@ namespace CalamityMod.Items.Armor
|
||||
}
|
||||
}
|
||||
player.minionDamage += 0.75f;
|
||||
player.maxMinions += 5;
|
||||
}
|
||||
player.maxMinions += 5;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
@@ -69,8 +70,8 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 5);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 6);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 5);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 7);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 7);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 9);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 7);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -23,9 +24,9 @@ namespace CalamityMod.Items.Armor
|
||||
item.height = 22;
|
||||
item.value = Item.buyPrice(0, 90, 0, 0);
|
||||
item.defense = 21; //110
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override bool IsArmorSet(Item head, Item body, Item legs)
|
||||
{
|
||||
@@ -63,8 +64,8 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 5);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 6);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 5);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 2);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -80,18 +80,7 @@ namespace CalamityMod.Items
|
||||
public bool devItem = false;
|
||||
public bool challengeDrop = false;
|
||||
public bool canFirePointBlankShots = false;
|
||||
|
||||
public static readonly Color[] ExoPalette = new Color[]
|
||||
{
|
||||
new Color(250, 255, 112),
|
||||
new Color(211, 235, 108),
|
||||
new Color(166, 240, 105),
|
||||
new Color(105, 240, 220),
|
||||
new Color(64, 130, 145),
|
||||
new Color(145, 96, 145),
|
||||
new Color(242, 112, 73),
|
||||
new Color(199, 62, 62),
|
||||
};
|
||||
public bool trueMelee = false;
|
||||
|
||||
public static readonly Color ExhumedTooltipColor = new Color(198, 27, 64);
|
||||
|
||||
@@ -218,6 +207,42 @@ namespace CalamityMod.Items
|
||||
canFirePointBlankShots = true;
|
||||
break;
|
||||
|
||||
// Set projectile true melee items to be true melee, this is so bosses know when the player is using a true melee projectile weapon
|
||||
case ItemID.Spear:
|
||||
case ItemID.Trident:
|
||||
case ItemID.PalladiumPike:
|
||||
case ItemID.ObsidianSwordfish:
|
||||
case ItemID.CobaltDrill:
|
||||
case ItemID.MythrilDrill:
|
||||
case ItemID.AdamantiteDrill:
|
||||
case ItemID.PalladiumDrill:
|
||||
case ItemID.OrichalcumDrill:
|
||||
case ItemID.TitaniumDrill:
|
||||
case ItemID.ChlorophyteDrill:
|
||||
case ItemID.CobaltChainsaw:
|
||||
case ItemID.MythrilChainsaw:
|
||||
case ItemID.AdamantiteChainsaw:
|
||||
case ItemID.PalladiumChainsaw:
|
||||
case ItemID.OrichalcumChainsaw:
|
||||
case ItemID.TitaniumChainsaw:
|
||||
case ItemID.ChlorophyteChainsaw:
|
||||
case ItemID.VortexDrill:
|
||||
case ItemID.VortexChainsaw:
|
||||
case ItemID.NebulaDrill:
|
||||
case ItemID.NebulaChainsaw:
|
||||
case ItemID.SolarFlareDrill:
|
||||
case ItemID.SolarFlareChainsaw:
|
||||
case ItemID.StardustDrill:
|
||||
case ItemID.StardustChainsaw:
|
||||
case ItemID.Drax:
|
||||
case ItemID.ChlorophyteJackhammer:
|
||||
case ItemID.SawtoothShark:
|
||||
case ItemID.Arkhalis:
|
||||
case ItemID.ButchersChainsaw:
|
||||
case ItemID.MonkStaffT2:
|
||||
trueMelee = true;
|
||||
break;
|
||||
|
||||
case ItemID.Dynamite:
|
||||
case ItemID.StickyDynamite:
|
||||
case ItemID.BouncyDynamite:
|
||||
@@ -327,6 +352,7 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
|
||||
case ItemID.AdamantiteGlaive:
|
||||
trueMelee = true;
|
||||
item.damage = 65;
|
||||
item.shootSpeed *= 1.25f;
|
||||
break;
|
||||
@@ -336,25 +362,30 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
|
||||
case ItemID.CobaltNaginata:
|
||||
trueMelee = true;
|
||||
item.damage = 90;
|
||||
break;
|
||||
|
||||
case ItemID.Gungnir:
|
||||
trueMelee = true;
|
||||
item.damage = 92;
|
||||
item.shootSpeed *= 1.25f;
|
||||
break;
|
||||
|
||||
case ItemID.MythrilHalberd:
|
||||
trueMelee = true;
|
||||
item.damage = 95;
|
||||
item.shootSpeed *= 1.25f;
|
||||
break;
|
||||
|
||||
case ItemID.OrichalcumHalberd:
|
||||
trueMelee = true;
|
||||
item.damage = 98;
|
||||
item.shootSpeed *= 1.25f;
|
||||
break;
|
||||
|
||||
case ItemID.TitaniumTrident:
|
||||
trueMelee = true;
|
||||
item.damage = 72;
|
||||
item.shootSpeed *= 1.25f;
|
||||
break;
|
||||
@@ -364,18 +395,22 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
|
||||
case ItemID.TheRottedFork:
|
||||
trueMelee = true;
|
||||
item.damage = 20;
|
||||
break;
|
||||
|
||||
case ItemID.Swordfish:
|
||||
trueMelee = true;
|
||||
item.damage = 38;
|
||||
break;
|
||||
|
||||
case ItemID.DarkLance:
|
||||
trueMelee = true;
|
||||
item.damage = 68;
|
||||
break;
|
||||
|
||||
case ItemID.MushroomSpear:
|
||||
trueMelee = true;
|
||||
item.damage = 100;
|
||||
break;
|
||||
|
||||
@@ -421,6 +456,7 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
|
||||
case ItemID.MonkStaffT1:
|
||||
trueMelee = true;
|
||||
item.damage = 110;
|
||||
break;
|
||||
|
||||
@@ -833,7 +869,7 @@ namespace CalamityMod.Items
|
||||
#region SavingAndLoading
|
||||
public override bool NeedsSaving(Item item)
|
||||
{
|
||||
return rogue || canFirePointBlankShots || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
|
||||
return rogue || canFirePointBlankShots || trueMelee || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0;
|
||||
}
|
||||
|
||||
public override TagCompound Save(Item item)
|
||||
@@ -847,7 +883,8 @@ namespace CalamityMod.Items
|
||||
["reforgeTier"] = reforgeTier,
|
||||
["enchantmentID"] = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0,
|
||||
["DischargeEnchantExhaustion"] = DischargeEnchantExhaustion,
|
||||
["canFirePointBlankShots"] = canFirePointBlankShots
|
||||
["canFirePointBlankShots"] = canFirePointBlankShots,
|
||||
["trueMelee"] = trueMelee
|
||||
};
|
||||
}
|
||||
|
||||
@@ -855,6 +892,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
rogue = tag.GetBool("rogue");
|
||||
canFirePointBlankShots = tag.GetBool("canFirePointBlankShots");
|
||||
trueMelee = tag.GetBool("trueMelee");
|
||||
timesUsed = tag.GetInt("timesUsed");
|
||||
customRarity = (CalamityRarity)tag.GetInt("rarity");
|
||||
|
||||
@@ -888,6 +926,7 @@ namespace CalamityMod.Items
|
||||
BitsByte flags = reader.ReadByte();
|
||||
rogue = flags[0];
|
||||
canFirePointBlankShots = flags[1];
|
||||
trueMelee = flags[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -900,6 +939,7 @@ namespace CalamityMod.Items
|
||||
BitsByte flags = new BitsByte();
|
||||
flags[0] = rogue;
|
||||
flags[1] = canFirePointBlankShots;
|
||||
flags[2] = trueMelee;
|
||||
|
||||
writer.Write(flags);
|
||||
writer.Write((int)customRarity);
|
||||
@@ -915,6 +955,7 @@ namespace CalamityMod.Items
|
||||
BitsByte flags = reader.ReadByte();
|
||||
rogue = flags[0];
|
||||
canFirePointBlankShots = flags[1];
|
||||
trueMelee = flags[2];
|
||||
|
||||
customRarity = (CalamityRarity)reader.ReadInt32();
|
||||
timesUsed = reader.ReadInt32();
|
||||
@@ -1161,7 +1202,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// If you have enough charge, decrement charge on the spot because this hook runs exactly once every time you use an item.
|
||||
// Mana has to be checked separately or you'll fail to use the weapon on a mana check later and still have consumed charge.
|
||||
if (player.CheckMana(item))
|
||||
if (player.CheckMana(item) && item.modItem.CanUseItem(player))
|
||||
Charge -= chargeNeeded;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.Placeables.Furniture.Fountains;
|
||||
@@ -32,8 +33,8 @@ namespace CalamityMod.Items
|
||||
if (nameLine != null)
|
||||
ApplyRarityColor(item, nameLine);
|
||||
|
||||
// If the item is melee, add a true melee damage number adjacent to the standard damage number.
|
||||
if (item.melee && item.damage > 0 && Main.LocalPlayer.Calamity().trueMeleeDamage > 0D)
|
||||
// If the item is true melee, add a true melee damage number adjacent to the standard damage number.
|
||||
if (item.melee && (item.shoot == ProjectileID.None || trueMelee) && item.damage > 0 && Main.LocalPlayer.Calamity().trueMeleeDamage > 0D)
|
||||
TrueMeleeDamageTooltip(item, tooltips);
|
||||
|
||||
// Modify all vanilla tooltips before appending mod mechanics (if any).
|
||||
@@ -1078,6 +1079,19 @@ namespace CalamityMod.Items
|
||||
tooltips.Add(line);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Schematic Knowledge Tooltip Utility
|
||||
public static void InsertKnowledgeTooltip(List<TooltipLine> tooltips, int tier, bool allowOldWorlds = false)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(CalamityMod.Instance, "SchematicKnowledge1", "You don't have sufficient knowledge to create this yet");
|
||||
TooltipLine line2 = new TooltipLine(CalamityMod.Instance, "SchematicKnowledge2", "A specific schematic must be deciphered first");
|
||||
line.overrideColor = line2.overrideColor = Color.Cyan;
|
||||
|
||||
bool allowedDueToOldWorld = allowOldWorlds && CalamityWorld.IsWorldAfterDraedonUpdate;
|
||||
tooltips.AddWithCondition(line, !ArsenalTierGatedRecipe.HasTierBeenLearned(tier) && !allowedDueToOldWorld);
|
||||
tooltips.AddWithCondition(line2, !ArsenalTierGatedRecipe.HasTierBeenLearned(tier) && !allowedDueToOldWorld);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class AdvancedDisplay : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Advanced Display");
|
||||
Tooltip.SetDefault("Can be placed on the Codebreaker");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 52;
|
||||
item.height = 52;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.rare = ItemRarityID.Yellow;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player) => true;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override bool ConsumeItem(Player player)
|
||||
{
|
||||
Point placeTileCoords = Main.MouseWorld.ToTileCoordinates();
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placeTileCoords.X, placeTileCoords.Y);
|
||||
float checkDistance = ((Player.tileRangeX + Player.tileRangeY) / 2f + player.blockRange) * 16f;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI && player.WithinRange(Main.MouseWorld, checkDistance) && tile.active() && tile.type == ModContent.TileType<CodebreakerTile>())
|
||||
{
|
||||
TECodebreaker codebreakerTileEntity = CalamityUtils.FindTileEntity<TECodebreaker>(placeTileCoords.X, placeTileCoords.Y, CodebreakerTile.Width, CodebreakerTile.Height, CodebreakerTile.SheetSquare);
|
||||
if (codebreakerTileEntity is null || codebreakerTileEntity.ContainsAdvancedDisplay)
|
||||
return false;
|
||||
|
||||
codebreakerTileEntity.ContainsAdvancedDisplay = true;
|
||||
codebreakerTileEntity.SyncConstituents();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 3);
|
||||
recipe.AddIngredient(ItemID.Glass, 20);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 472 B |
@@ -0,0 +1,85 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.World;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class AuricQuantumCoolingCell : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Auric Quantum Cooling Cell");
|
||||
Tooltip.SetDefault("Can be placed in the Codebreaker, completing it\n" +
|
||||
"The completion of the Codebreaker allows you to make contact with its original creator\n" +
|
||||
"Attempting to do so may have dire consequences");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 26;
|
||||
item.height = 44;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FirstOrDefault(x => x.Name == "Tooltip2" && x.mod == "Terraria").overrideColor = Color.DarkRed;
|
||||
CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 5, true);
|
||||
}
|
||||
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
float brightness = Main.essScale * Main.rand.NextFloat(0.9f, 1.1f);
|
||||
Lighting.AddLight(item.Center, 1.2f * brightness, 0.4f * brightness, 0.8f);
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player) => true;
|
||||
|
||||
public override bool ConsumeItem(Player player)
|
||||
{
|
||||
Point placeTileCoords = Main.MouseWorld.ToTileCoordinates();
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placeTileCoords.X, placeTileCoords.Y);
|
||||
float checkDistance = ((Player.tileRangeX + Player.tileRangeY) / 2f + player.blockRange) * 16f;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI && player.WithinRange(Main.MouseWorld, checkDistance) && tile.active() && tile.type == ModContent.TileType<CodebreakerTile>())
|
||||
{
|
||||
TECodebreaker codebreakerTileEntity = CalamityUtils.FindTileEntity<TECodebreaker>(placeTileCoords.X, placeTileCoords.Y, CodebreakerTile.Width, CodebreakerTile.Height, CodebreakerTile.SheetSquare);
|
||||
if (codebreakerTileEntity is null || codebreakerTileEntity.ContainsCoolingCell || codebreakerTileEntity.DecryptionCountdown > 0)
|
||||
return false;
|
||||
|
||||
codebreakerTileEntity.ContainsCoolingCell = true;
|
||||
codebreakerTileEntity.SyncConstituents();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
// Old worlds can craft the cell immediately for the sake of being able to easily fight Draedon in endgame worlds.
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 5, true);
|
||||
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 2);
|
||||
recipe.AddIngredient(ItemID.Wire, 40);
|
||||
recipe.AddIngredient(ModContent.ItemType<EndothermicEnergy>(), 80);
|
||||
recipe.AddIngredient(ModContent.ItemType<CoreofEleum>(), 12);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 887 B |
@@ -0,0 +1,39 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class CodebreakerBase : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults() => DisplayName.SetDefault("Codebreaker Base");
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 42;
|
||||
item.height = 32;
|
||||
item.maxStack = 999;
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.createTile = ModContent.TileType<CodebreakerTile>();
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<ChargingStationItem>());
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 35);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 550 B |
@@ -0,0 +1,71 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class DecryptionComputer : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Decryption Computer");
|
||||
Tooltip.SetDefault("Can be placed on the Codebreaker\n" +
|
||||
"Allows you to decrypt advanced schematics\n" +
|
||||
"Doing so allows you to learn how to craft new things");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 40;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.rare = ItemRarityID.Orange;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player) => true;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
|
||||
public override bool ConsumeItem(Player player)
|
||||
{
|
||||
Point placeTileCoords = Main.MouseWorld.ToTileCoordinates();
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placeTileCoords.X, placeTileCoords.Y);
|
||||
float checkDistance = ((Player.tileRangeX + Player.tileRangeY) / 2f + player.blockRange) * 16f;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI && player.WithinRange(Main.MouseWorld, checkDistance) && tile.active() && tile.type == ModContent.TileType<CodebreakerTile>())
|
||||
{
|
||||
TECodebreaker codebreakerTileEntity = CalamityUtils.FindTileEntity<TECodebreaker>(placeTileCoords.X, placeTileCoords.Y, CodebreakerTile.Width, CodebreakerTile.Height, CodebreakerTile.SheetSquare);
|
||||
if (codebreakerTileEntity is null || codebreakerTileEntity.ContainsDecryptionComputer)
|
||||
return false;
|
||||
|
||||
codebreakerTileEntity.ContainsDecryptionComputer = true;
|
||||
codebreakerTileEntity.SyncConstituents();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 1);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 18);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ItemID.Wire, 300); // Anything prior to Tier 2 (Post-Mechs) is fair game.
|
||||
recipe.AddRecipeGroup("AnyCopperBar", 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 15);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 476 B |
@@ -1,23 +0,0 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematic : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Encrypted Schematic");
|
||||
Tooltip.SetDefault("It's impossible to decipher"); // But not for long.
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematicHell : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Encrypted Schematic");
|
||||
Tooltip.SetDefault("Requires a Codebreaker with a sophisticated display to decrypt");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 1;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI && !RecipeUnlockHandler.HasFoundHellSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundHellSchematic = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
SchematicRecipe recipe = new SchematicRecipe(mod, "Hell");
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 693 B |
@@ -0,0 +1,47 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.DraedonStructures;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematicIce : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Encrypted Schematic");
|
||||
Tooltip.SetDefault("Requires a Codebreaker with a complex voltage regulation system to decrypt");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 1;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI && !RecipeUnlockHandler.HasFoundIceSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundIceSchematic = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
SchematicRecipe recipe = new SchematicRecipe(mod, "Ice");
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 649 B |
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematicJungle : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Encrypted Schematic");
|
||||
Tooltip.SetDefault("Requires a Codebreaker with a fine tuned, long range sensor to decrypt");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 1;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI && !RecipeUnlockHandler.HasFoundJungleSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundJungleSchematic = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
SchematicRecipe recipe = new SchematicRecipe(mod, "Jungle");
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 591 B |
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematicPlanetoid : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Encrypted Schematic");
|
||||
Tooltip.SetDefault("Requires a Codebreaker with a basic decryption computer to decrypt");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 1;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI && !RecipeUnlockHandler.HasFoundPlanetoidSchematic)
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundPlanetoidSchematic = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
SchematicRecipe recipe = new SchematicRecipe(mod, "Planetoid");
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
@@ -0,0 +1,52 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class EncryptedSchematicSunkenSea : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Schematic");
|
||||
Tooltip.SetDefault("You can barely make out its text...\n" +
|
||||
"Finely detailed diagrams of numerous devices and weaponry dance across the holographic screen\n" +
|
||||
"Picking up this item or holding it in your inventory permanently unlocks new recipes");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 42;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
item.maxStack = 1;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
// Since no decrypting is necessary for this item simply placing it in your inventory is sufficient enough to "learn"
|
||||
// from it.
|
||||
if (Main.myPlayer == player.whoAmI && (!RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes || !RecipeUnlockHandler.HasFoundSunkenSeaSchematic))
|
||||
{
|
||||
RecipeUnlockHandler.HasFoundSunkenSeaSchematic = true;
|
||||
RecipeUnlockHandler.HasUnlockedT1ArsenalRecipes = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
}
|
||||
|
||||
// Recipe exists for posierity.
|
||||
public override void AddRecipes()
|
||||
{
|
||||
SchematicRecipe recipe = new SchematicRecipe(mod, "Sunken Sea");
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ItemID.Glass, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 644 B |
@@ -0,0 +1,68 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class LongRangedSensorArray : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Long Ranged Sensor Array");
|
||||
Tooltip.SetDefault("Can be placed on the Codebreaker");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 52;
|
||||
item.height = 52;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.rare = ItemRarityID.Pink;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player) => true;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override bool ConsumeItem(Player player)
|
||||
{
|
||||
Point placeTileCoords = Main.MouseWorld.ToTileCoordinates();
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placeTileCoords.X, placeTileCoords.Y);
|
||||
float checkDistance = ((Player.tileRangeX + Player.tileRangeY) / 2f + player.blockRange) * 16f;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI && player.WithinRange(Main.MouseWorld, checkDistance) && tile.active() && tile.type == ModContent.TileType<CodebreakerTile>())
|
||||
{
|
||||
TECodebreaker codebreakerTileEntity = CalamityUtils.FindTileEntity<TECodebreaker>(placeTileCoords.X, placeTileCoords.Y, CodebreakerTile.Width, CodebreakerTile.Height, CodebreakerTile.SheetSquare);
|
||||
if (codebreakerTileEntity is null || codebreakerTileEntity.ContainsSensorArray)
|
||||
return false;
|
||||
|
||||
codebreakerTileEntity.ContainsSensorArray = true;
|
||||
codebreakerTileEntity.SyncConstituents();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 10);
|
||||
recipe.AddIngredient(ItemID.Wire, 50);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 882 B |
@@ -0,0 +1,69 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.DraedonSummoner;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CalamityMod.Items.DraedonMisc
|
||||
{
|
||||
public class VoltageRegulationSystem : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Voltage Regulation System");
|
||||
Tooltip.SetDefault("Can be placed on the Codebreaker");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 52;
|
||||
item.height = 52;
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.rare = ItemRarityID.Purple;
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
}
|
||||
|
||||
public override bool UseItem(Player player) => true;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
|
||||
public override bool ConsumeItem(Player player)
|
||||
{
|
||||
Point placeTileCoords = Main.MouseWorld.ToTileCoordinates();
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placeTileCoords.X, placeTileCoords.Y);
|
||||
float checkDistance = ((Player.tileRangeX + Player.tileRangeY) / 2f + player.blockRange) * 16f;
|
||||
|
||||
if (Main.myPlayer == player.whoAmI && player.WithinRange(Main.MouseWorld, checkDistance) && tile.active() && tile.type == ModContent.TileType<CodebreakerTile>())
|
||||
{
|
||||
TECodebreaker codebreakerTileEntity = CalamityUtils.FindTileEntity<TECodebreaker>(placeTileCoords.X, placeTileCoords.Y, CodebreakerTile.Width, CodebreakerTile.Height, CodebreakerTile.SheetSquare);
|
||||
if (codebreakerTileEntity is null || codebreakerTileEntity.ContainsVoltageRegulationSystem)
|
||||
return false;
|
||||
|
||||
codebreakerTileEntity.ContainsVoltageRegulationSystem = true;
|
||||
codebreakerTileEntity.SyncConstituents();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 5);
|
||||
recipe.AddIngredient(ItemID.LunarBar, 5);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 591 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class CyanSeekingMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cyan Seeking Mechanism");
|
||||
Tooltip.SetDefault("Moves swiftly towards a lab deep below the desert");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
item.shoot = ModContent.ProjectileType<CyanLabSeeker>();
|
||||
item.Calamity().MaxCharge = 100;
|
||||
item.Calamity().ChargePerUse = 15;
|
||||
item.Calamity().UsesCharge = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && CalamityWorld.SunkenSeaLabCenter != Vector2.Zero;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousMechanism>());
|
||||
recipe.AddIngredient(ItemID.WaterBucket);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 426 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class GreenSeekingMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Green Seeking Mechanism");
|
||||
Tooltip.SetDefault("Moves swiftly towards a lab within the jungle");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
item.shoot = ModContent.ProjectileType<GreenLabSeeker>();
|
||||
item.Calamity().MaxCharge = 100;
|
||||
item.Calamity().ChargePerUse = 15;
|
||||
item.Calamity().UsesCharge = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && CalamityWorld.JungleLabCenter != Vector2.Zero;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousMechanism>());
|
||||
recipe.AddIngredient(ItemID.Vine, 3);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 302 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class MysteriousMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mysterious Mechanism");
|
||||
Tooltip.SetDefault("Used as a base for specialized homing technology");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 4);
|
||||
recipe.AddIngredient(ItemID.IronBar, 10);
|
||||
recipe.anyIronBar = true;
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 347 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class PurpleSeekingMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Purple Seeking Mechanism");
|
||||
Tooltip.SetDefault("Moves swiftly towards a lab within the sky");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
item.shoot = ModContent.ProjectileType<PurpleLabSeeker>();
|
||||
item.Calamity().MaxCharge = 100;
|
||||
item.Calamity().ChargePerUse = 15;
|
||||
item.Calamity().UsesCharge = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && CalamityWorld.PlanetoidLabCenter != Vector2.Zero;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousMechanism>());
|
||||
recipe.AddIngredient(ItemID.Cloud, 20);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 423 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class RedSeekingMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Red Seeking Mechanism");
|
||||
Tooltip.SetDefault("Moves swiftly towards a lab within the underworld");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
item.shoot = ModContent.ProjectileType<RedLabSeeker>();
|
||||
item.Calamity().MaxCharge = 100;
|
||||
item.Calamity().ChargePerUse = 15;
|
||||
item.Calamity().UsesCharge = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && CalamityWorld.HellLabCenter != Vector2.Zero;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousMechanism>());
|
||||
recipe.AddIngredient(ItemID.HellstoneBar, 4);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 433 B |
@@ -0,0 +1,44 @@
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
public class YellowSeekingMechanism : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Yellow Seeking Mechanism");
|
||||
Tooltip.SetDefault("Moves swiftly towards a lab within the frozen caverns");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTime = item.useAnimation = 36;
|
||||
item.shoot = ModContent.ProjectileType<YellowLabSeeker>();
|
||||
item.Calamity().MaxCharge = 100;
|
||||
item.Calamity().ChargePerUse = 15;
|
||||
item.Calamity().UsesCharge = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DraedonRust;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && CalamityWorld.IceLabCenter != Vector2.Zero;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousMechanism>());
|
||||
recipe.AddIngredient(ItemID.IceBlock, 50);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 425 B |
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -35,9 +36,9 @@ namespace CalamityMod.Items.Mounts
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.DD2PetDragon);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 100);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 50);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 25);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Mounts.Minecarts
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>(), 1);
|
||||
recipe.AddIngredient(ModContent.ItemType<AscendantSpiritEssence>());
|
||||
recipe.AddIngredient(ItemID.Wire, 60);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.SetResult(this);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSilva
|
||||
recipe.AddIngredient(ModContent.ItemType<EffulgentFeather>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>());
|
||||
recipe.SetResult(this, 400);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
||||
recipe.AddRecipe();
|
||||
recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SilvaWall>(), 4);
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace CalamityMod.Items.Tools
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<MarniteObliteratorProj>();
|
||||
item.shootSpeed = 40f;
|
||||
}
|
||||
item.Calamity().trueMelee = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -50,6 +52,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
@@ -60,7 +64,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 8);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 12);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 10);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -50,6 +52,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
float swingOffset = Main.rand.NextFloat(0.5f, 1f) * item.shootSpeed * 1.6f * player.direction;
|
||||
@@ -59,7 +63,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 18);
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -53,6 +55,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<GatlingLaserProj>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
@@ -63,7 +67,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -43,6 +45,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
|
||||
{
|
||||
target.Calamity().GaussFluxTimer += 50;
|
||||
@@ -61,7 +65,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 1);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 7);
|
||||
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 4);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using System.Collections.Generic;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -43,9 +45,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 8);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 10);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -50,9 +52,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 18);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -43,6 +45,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
item.melee = true;
|
||||
item.channel = true;
|
||||
|
||||
modItem.trueMelee = true;
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 85f;
|
||||
modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile.
|
||||
@@ -50,9 +53,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && item.Calamity().Charge > 0;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 8);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 12);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 10);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -62,6 +64,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-20, 0);
|
||||
@@ -69,7 +73,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 15);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 15);
|
||||
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 8);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -55,9 +57,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
ArsenalTierGatedRecipe recipe = new ArsenalTierGatedRecipe(mod, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<MysteriousCircuitry>(), 12);
|
||||
recipe.AddIngredient(ModContent.ItemType<DubiousPlating>(), 8);
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 10);
|
||||
|
||||