This commit is contained in:
Andrew Marheine committed 2020-07-31 18:59:56 -05:00
commit 6baa29ad5f
17 files changed
+36 -42

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 726 B

+5 -5
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Items
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Charger Test Item");
Tooltip.SetDefault("Testing/Cheat Item" +
Tooltip.SetDefault("Testing/Cheat Item\n" +
"Charges all Draedon's Arsenal weapons in your inventory");
}
@@ -21,10 +21,10 @@ namespace CalamityMod.Items
item.Calamity().customRarity = CalamityRarity.DraedonRust;
item.consumable = false;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useAnimation = 15;
item.useTime = 10;
item.autoReuse = true;
item.useStyle = ItemUseStyleID.HoldingUp;
item.useTime = 29;
item.useAnimation = 29;
item.autoReuse = false;
item.useTurn = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 729 B

+2 -12
View File
@@ -1,4 +1,3 @@
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.DraedonsArsenal;
using Microsoft.Xna.Framework;
@@ -29,7 +28,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.noUseGraphic = true;
item.autoReuse = false;
item.channel = true;
item.mana = 15;
item.mana = 4;
item.useStyle = ItemUseStyleID.HoldingOut;
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/GatlingLaserFireStart");
@@ -54,16 +53,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return false;
}
// Disable vanilla ammo consumption
public override bool ConsumeAmmo(Player player)
{
return false;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-20, 0);
}
public override Vector2? HoldoutOffset() => new Vector2(-20, 0);
public override void AddRecipes()
{
+29 -25
View File
@@ -1,15 +1,14 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using System;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Items;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.DraedonsArsenal
{
public class GatlingLaserProj : ModProjectile
{
public class GatlingLaserProj : ModProjectile
{
private SoundEffectInstance gatlingLaserLoop;
private bool fireLasers = false;
@@ -18,20 +17,20 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
DisplayName.SetDefault("Gatling Laser");
}
public override void SetDefaults()
{
projectile.width = 24;
projectile.height = 58;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.ignoreWater = true;
projectile.magic = true;
}
public override void SetDefaults()
{
projectile.width = 24;
projectile.height = 58;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.ignoreWater = true;
projectile.magic = true;
}
public override void AI()
{
Player player = Main.player[projectile.owner];
public override void AI()
{
Player player = Main.player[projectile.owner];
float num = 1.57079637f;
Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true);
if (projectile.type == ModContent.ProjectileType<GatlingLaserProj>())
@@ -62,20 +61,25 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
}
if (flag && Main.myPlayer == projectile.owner && fireLasers)
{
int weaponDamage2 = player.GetWeaponDamage(player.ActiveItem());
bool flag2 = player.channel && !player.noItems && !player.CCed;
if (flag2)
Item gatling = player.ActiveItem();
int weaponDamage2 = player.GetWeaponDamage(gatling);
bool flag2 = player.channel && !player.noItems && !player.CCed;
// This both checks if the player has sufficient mana and consumes it if they do.
// If this is false, the Gatling Laser stops functioning.
bool hasMana = player.CheckMana(gatling.mana, true, false);
if (flag2 && hasMana)
{
// Attempt to use power from the held item.
if (player.ActiveItem().type >= ItemID.Count &&
player.ActiveItem().Calamity().Chargeable &&
player.ActiveItem().Calamity().CurrentCharge > 0 &&
player.ActiveItem().Calamity().CurrentCharge > 0 &&
Main.rand.NextBool((int)(120 / (float)fireRate)))
{
player.ActiveItem().Calamity().CurrentCharge--;
}
float scaleFactor = player.ActiveItem().shootSpeed * projectile.scale;
Vector2 value2 = vector;
Vector2 value3 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - value2;
@@ -134,6 +138,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
player.itemTime = 2;
player.itemAnimation = 2;
player.itemRotation = (float)Math.Atan2(projectile.velocity.Y * projectile.direction, projectile.velocity.X * projectile.direction);
}
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB