Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
05ec151a73
33 files changed
+182
-29
No files matched your search
@@ -30,5 +30,14 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.bloodyWormTooth = true;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() += 0.07f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<RottenBrain>().
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -47,5 +48,14 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.rBrain = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<BloodyWormTooth>().
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Brimlish");
|
||||
SacrificeTotal = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Slurpfish");
|
||||
SacrificeTotal = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -18,7 +19,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
Item.width = 30;
|
||||
Item.height = 30;
|
||||
Item.uniqueStack = true;
|
||||
Item.rare = ItemRarityID.Quest; // Questfish cannot be researched.
|
||||
Item.rare = ItemRarityID.Quest;
|
||||
}
|
||||
|
||||
public override bool IsQuestFish()
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Eutrophic Sandfish");
|
||||
SacrificeTotal = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Serpentuna");
|
||||
SacrificeTotal = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Surf Clam");
|
||||
SacrificeTotal = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Tooltip.SetDefault(@"Alien power pulses inside its layers
|
||||
Consuming it does something that cannot be reversed
|
||||
This item does nothing in Master Mode");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
@@ -8,6 +8,7 @@ namespace CalamityMod.Items.Placeables
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Clay");
|
||||
SacrificeTotal = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CalamityMod.Items.Placeables
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Snow");
|
||||
SacrificeTotal = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Placeables
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Celestial Remains");
|
||||
SacrificeTotal = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace CalamityMod.Items.Placeables
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Novae Slag");
|
||||
SacrificeTotal = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
using Terraria.ID;
|
||||
|
||||
@@ -6,6 +6,11 @@ namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class ChaoticBrickWall : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 400;
|
||||
DisplayName.SetDefault("Chaotic Brick Wall");
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 12;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace CalamityMod.Items.SummonItems.Invasion
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<SulphuricScale>(5).
|
||||
AddCondition(Recipe.Condition.NearWater).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
DisplayName.SetDefault("Arid Artifact");
|
||||
Tooltip.SetDefault("Summons a sandstorm\n" +
|
||||
"The sandstorm will happen shortly after the item is used\n" +
|
||||
"Not consumable");
|
||||
"If used during a sandstorm, the sandstorm will stop some time afterward.");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -9,9 +9,10 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Torrential Tear");
|
||||
Tooltip.SetDefault("Summons the rain.\n" +
|
||||
"Rain will start some time after this item is used.\n" +
|
||||
"If used while it's raining, the rain will stop some time afterward.");
|
||||
Tooltip.SetDefault("Summons the rain\n" +
|
||||
"Rain will start some time after this item is used\n" +
|
||||
"If used while it's raining, the rain will stop some time afterward");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Materials;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
@@ -71,6 +72,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AddIngredient(ItemID.Muramasa).
|
||||
AddIngredient(ItemID.BladeofGrass).
|
||||
AddIngredient(ItemID.FieryGreatsword).
|
||||
AddIngredient<PurifiedGel>(5).
|
||||
AddTile(TileID.DemonAltar).
|
||||
Register();
|
||||
CreateRecipe().
|
||||
@@ -78,6 +80,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AddIngredient(ItemID.Muramasa).
|
||||
AddIngredient(ItemID.BladeofGrass).
|
||||
AddIngredient(ItemID.FieryGreatsword).
|
||||
AddIngredient<PurifiedGel>(5).
|
||||
AddTile(TileID.DemonAltar).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
player.ChangeDir(-1);
|
||||
}
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, player.compositeFrontArm.rotation + MathHelper.PiOver2, player.GetFrontHandPosition(player.compositeFrontArm.stretch, player.compositeFrontArm.rotation).Floor(), new Vector2(42, 34), new Vector2(-15, 11));
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir, player.GetFrontHandPositionImproved(player.compositeFrontArm), new Vector2(42, 34), new Vector2(-15, 11));
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +109,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
armPointingDirection = -MathHelper.Pi + MathHelper.PiOver4 * Utils.GetLerpValue(-MathHelper.Pi, -MathHelper.PiOver4, armPointingDirection, true);
|
||||
}
|
||||
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, armPointingDirection - MathHelper.PiOver2);
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, armPointingDirection - MathHelper.PiOver2);
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, armPointingDirection * player.gravDir - MathHelper.PiOver2);
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, armPointingDirection * player.gravDir - MathHelper.PiOver2);
|
||||
}
|
||||
|
||||
public override void HoldStyle(Player player, Rectangle heldItemFrame)
|
||||
|
||||
@@ -79,12 +79,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
CreateRecipe().
|
||||
AddIngredient<TrueBloodyEdge>().
|
||||
AddIngredient(ItemID.TrueExcalibur).
|
||||
AddIngredient(ItemID.BrokenHeroSword).
|
||||
AddIngredient<LivingShard>(7).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.TrueNightsEdge).
|
||||
AddIngredient(ItemID.TrueExcalibur).
|
||||
AddIngredient(ItemID.BrokenHeroSword).
|
||||
AddIngredient<LivingShard>(7).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
|
||||
@@ -74,7 +74,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<BloodyEdge>().
|
||||
AddIngredient(ItemID.BrokenHeroSword).
|
||||
AddIngredient(ItemID.SoulofFright, 3).
|
||||
AddIngredient(ItemID.SoulofMight, 3).
|
||||
AddIngredient(ItemID.SoulofSight, 3).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
velocity = velocity.RotatedByRandom(0.01f);
|
||||
}
|
||||
|
||||
public static Vector2 getPlayerMouth(Player player) => player.MountedCenter - 5f * Vector2.UnitY + Vector2.UnitX * 6f * player.direction;
|
||||
public static Vector2 getPlayerMouth(Player player) => player.MountedCenter - 5f * Vector2.UnitY * player.gravDir + Vector2.UnitX * 6f * player.direction;
|
||||
public static Vector2 getPlayerShoulder(Player player) => player.MountedCenter - Vector2.UnitX * 4f * player.direction;
|
||||
|
||||
public void SetItemInHand(Player player, Rectangle heldItemFrame)
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Vector2 playerMouth = getPlayerMouth(player);
|
||||
|
||||
Vector2 playerToCursor = (player.Calamity().mouseWorld - playerMouth).SafeNormalize(Vector2.UnitX);
|
||||
float pointingDirection = (playerToCursor.ToRotation() + MathHelper.PiOver4 / 3f * player.direction);
|
||||
float pointingDirection = (playerToCursor.ToRotation() + MathHelper.PiOver4 / 3f * player.direction * player.gravDir);
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, pointingDirection, playerMouth, new Vector2(50, 18), new Vector2(-23, 6));
|
||||
}
|
||||
@@ -91,9 +91,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
float frontArmDirection = (playerMouth + mouthToCursor * 25f - getPlayerShoulder(player)).ToRotation();
|
||||
|
||||
if (frontArm)
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmDirection - MathHelper.PiOver2);
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmDirection * player.gravDir - MathHelper.PiOver2);
|
||||
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmDirection - MathHelper.PiOver2);
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmDirection * player.gravDir - MathHelper.PiOver2);
|
||||
}
|
||||
|
||||
public override void HoldStyle(Player player, Rectangle heldItemFrame)
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
|
||||
DisplayName.SetDefault("Bazooka");
|
||||
Tooltip.SetDefault("Uses Grenade Shells\n" +
|
||||
"Can be used twice per boss battle");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
|
||||
DisplayName.SetDefault("Elephant Killer");
|
||||
Tooltip.SetDefault("Uses Magnum Rounds\n" +
|
||||
"Can be used thrice per boss battle");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
|
||||
DisplayName.SetDefault("Hydra");
|
||||
Tooltip.SetDefault("Uses Explosive Shotgun Shells\n" +
|
||||
"Can be used once per boss battle");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
|
||||
DisplayName.SetDefault("Lightning Hawk");
|
||||
Tooltip.SetDefault("Uses Magnum Rounds\n" +
|
||||
"Can be used thrice per boss battle");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse
|
||||
DisplayName.SetDefault("Magnum");
|
||||
Tooltip.SetDefault("Uses Magnum Rounds\n" +
|
||||
"Can be used thrice per boss battle");
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1312,8 +1312,6 @@ namespace CalamityMod.NPCs
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.BlueFlare, (Main.LocalPlayer.HasItem(ItemType<FirestormCannon>()) || Main.LocalPlayer.HasItem(ItemType<SpectralstormCannon>())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.ApprenticeBait, NPC.downedBoss1);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.JourneymanBait, NPC.downedBoss3);
|
||||
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Vilethorn : ItemID.CrimsonRod, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
|
||||
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BallOHurt : ItemID.TheRottedFork, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.MasterBait, NPC.downedPlantBoss);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.AngelStatue, NPC.FindFirstNPC(NPCType<THIEF>()) != -1, Item.buyPrice(0, 5));
|
||||
}
|
||||
@@ -1341,7 +1339,6 @@ namespace CalamityMod.NPCs
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<MagnumRounds>(), hasMagnum, Item.buyPrice(0, 3 * goldCost, 0, 0));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<GrenadeRounds>(), Main.LocalPlayer.HasItem(ItemType<Bazooka>()), Item.buyPrice(0, 5 * goldCost, 0, 0));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<ExplosiveShells>(), Main.LocalPlayer.HasItem(ItemType<Hydra>()), Item.buyPrice(0, 7 * goldCost, 0, 0));
|
||||
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Musket : ItemID.TheUndertaker, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.Boomstick, NPC.downedQueenBee, price: Item.buyPrice(gold: 20));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.AmmoBox, Main.hardMode, Item.buyPrice(gold: 25));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.Uzi, NPC.downedPlantBoss, Item.buyPrice(gold: 45));
|
||||
@@ -1378,10 +1375,6 @@ namespace CalamityMod.NPCs
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.SwiftnessPotion, NPC.downedBoss2, Item.buyPrice(0, goldCost, 0, 0));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.JungleRose, price: Item.buyPrice(0, 2));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemID.NaturesGift, price: Item.buyPrice(0, 10));
|
||||
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BandofStarpower : ItemID.PanicNecklace, WorldGen.shadowOrbSmashed || NPC.downedBoss2);
|
||||
SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.WormScarf : ItemID.BrainOfConfusion, NPC.downedBoss2);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<RottenBrain>(), DownedBossSystem.downedPerforator);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<BloodyWormTooth>(), DownedBossSystem.downedHiveMind);
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<RomajedaOrchid>());
|
||||
}
|
||||
|
||||
|
||||
@@ -52,12 +52,12 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
if (ChargingUp)
|
||||
{
|
||||
float bubbleRotation = Owner.itemRotation - MathHelper.PiOver4 / 3f * Owner.direction;
|
||||
float bubbleRotation = Owner.itemRotation - MathHelper.PiOver4 / 3f * Owner.direction * Owner.gravDir;
|
||||
if (Owner.direction < 0)
|
||||
bubbleRotation += MathHelper.Pi;
|
||||
|
||||
|
||||
Vector2 bubblePosition = ReedBlowgun.getPlayerMouth(Owner) + (bubbleRotation + MathHelper.PiOver4 / 15f * Owner.direction).ToRotationVector2() * 48f;
|
||||
Vector2 bubblePosition = ReedBlowgun.getPlayerMouth(Owner) + (bubbleRotation + MathHelper.PiOver4 / 15f * Owner.direction * Owner.gravDir).ToRotationVector2() * 48f;
|
||||
|
||||
Projectile.Center = bubblePosition;
|
||||
Projectile.velocity = Vector2.UnitX.RotatedBy(bubbleRotation) * Projectile.velocity.Length();
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
Owner.heldProj = Projectile.whoAmI;
|
||||
|
||||
Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation) * -40f;
|
||||
Projectile.rotation = -MathHelper.PiOver2 + armRotation;
|
||||
Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -40f * Owner.gravDir;
|
||||
Projectile.rotation = (-MathHelper.PiOver2 + armRotation) * Owner.gravDir;
|
||||
|
||||
Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.minion = true;
|
||||
Projectile.minionSlots = 0f;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 446 B |
@@ -520,6 +520,79 @@ namespace CalamityMod
|
||||
AddTile(TileID.Hellforge).
|
||||
Register();
|
||||
|
||||
// Alternative Evil Biome items
|
||||
CreateRecipe(ItemID.BandofStarpower).
|
||||
AddIngredient(ItemID.PanicNecklace).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.PanicNecklace).
|
||||
AddIngredient(ItemID.BandofStarpower).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.CrimsonRod).
|
||||
AddIngredient(ItemID.Vilethorn).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.Vilethorn).
|
||||
AddIngredient(ItemID.CrimsonRod).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.TheRottedFork).
|
||||
AddIngredient(ItemID.BallOHurt).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.BallOHurt).
|
||||
AddIngredient(ItemID.TheRottedFork).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.TheUndertaker).
|
||||
AddIngredient(ItemID.Musket).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.Musket).
|
||||
AddIngredient(ItemID.TheUndertaker).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.CrimsonHeart).
|
||||
AddIngredient(ItemID.ShadowOrb).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.ShadowOrb).
|
||||
AddIngredient(ItemID.CrimsonHeart).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.BrainOfConfusion).
|
||||
AddIngredient(ItemID.WormScarf).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
CreateRecipe(ItemID.WormScarf).
|
||||
AddIngredient(ItemID.BrainOfConfusion).
|
||||
AddTile(TileID.Anvils).
|
||||
AddCondition(Recipe.Condition.InGraveyardBiome).
|
||||
Register();
|
||||
|
||||
AddAstralClayRecipes();
|
||||
AddBloodOrbPotionRecipes();
|
||||
AddCookedFood();
|
||||
@@ -1533,6 +1606,7 @@ namespace CalamityMod
|
||||
r = CreateRecipe(ItemID.TerraBlade);
|
||||
r.AddIngredient(ModContent.ItemType<TrueBloodyEdge>());
|
||||
r.AddIngredient(ItemID.TrueExcalibur);
|
||||
r.AddIngredient(ItemID.BrokenHeroSword);
|
||||
r.AddIngredient(ModContent.ItemType<LivingShard>(), 7);
|
||||
r.AddTile(TileID.MythrilAnvil);
|
||||
r.Register();
|
||||
|
||||
@@ -11,6 +11,7 @@ using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
using static Terraria.Player;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
@@ -488,6 +489,39 @@ namespace CalamityMod
|
||||
#endregion
|
||||
|
||||
#region Arms Control
|
||||
|
||||
/// <summary>
|
||||
/// The exact same thing as Player.GetFrontHandPosition() except it properly accounts for gravity swaps instead of requiring the coders to do it manually afterwards.
|
||||
/// Additionally, it simply takes in the arm data instead of asking for the rotation and stretch separately.
|
||||
/// </summary>
|
||||
public static Vector2 GetFrontHandPositionImproved(this Player player, CompositeArmData arm)
|
||||
{
|
||||
Vector2 position = player.GetFrontHandPosition(arm.stretch, arm.rotation * player.gravDir).Floor();
|
||||
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
position.Y = player.position.Y + (float)player.height + (player.position.Y - position.Y);
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The exact same thing as Player.GetBackHandPosition() except it properly accounts for gravity swaps instead of requiring the coders to do it manually afterwards.
|
||||
/// Additionally, it simply takes in the arm data instead of asking for the rotation and stretch separately.
|
||||
/// </summary>
|
||||
public static Vector2 GetBackHandPositionImproved(this Player player, CompositeArmData arm)
|
||||
{
|
||||
Vector2 position = player.GetBackHandPosition(arm.stretch, arm.rotation * player.gravDir).Floor();
|
||||
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
position.Y = player.position.Y + (float)player.height + (player.position.Y - position.Y);
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Properly sets the player's held item rotation and position by doing the annoying math for you, since vanilla decided to be wholly inconsistent about it!
|
||||
/// This all assumes the player is facing right. All the flip stuff is automatically handled in here
|
||||
@@ -508,6 +542,8 @@ namespace CalamityMod
|
||||
Vector2 origin = rotationOriginFromCenter.Value;
|
||||
//Flip the origin's X position, since the sprite will be flipped if the player faces left.
|
||||
origin.X *= player.direction;
|
||||
//Additionally, flip the origin's Y position in case the player is in reverse gravity.
|
||||
origin.Y *= player.gravDir;
|
||||
|
||||
player.itemRotation = desiredRotation;
|
||||
|
||||
|
||||
Reference in new issue
Block a user