Fixed damage typing for Rainbow Demon.

Cleaned up code.
This commit is contained in:
Big Duckie
2022-07-05 19:59:05 -06:00
parent 148d1fc728
commit 387174adf0
6 changed files with 53 additions and 48 deletions
@@ -17,6 +17,7 @@ public class TheRainbowDemonThrowing : ModItem
public override void SetDefaults()
{
Item.damage = 82;
Item.DamageType = DamageClass.Throwing;
Item.noMelee = true;
Item.width = 82;
Item.height = 39;
@@ -44,19 +45,19 @@ public class TheRainbowDemonThrowing : ModItem
int numberProjectiles = 10;
for (int i = 0; i < numberProjectiles; i++)
{
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(30f));
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI);
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(30f));
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddRecipeGroup("FabusMod:TheRainbowDemon", 1);
val.AddIngredient(ItemID.FragmentSolar, 1);
val.AddIngredient(ItemID.FragmentVortex, 1);
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
val.Register();
CreateRecipe()
.AddRecipeGroup("FabusMod:TheRainbowDemon")
.AddIngredient(ItemID.FragmentSolar)
.AddIngredient(ItemID.FragmentVortex)
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
.Register();
}
}