Merge branch 'master' into weapons
This commit is contained in:
commit
eed28817d5
4 files changed
+30
-20
No files matched your search
@@ -1,3 +1,6 @@
|
||||
# manually added cronscript
|
||||
cronpull.sh
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
*.csproj
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 42;
|
||||
item.damage = 52;
|
||||
item.ranged = true;
|
||||
item.width = 64;
|
||||
item.height = 32;
|
||||
@@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 4.5f;
|
||||
item.value = Item.buyPrice(1, 20, 0, 0);
|
||||
item.rare = 10;
|
||||
item.value = CalamityGlobalItem.Rarity12BuyPrice;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.UseSound = SoundID.Item36;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ProjectileID.PurificationPowder;
|
||||
@@ -42,14 +42,20 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
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 SpeedX = speedX + Main.rand.Next(-25, 26) * 0.05f;
|
||||
float SpeedY = speedY + Main.rand.Next(-25, 26) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX * 0.9f, SpeedY * 0.9f, ProjectileID.BlackBolt, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
|
||||
// Fire the Onyx Shard that is characteristic of the Onyx Blaster
|
||||
// The shard deals 250% damage and double knockback
|
||||
int shardDamage = (int)(2.5f * damage);
|
||||
float shardKB = 2f * knockBack;
|
||||
Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f);
|
||||
Projectile shard = Projectile.NewProjectileDirect(position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
shard.timeLeft = (int)(shard.timeLeft * 1.25f);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float SpeedNewX = speedX + Main.rand.Next(-45, 46) * 0.05f;
|
||||
float SpeedNewY = speedY + Main.rand.Next(-45, 46) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedNewX, SpeedNewY, type, (int)(damage * 1.25f), knockBack, player.whoAmI, 0f, 0f);
|
||||
offset = new Vector2(Main.rand.Next(-45, 46) * 0.05f, Main.rand.Next(-45, 46) * 0.05f);
|
||||
Projectile.NewProjectile(position, velocity + offset, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.noMelee = true;
|
||||
item.knockBack = 4.5f;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = 10;
|
||||
item.rare = ItemRarityID.Red;
|
||||
item.UseSound = SoundID.Item36;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ProjectileID.PurificationPowder; // wait why
|
||||
@@ -46,24 +46,24 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
|
||||
// Fire the Onyx Shard that is characteristic of the Onyx Blaster
|
||||
// The shard deals triple damage and double knockback
|
||||
int shardDamage = (int)(2.5 * damage);
|
||||
// The shard deals 250% damage and double knockback
|
||||
int shardDamage = (int)(2.5f * damage);
|
||||
float shardKB = 2f * knockBack;
|
||||
float shardVelocityX = (speedX + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
float shardVelocityY = (speedY + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
Projectile shard = Projectile.NewProjectileDirect(position, velocity, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
shard.timeLeft = (int)(shard.timeLeft * 1.4f);
|
||||
|
||||
// Fire three symmetric pairs of bullets alongside it
|
||||
Vector2 baseVelocity = new Vector2(speedX, speedY);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
float randAngle = Main.rand.NextFloat(0.035f);
|
||||
float randVelMultiplier = Main.rand.NextFloat(0.92f, 1.08f);
|
||||
Vector2 left = baseVelocity.RotatedBy(-randAngle) * randVelMultiplier;
|
||||
Vector2 right = baseVelocity.RotatedBy(randAngle) * randVelMultiplier;
|
||||
Projectile.NewProjectile(position.X, position.Y, left.X, left.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position.X, position.Y, right.X, right.Y, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Vector2 ccwVelocity = velocity.RotatedBy(-randAngle) * randVelMultiplier;
|
||||
Vector2 cwVelocity = velocity.RotatedBy(randAngle) * randVelMultiplier;
|
||||
Projectile.NewProjectile(position, ccwVelocity, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position, cwVelocity, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4056,6 +4056,7 @@ namespace CalamityMod.NPCs
|
||||
if (calamityGlobalNPC.newAI[1] >= newPhaseTimer)
|
||||
{
|
||||
calamityGlobalNPC.newAI[1] = 0f;
|
||||
calamityGlobalNPC.newAI[2] = 1f;
|
||||
calamityGlobalNPC.newAI[3] = 1f;
|
||||
npc.ai[0] = 0f;
|
||||
npc.ai[1] = 0f;
|
||||
|
||||
Reference in new issue
Block a user