Various Draedon's Arsenal fixes and minor changes

Also a few resprites
This commit is contained in:
Cameron Ewell authored and GitHub committed 2020-08-23 19:54:44 -04:00
commit 4bd664474f
27 files changed
+182 -157

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Cooldowns
public override void SetDefaults()
{
DisplayName.SetDefault("God Slayer Cooldown");
Description.SetDefault("10% increase to all damage; godslayer effect is recharging");
Description.SetDefault("Life regen is disabled; godslayer effect is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
+32 -2
View File
@@ -265,8 +265,38 @@ namespace CalamityMod
CalamityLocalization.AddLocalizations();
On.Terraria.Player.TileInteractionsUse += Player_TileInteractionsUse;
On.Terraria.WorldGen.OpenDoor += LabDoorsOpen;
On.Terraria.WorldGen.CloseDoor += LabDoorsClose;
}
private static bool LabDoorsOpen(On.Terraria.WorldGen.orig_OpenDoor orig, int i, int j, int direction)
{
Tile tile = Main.tile[i, j];
if (tile.type == ModContent.TileType<AgedLaboratoryDoorOpen>() || tile.type == ModContent.TileType<AgedLaboratoryDoorClosed>() ||
tile.type == ModContent.TileType<LaboratoryDoorOpen>() || tile.type == ModContent.TileType<LaboratoryDoorClosed>())
{
return false;
}
else
{
return orig(i, j, direction);
}
}
private static bool LabDoorsClose(On.Terraria.WorldGen.orig_CloseDoor orig, int i, int j, bool forced)
{
Tile tile = Main.tile[i, j];
if (tile.type == ModContent.TileType<AgedLaboratoryDoorOpen>() || tile.type == ModContent.TileType<AgedLaboratoryDoorClosed>() ||
tile.type == ModContent.TileType<LaboratoryDoorOpen>() || tile.type == ModContent.TileType<LaboratoryDoorClosed>())
{
return false;
}
else
{
return orig(i, j, forced);
}
}
private static void Player_TileInteractionsUse(On.Terraria.Player.orig_TileInteractionsUse orig, Player player, int i, int j)
{
Tile tile = Main.tile[i, j];
@@ -292,9 +322,9 @@ namespace CalamityMod
}
}
private static void DoorSwap(int type1, int type2, int i, int j)
public static void DoorSwap(int type1, int type2, int i, int j, bool forced = false)
{
if (PlayerInput.Triggers.JustPressed.MouseRight)
if (PlayerInput.Triggers.JustPressed.MouseRight || forced)
{
ushort type = (ushort)type1;
short frameY = 0;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 456 B

+1 -1
View File
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Materials
{
DisplayName.SetDefault("Galactica Singularity");
Tooltip.SetDefault("A shard of the cosmos");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 24));
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 24));
}
public override void SetDefaults()
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Placeables
item.rare = ItemRarityID.Red;
item.Calamity().customRarity = CalamityRarity.DraedonRust;
item.value = Item.buyPrice(gold: 50);
//item.value = Item.buyPrice(gold: 5);
}
}
}
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Placeables.Furniture
item.useAnimation = 15;
item.useTime = 14;
item.rare = 2;
item.Calamity().customRarity = CalamityRarity.DraedonRust;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = 500;
@@ -23,8 +23,9 @@ namespace CalamityMod.Items.Placeables.Furniture
item.useTime = 10;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = Item.buyPrice(0, 5, 0, 0);
//item.value = Item.buyPrice(0, 5, 0, 0);
item.rare = 3;
item.Calamity().customRarity = CalamityRarity.DraedonRust;
item.createTile = ModContent.TileType<DraedonHologram>();
}
}
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Placeables.Furniture
item.useAnimation = 15;
item.useTime = 14;
item.rare = 3;
item.Calamity().customRarity = CalamityRarity.DraedonRust;
item.useStyle = ItemUseStyleID.SwingThrow;
item.consumable = true;
item.value = 500;
+1 -1
View File
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables.Furniture
{
DisplayName.SetDefault("Spiteful Candle");
Tooltip.SetDefault("When placed, nearby enemies take 5% more damage.\n" +
"This extra damage bypasses enemy damage reduction\n" +
"This extra damage bypasses enemy damage reduction and defense\n" +
"'Its hateful glow flickers with ire'");
}
@@ -30,8 +30,7 @@ namespace CalamityMod.Items.Placeables.FurniturePlaguedPlate
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.StoneBlock, 10);
recipe.anyIronBar = true;
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>(), 1);
recipe.AddIngredient(ModContent.ItemType<PlagueCellCluster>());
recipe.SetResult(this, 10);
recipe.AddTile(ModContent.TileType<PlagueInfuser>());
recipe.AddRecipe();
+1 -1
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.TreasureBags
public override void RightClick(Player player)
{
int anglerTackleBagChance = !Main.expertMode ? 15 : 18;
int anglerTackleBagChance = !Main.expertMode ? 18 : 15;
int fishingAccChance = !Main.expertMode ? 12 : 10;
int fishFindAccChance = !Main.expertMode ? 9 : 8;
int anglerArmorChance = !Main.expertMode ? 4 : 2;
+2 -2
View File
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 35;
item.ranged = true;
item.width = 50;
item.height = 32;
item.width = 56;
item.height = 30;
item.useTime = 10;
item.useAnimation = 10;
item.useStyle = ItemUseStyleID.HoldingOut;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 792 B

+2 -2
View File
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged
{
item.damage = 40;
item.ranged = true;
item.width = 50;
item.height = 32;
item.width = 54;
item.height = 38;
item.useTime = 12;
item.useAnimation = 12;
item.useStyle = ItemUseStyleID.HoldingOut;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 877 B

+2 -1
View File
@@ -15,7 +15,8 @@ namespace CalamityMod.Items.Weapons.Typeless
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Aero Dynamite");
Tooltip.SetDefault("Throws a floaty explosive that defies gravity");
Tooltip.SetDefault("You don't need an aerodynamics major to use this\n" +
"Throws a floaty explosive that defies gravity");
}
public override void SetDefaults()
+5 -1
View File
@@ -165,12 +165,16 @@ namespace CalamityMod.NPCs
if (CalamityWorld.witchDoctorName)
break;
CalamityWorld.witchDoctorName = true;
switch (Main.rand.Next(11)) // 10 witch doctor names
switch (Main.rand.Next(12)) // 10 witch doctor names
{
case 0:
npc.GivenName = "Sok'ar";
break;
case 1:
npc.GivenName = "Toxin"; // patron name for <@!348174404984766465> (Toxin#9598)
break;
default:
break;
}
@@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
for (int i = 0; i < Main.npc.Length; i++)
{
if (i != target.whoAmI &&
target.CanBeChasedBy(projectile, false) &&
Main.npc[i].CanBeChasedBy(projectile, false) &&
Main.npc[i].Distance(target.Center) < 240f)
{
if (TryToSuperchargeNPC(Main.npc[i]))
+103 -115
View File
@@ -6,146 +6,134 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class VividBeam : ModProjectile
{
private bool counter = true;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Beam");
}
public class VividBeam : ModProjectile
{
private bool initialized = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Beam");
}
public override void SetDefaults()
{
projectile.width = 4;
projectile.height = 4;
projectile.friendly = true;
projectile.magic = true;
projectile.penetrate = 1;
projectile.extraUpdates = 100;
projectile.timeLeft = 240;
}
public override void SetDefaults()
{
projectile.width = 4;
projectile.height = 4;
projectile.friendly = true;
projectile.magic = true;
projectile.penetrate = 1;
projectile.extraUpdates = 100;
projectile.timeLeft = 240;
}
public override void AI()
{
Vector2 value7 = new Vector2(5f, 10f);
projectile.ai[0] += 1f;
if (projectile.ai[0] == 48f)
{
projectile.ai[0] = 0f;
}
else
{
for (int num41 = 0; num41 < 2; num41++)
{
Vector2 value8 = Vector2.UnitX * -12f;
value8 = -Vector2.UnitY.RotatedBy((double)(projectile.ai[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7 - projectile.rotation.ToRotationVector2() * 10f;
int num42 = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[num42].scale = 0.75f;
Main.dust[num42].noGravity = true;
Main.dust[num42].position = projectile.Center + value8;
Main.dust[num42].velocity = projectile.velocity;
}
}
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 4f)
{
for (int num447 = 0; num447 < 2; num447++)
{
Vector2 vector33 = projectile.position;
vector33 -= projectile.velocity * ((float)num447 * 0.25f);
int num448 = Dust.NewDust(vector33, 1, 1, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[num448].noGravity = true;
Main.dust[num448].position = vector33;
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].velocity *= 0.1f;
public override void AI()
{
if (!initialized)
{
initialized = true;
float dustAmt = 16f;
int d = 0;
while ((float)d < dustAmt)
{
Vector2 offset = Vector2.UnitX * 0f;
offset += -Vector2.UnitY.RotatedBy((double)((float)d * (MathHelper.TwoPi / dustAmt)), default) * new Vector2(1f, 4f);
offset = offset.RotatedBy((double)projectile.velocity.ToRotation(), default);
int i = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[i].scale = 1.5f;
Main.dust[i].noGravity = true;
Main.dust[i].position = projectile.Center + offset;
Main.dust[i].velocity = projectile.velocity * 0f + offset.SafeNormalize(Vector2.UnitY) * 1f;
d++;
}
}
}
if (counter)
{
counter = false;
float num98 = 16f;
int num99 = 0;
while ((float)num99 < num98)
{
Vector2 vector11 = Vector2.UnitX * 0f;
vector11 += -Vector2.UnitY.RotatedBy((double)((float)num99 * (6.28318548f / num98)), default) * new Vector2(1f, 4f);
vector11 = vector11.RotatedBy((double)projectile.velocity.ToRotation(), default);
int num100 = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[num100].scale = 1.5f;
Main.dust[num100].noGravity = true;
Main.dust[num100].position = projectile.Center + vector11;
Main.dust[num100].velocity = projectile.velocity * 0f + vector11.SafeNormalize(Vector2.UnitY) * 1f;
num99++;
}
}
}
float pi = MathHelper.Pi;
projectile.ai[0] += 1f;
if (projectile.ai[0] == 48f)
{
projectile.ai[0] = 0f;
}
else
{
for (int d = 0; d < 2; d++)
{
Vector2 offset = Vector2.UnitX * -12f;
offset = -Vector2.UnitY.RotatedBy((double)(projectile.ai[0] * pi / 24f + (float)d * pi), default) * new Vector2(5f, 10f) - projectile.rotation.ToRotationVector2() * 10f;
int i = Dust.NewDust(projectile.Center, 0, 0, 66, 0f, 0f, 160, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[i].scale = 0.75f;
Main.dust[i].noGravity = true;
Main.dust[i].position = projectile.Center + offset;
Main.dust[i].velocity = projectile.velocity;
}
}
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 4f)
{
for (int d = 0; d < 2; d++)
{
Vector2 source = projectile.position;
source -= projectile.velocity * ((float)d * 0.25f);
int i = Dust.NewDust(source, 1, 1, 66, 0f, 0f, 0, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f);
Main.dust[i].noGravity = true;
Main.dust[i].position = source;
Main.dust[i].scale = Main.rand.NextFloat(0.91f, 1.417f);
Main.dust[i].velocity *= 0.1f;
}
}
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
if (projectile.owner == Main.myPlayer)
{
public override bool OnTileCollide(Vector2 oldVelocity)
{
if (projectile.owner == Main.myPlayer)
{
SummonLasers();
}
return true;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (projectile.owner == Main.myPlayer)
{
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (projectile.owner == Main.myPlayer)
{
SummonLasers();
}
target.ExoDebuffs();
}
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (projectile.owner == Main.myPlayer)
{
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (projectile.owner == Main.myPlayer)
{
SummonLasers();
}
target.ExoDebuffs();
}
}
private void SummonLasers()
{
if (projectile.ai[1] == 0f)
switch (projectile.ai[1])
{
float xStart = projectile.position.X + (float)Main.rand.Next(-400, 400);
float yStart = projectile.position.Y - (float)Main.rand.Next(500, 800);
Vector2 startPos = new Vector2(xStart, yStart);
Vector2 velocity = projectile.Center - startPos;
velocity.X += (float)Main.rand.Next(-100, 101);
float speed = 6f;
float targetDist = velocity.Length();
targetDist = speed / targetDist;
velocity.X *= targetDist;
velocity.Y *= targetDist;
int num19 = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<VividClarityBeam>(), (int)(projectile.damage * 0.7f), projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[num19].ai[1] = projectile.position.Y;
}
if (projectile.ai[1] == 1f)
{
int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<SupernovaBoom>(), (int)(projectile.damage * 2f), projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[boom].Calamity().forceMagic = true;
}
if (projectile.ai[1] == 2f)
{
float spread = 30f * 0.01f * MathHelper.PiOver2;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
if (projectile.owner == Main.myPlayer)
{
case 0f:
CalamityUtils.ProjectileRain(projectile.Center, 400f, 100f, 500f, 800f, 6f, ModContent.ProjectileType<VividClarityBeam>(), (int)(projectile.damage * 0.7), projectile.knockBack, projectile.owner);
break;
case 1f:
int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<SupernovaBoom>(), projectile.damage * 2, projectile.knockBack, projectile.owner);
Main.projectile[boom].Calamity().forceMagic = true;
break;
case 2f:
float spread = 30f * 0.01f * MathHelper.PiOver2;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
for (int i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<VividLaser2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<VividLaser2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<VividLaser2>(), projectile.damage, projectile.knockBack, projectile.owner);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<VividLaser2>(), projectile.damage, projectile.knockBack, projectile.owner);
}
}
break;
}
}
}
}
}
+5 -3
View File
@@ -3,10 +3,11 @@ using CalamityMod.TileEntities;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.ObjectData;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles
{
@@ -31,6 +32,7 @@ namespace CalamityMod.Tiles
{
TileObjectData.newTile.CoordinateHeights[i] = 16;
}
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 6, 0);
TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(ModContent.GetInstance<TEDraedonHologram>().Hook_AfterPlacement, -1, 0, true);
TileObjectData.newTile.LavaDeath = false;
TileObjectData.addTile(Type);
@@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures
num = fail ? 1 : 3;
}
public override void HitWire(int i, int j)
{
CalamityMod.DoorSwap(ModContent.TileType<AgedLaboratoryDoorOpen>(), ModContent.TileType<AgedLaboratoryDoorClosed>(), i, j, true);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType<AgedLaboratoryDoorItem>());
@@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures
num = fail ? 1 : 3;
}
public override void HitWire(int i, int j)
{
CalamityMod.DoorSwap(ModContent.TileType<AgedLaboratoryDoorClosed>(), ModContent.TileType<AgedLaboratoryDoorOpen>(), i, j, true);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType<AgedLaboratoryDoorItem>());
@@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures
num = fail ? 1 : 3;
}
public override void HitWire(int i, int j)
{
CalamityMod.DoorSwap(ModContent.TileType<LaboratoryDoorOpen>(), ModContent.TileType<LaboratoryDoorClosed>(), i, j, true);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType<LaboratoryDoorItem>());
@@ -55,6 +55,11 @@ namespace CalamityMod.Tiles.DraedonStructures
num = fail ? 1 : 3;
}
public override void HitWire(int i, int j)
{
CalamityMod.DoorSwap(ModContent.TileType<LaboratoryDoorClosed>(), ModContent.TileType<LaboratoryDoorOpen>(), i, j, true);
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 16, 48, ModContent.ItemType<LaboratoryDoorItem>());
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 510 B

-22
View File
@@ -1013,28 +1013,6 @@ namespace CalamityMod
});
RecipeGroup.RegisterGroup("SiltGroup", group);
group = new RecipeGroup(() => "Any Phaseblade", new int[]
{
ItemID.WhitePhaseblade,
ItemID.RedPhaseblade,
ItemID.GreenPhaseblade,
ItemID.BluePhaseblade,
ItemID.PurplePhaseblade,
ItemID.YellowPhaseblade
});
RecipeGroup.RegisterGroup("AnyPhaseblade", group);
group = new RecipeGroup(() => "Any Phasesaber", new int[]
{
ItemID.WhitePhasesaber,
ItemID.RedPhasesaber,
ItemID.GreenPhasesaber,
ItemID.BluePhasesaber,
ItemID.PurplePhasesaber,
ItemID.YellowPhasesaber
});
RecipeGroup.RegisterGroup("AnyPhasesaber", group);
group = new RecipeGroup(() => "Any Hardmode Anvil", new int[]
{
ItemID.MythrilAnvil,