Skip to content

Commit

Permalink
Merge pull request #1 from Nick-NCSU/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Nick-NCSU authored Oct 30, 2021
2 parents b891eea + 1601016 commit 304c81d
Show file tree
Hide file tree
Showing 29 changed files with 1,071 additions and 3 deletions.
Binary file modified .vs/DubNation/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/DubNation/v16/.suo
Binary file not shown.
32 changes: 32 additions & 0 deletions Buffs/GoldBuff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Buffs
{
public class GoldBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Gold Minion");
Description.SetDefault("The gold minion will fight for you");
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
if (player.ownedProjectileCounts[ModContent.ProjectileType<Projectiles.GoldMinion>()] > 0)
{
player.buffTime[buffIndex] = 18000;
}
else
{
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
}
Binary file added Buffs/GoldBuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions Buffs/MeteoriteBuff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Buffs
{
public class MeteoriteBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Meteorite Minion");
Description.SetDefault("The meteorite minion will fight for you");
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
if (player.ownedProjectileCounts[ModContent.ProjectileType<Projectiles.MeteoriteMinion>()] > 0)
{
player.buffTime[buffIndex] = 18000;
}
else
{
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
}
Binary file added Buffs/MeteoriteBuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions Buffs/PlatinumBuff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Buffs
{
public class PlatinumBuff : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Platinum Minion");
Description.SetDefault("The platinum minion will fight for you");
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}

public override void Update(Player player, ref int buffIndex)
{
if (player.ownedProjectileCounts[ModContent.ProjectileType<Projectiles.PlatinumMinion>()] > 0)
{
player.buffTime[buffIndex] = 18000;
}
else
{
player.DelBuff(buffIndex);
buffIndex--;
}
}
}
}
Binary file added Buffs/PlatinumBuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions Items/GoldStaff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Items
{
class GoldStaff : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gold Staff");
Tooltip.SetDefault("Summons a gold minion to fight for you.");
ItemID.Sets.GamepadWholeScreenUseRange[item.type] = true;
ItemID.Sets.LockOnIgnoresCollision[item.type] = true;
}

public override void SetDefaults()
{
item.damage = 8;
item.width = 40;
item.height = 40;
item.useTime = 36;
item.useAnimation = 36;
item.useStyle = ItemUseStyleID.SwingThrow;
item.value = 10;
item.rare = ItemRarityID.Blue;
item.UseSound = SoundID.Item1;
item.mana = 10;
item.noMelee = true;
item.summon = true;
item.buffType = ModContent.BuffType<Buffs.GoldBuff>();
item.shoot = ModContent.ProjectileType<Projectiles.GoldMinion>();
}

public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
player.AddBuff(item.buffType, 2);
position = Main.MouseWorld;
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.GoldBar, 8);
recipe.AddIngredient(ItemID.PiggyBank, 1);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
53 changes: 53 additions & 0 deletions Items/MeteoriteStaff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Items
{
class MeteoriteStaff : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Meteorite Staff");
Tooltip.SetDefault("Summons a meteorite minion to fight for you.\nThe minion will follow your cursor and inflict On Fire! on enemies they touch.");
ItemID.Sets.GamepadWholeScreenUseRange[item.type] = true;
ItemID.Sets.LockOnIgnoresCollision[item.type] = true;
}

public override void SetDefaults()
{
item.damage = 34;
item.width = 40;
item.height = 40;
item.useTime = 36;
item.useAnimation = 36;
item.useStyle = ItemUseStyleID.SwingThrow;
item.value = 10;
item.rare = ItemRarityID.Blue;
item.UseSound = SoundID.Item1;
item.mana = 10;
item.noMelee = true;
item.summon = true;
item.buffType = ModContent.BuffType<Buffs.MeteoriteBuff>();
item.shoot = ModContent.ProjectileType<Projectiles.MeteoriteMinion>();
}

public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
player.AddBuff(item.buffType, 2);
position = Main.MouseWorld;
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MeteoriteBar, 18);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
54 changes: 54 additions & 0 deletions Items/PlatinumStaff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DubNation.Items
{
class PlatinumStaff : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Platinum Staff");
Tooltip.SetDefault("Summons a platinum minion to fight for you.");
ItemID.Sets.GamepadWholeScreenUseRange[item.type] = true;
ItemID.Sets.LockOnIgnoresCollision[item.type] = true;
}

public override void SetDefaults()
{
item.damage = 8;
item.width = 40;
item.height = 40;
item.useTime = 36;
item.useAnimation = 36;
item.useStyle = ItemUseStyleID.SwingThrow;
item.value = 10;
item.rare = ItemRarityID.Blue;
item.UseSound = SoundID.Item1;
item.mana = 10;
item.noMelee = true;
item.summon = true;
item.buffType = ModContent.BuffType<Buffs.PlatinumBuff>();
item.shoot = ModContent.ProjectileType<Projectiles.PlatinumMinion>();
}

public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
player.AddBuff(item.buffType, 2);
position = Main.MouseWorld;
return true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.PlatinumBar, 8);
recipe.AddIngredient(ItemID.PiggyBank, 1);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Loading

0 comments on commit 304c81d

Please sign in to comment.