Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Graphics;
- using Terraria;
- using Terraria.Localization;
- using Terraria.ModLoader;
- using Terraria.ID;
- using static Terraria.ModLoader.ModContent;
- namespace Skyanull
- {
- public class ItemTweaks : GlobalItem
- {
- public override void SetDefaults(Item item)
- {
- {
- const string GladiatorSet = "skyanull_gladiator";
- const string ObsidianSet = "skyanull_obsidian";
- switch (item.type)
- {
- case ItemID.GladiatorHelmet:
- {
- item.rare = 1;
- item.defense = 4;
- }
- return;
- case ItemID.GladiatorBreastplate:
- {
- item.rare = 1;
- item.defense = 6;
- }
- return;
- case ItemID.GladiatorLeggings:
- {
- item.rare = 1;
- item.defense = 4;
- }
- return;
- case ItemID.ObsidianHelm:
- {
- item.rare = 1;
- item.defense = 3;
- }
- return;
- case ItemID.ObsidianShirt:
- {
- item.rare = 1;
- }
- return;
- case ItemID.ObsidianPants:
- {
- item.rare = 1;
- }
- return;
- }
- }
- }
- public override void UpdateEquip(Item item, Player player)
- {
- switch (item.type)
- {
- case ItemID.GladiatorHelmet:
- case ItemID.GladiatorBreastplate:
- case ItemID.GladiatorLeggings:
- player.meleeDamage += 0.05f;
- player.meleeSpeed += 0.04f;
- return;
- case ItemID.ObsidianHelm:
- case ItemID.ObsidianShirt:
- case ItemID.ObsidianPants:
- player.bulletDamage += 0.04f;
- player.rangedCrit += 3;
- return;
- case ItemID.MeteorHelmet:
- case ItemID.MeteorSuit:
- case ItemID.MeteorLeggings:
- player.magicDamage -= 0.07f;
- return;
- }
- }
- public override string IsArmorSet(Item head, Item body, Item legs)
- {
- if (head.type == ItemID.GladiatorHelmet && body.type == ItemID.GladiatorBreastplate && legs.type == ItemID.GladiatorLeggings)
- return GladiatorSet;
- if (head.type == ItemID.ObsidianHelm && body.type == ItemID.ObsidianShirt && legs.type == ItemID.ObsidianPants)
- return ObsidianSet;
- return base.IsArmorSet(head, body, legs);
- }
- public override void UpdateArmorSet(Player player, string armorSet)
- {
- if (armorSet == GladiatorSet)
- {
- player.setBonus = ("Reduced knockback");
- knockbackResist = 0.5f;
- }
- else if (armorSet == ObsidianSet)
- {
- player.setBonus = ("Gives a chance to dodge attacks");
- player.blackBelt = true;
- }
- }
- public override void ArmorSetShadows(Player player, string armorSet)
- {
- if (armorSet == ObsidianSet)
- player.armorEffectDrawShadow = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement