-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Nick-NCSU/development
Development
- Loading branch information
Showing
10 changed files
with
761 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ChlorophyteBuff : ModBuff | ||
{ | ||
public override void SetDefaults() | ||
{ | ||
DisplayName.SetDefault("Chlorophyte Minion"); | ||
Description.SetDefault("The chlorophyte 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.ChlorophyteMinion>()] > 0) | ||
{ | ||
player.buffTime[buffIndex] = 18000; | ||
} | ||
else | ||
{ | ||
player.DelBuff(buffIndex); | ||
buffIndex--; | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ShroomiteStaff : ModItem | ||
{ | ||
public override void SetStaticDefaults() | ||
{ | ||
DisplayName.SetDefault("Shroomite Staff"); | ||
Tooltip.SetDefault("Summons a shroomite minion to fight for you."); | ||
ItemID.Sets.GamepadWholeScreenUseRange[item.type] = true; | ||
ItemID.Sets.LockOnIgnoresCollision[item.type] = true; | ||
} | ||
|
||
public override void SetDefaults() | ||
{ | ||
item.damage = 30; | ||
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.ShroomiteBuff>(); | ||
item.shoot = ModContent.ProjectileType<Projectiles.ShroomiteMinion>(); | ||
} | ||
|
||
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.ChlorophyteBar, 9); | ||
recipe.AddIngredient(ItemID.TurtleShell, 1); | ||
recipe.AddTile(TileID.MythrilAnvil); | ||
recipe.SetResult(this); | ||
recipe.AddRecipe(); | ||
} | ||
} | ||
} |
Oops, something went wrong.