Skip to content

Commit

Permalink
MM, stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
V2LenKagamine committed Jun 25, 2023
1 parent 796fc66 commit 66915d0
Show file tree
Hide file tree
Showing 45 changed files with 860 additions and 71 deletions.
Binary file modified .vs/LensRands/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/LensRands/v17/.futdcache.v2
Binary file not shown.
Binary file modified .vs/LensRands/v17/.suo
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/lensrands.metadata.v6.1
Binary file not shown.
Binary file modified .vs/ProjectEvaluation/lensrands.projects.v6.1
Binary file not shown.
Binary file added Assets/Buffs/Mutation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/CryoGel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/CursedGel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/IchorGel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/PoisonGel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/Savathun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Ammo/SavathunHM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Memes/HolyHandGrenade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Items/Placeables/MutationStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Projectiles/AsheDynamite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/Savathun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Projectiles/SavathunHM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Tiles/Furniture/MutationStationTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Assets/Tiles/Furniture/VendingMachineMisc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Common/DropRules/LensGlobalDrops.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using LensRands.Content.Items.Accessories;
using LensRands.Content.Items.Consumable;
using LensRands.Content.Items.Placeable;
Expand Down Expand Up @@ -64,6 +65,10 @@ public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<ThrowingKnife>(), 5));
}
if(npc.type == NPCID.SkeletronHead)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<MutationStation>(), 2));
}
}

public override void ModifyActiveShop(NPC npc, string shopName, Item[] items)
Expand All @@ -82,6 +87,16 @@ public override void ModifyActiveShop(NPC npc, string shopName, Item[] items)
}
}
}
public override void ModifyShop(NPCShop shop)
{
if (shop.NpcType == NPCID.ArmsDealer && shop.Name == "Shop")
{
if (!shop.TryGetEntry(ItemID.Gel, out _))
{
shop.InsertAfter(ItemID.MusketBall, ItemID.Gel);
}
}
}
public override void SetupTravelShop(int[] shop, ref int nextSlot)
{
int[] PossibleVendors = Mod.GetContent<Vendor>().Select(x => x.Type).ToArray();
Expand Down
69 changes: 69 additions & 0 deletions Content/Buffs/MutationBuffs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using LensRands.Systems;

namespace LensRands.Content.Buffs
{
public abstract class MutationBuffs : ModBuff
{
public override string Texture => LensRands.AssetsPath + "Buffs/Mutation";

public override void SetStaticDefaults()
{
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override bool RightClick(int buffIndex)
{
return false;
}
}
public class DeadInside : MutationBuffs
{
public override void Update(Player player, ref int buffIndex)
{
player.statLifeMax2 += player.statLifeMax / 2;
player.lifeRegen -= player.lifeRegen/2;
}
}
public class OpenWounds : MutationBuffs
{
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<LensPlayer>().OpenWoundsBuff = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.buffTime[buffIndex] % 10 == 0 && !npc.immortal)
{
if (npc.life != 1)
{
npc.life -= 1;
}
else
{
npc.StrikeInstantKill();
}
}
}
}
public class SlowingStrikes : MutationBuffs
{
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<LensPlayer>().SlowingStrikesBuff = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.velocity *= 0.95f;
}
}
public class AmmoDuplicator : MutationBuffs
{
public override void Update(Player player, ref int buffIndex)
{
player.GetModPlayer<LensPlayer>().AmmoDuplicatorBuff = true;
}
}
}
6 changes: 3 additions & 3 deletions Content/Items/Accessories/RORMisc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public class RoRPearl : RORBoss

public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statLifeMax2 += (int)(player.statLifeMax * (1f + PearlHealth));
player.statLifeMax2 += (int)(player.statLifeMax * PearlHealth);
}
}

Expand All @@ -177,8 +177,8 @@ public class IrradiantPearl : RORBoss

public override void UpdateAccessory(Player player, bool hideVisual)
{
player.statLifeMax2 += (int)(player.statLifeMax * (1f + PearlHealth));
player.statManaMax2 += (int)(player.statManaMax * (1f + PearlMana));
player.statLifeMax2 += (int)(player.statLifeMax * PearlHealth);
player.statManaMax2 += (int)(player.statManaMax * PearlMana);
player.statDefense *= 1f + PearlDefence;
player.moveSpeed *= 1f + PearlRunSpeed;
player.GetDamage(DamageClass.Generic) *= 1f + PearlDmg;
Expand Down
137 changes: 137 additions & 0 deletions Content/Items/Ammo/SavathunRounds.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
using System.Drawing;
using LensRands.LensUtils;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LensRands.Content.Items.Ammo
{
public class SavathunRounds : ModItem
{
public override string Texture => LensRands.AssetsPath + "Items/Ammo/Savathun";
public override void SetDefaults()//Craft silver bullets plus venom thing jungle
{
Item.damage = 9;
Item.DamageType = DamageClass.Ranged;
Item.width = 8;
Item.height = 8;
Item.maxStack = Item.CommonMaxStack;
Item.consumable = true;
Item.knockBack = 1.5f;
Item.value = 10;
Item.rare = ItemRarityID.Green;
Item.shoot = ModContent.ProjectileType<SavathunProjectile>();
Item.shootSpeed = 2f;
Item.ammo = AmmoID.Bullet;
}
public override void AddRecipes()
{
CreateRecipe(250)
.AddIngredient(ItemID.SilverBullet, 250)
.AddIngredient(ItemID.Stinger)
.AddTile(TileID.WorkBenches)
.Register();
CreateRecipe(250)
.AddIngredient(ItemID.TungstenBullet, 250)
.AddIngredient(ItemID.Stinger)
.AddTile(TileID.WorkBenches)
.Register();
}
}
public class SavathunProjectile : ModProjectile
{
public override string Texture => LensRands.AssetsPath + "Projectiles/Savathun";
private Vector3 color = new(0f,1f,0f);
public override void SetDefaults()
{
Projectile.width = 8;
Projectile.height = 8;
Projectile.friendly = true;
Projectile.hostile = false;
Projectile.DamageType = DamageClass.Ranged;
Projectile.penetrate = 1;
Projectile.ignoreWater = false;
Projectile.tileCollide = true;
Projectile.extraUpdates = 3;
Projectile.timeLeft = 1200;
Projectile.aiStyle = -1;
}
public override void AI()
{
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(90);
Lighting.AddLight(Projectile.Center, color * 0.25f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Poisoned, 300);
}
}
//Hm VARIANT BELOW
public class SavathunRoundsHM : ModItem
{
public override string Texture => LensRands.AssetsPath + "Items/Ammo/SavathunHM";
public override void SetDefaults()//Craft silver bullets plus venom thing jungle
{
Item.damage = 15;
Item.DamageType = DamageClass.Ranged;
Item.width = 8;
Item.height = 8;
Item.maxStack = Item.CommonMaxStack;
Item.consumable = true;
Item.knockBack = 1.5f;
Item.value = 10;
Item.rare = ItemRarityID.Purple;
Item.shoot = ModContent.ProjectileType<SavathunProjectileHM>();
Item.shootSpeed = 3f;
Item.ammo = AmmoID.Bullet;
}
public override void AddRecipes()
{
CreateRecipe(250)
.AddIngredient(ModContent.ItemType<SavathunRounds>(),250)
.AddIngredient(ItemID.SpiderFang)
.AddTile(TileID.WorkBenches)
.Register();
}
}
public class SavathunProjectileHM : ModProjectile
{
public override string Texture => LensRands.AssetsPath + "Projectiles/SavathunHM";
private Vector3 color = new(0.5f,0f,0.5f);
public override void SetDefaults()
{
Projectile.width = 8;
Projectile.height = 8;
Projectile.friendly = true;
Projectile.hostile = false;
Projectile.DamageType = DamageClass.Ranged;
Projectile.penetrate = 2;
Projectile.ignoreWater = false;
Projectile.tileCollide = true;
Projectile.extraUpdates = 4;
Projectile.timeLeft = 1600;
Projectile.aiStyle = -1;
}
public override void AI()
{
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(90);
Lighting.AddLight(Projectile.Center, color * 0.75f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Venom, 300);
if (!target.active)
{
LensVisualUtils.BombVisuals(Projectile.Center, 150, 150);
Projectile.damage = (int)(Projectile.damage * 1.2f);
Projectile.tileCollide = false;
Projectile.penetrate = -1;
Projectile.alpha = 255;
Projectile.Resize(150, 150);
Projectile.timeLeft = 3;
Projectile.velocity = Vector2.Zero;
}
}
}
}
Loading

0 comments on commit 66915d0

Please sign in to comment.