Skip to content

Commit

Permalink
1.4.4 STABLE Upload
Browse files Browse the repository at this point in the history
Yes
  • Loading branch information
V2LenKagamine committed Jul 3, 2023
1 parent 66915d0 commit 4b45452
Show file tree
Hide file tree
Showing 76 changed files with 1,823 additions and 157 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/Items/Accessories/ManaWell.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/Accessories/Purity.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/Accessories/ShapedGlass.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/Accessories/StoneFlux.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/Accessories/WormGear.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/Martian.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/MartianArrow.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/Consumable/BossfightSpecial.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/Consumable/Overheal/Greater.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/Consumable/Overheal/Lesser.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/Consumable/Overheal/Normal.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/Consumable/Overheal/Super.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/Misc/LeshyCamera.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/Misc/LeshyCard.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/Weapons/Flowers/CursedFlower.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/Weapons/Flowers/IchorFlower.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/Weapons/Flowers/RainbowFlower.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/Flowers/Cursed.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/Flowers/Ichor.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/Flowers/Rainbow.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/IceSpear.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/LeshyCam.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/Martian.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/VendingMachineFishing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 32 additions & 38 deletions Common/DropRules/LensGlobalDrops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using LensRands.Content.Items.Weapons;
using LensRands.Systems;
using Terraria;
using Terraria.Enums;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;
Expand All @@ -18,54 +17,49 @@ public class LensGlobalDrops : GlobalNPC
{
public override void ModifyGlobalLoot(GlobalLoot globalLoot)
{
if (Main.hardMode) {
globalLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateWhite>(), 250));
globalLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateGreen>(), 500));
globalLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateRed>(), 750));
}

globalLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(),ModContent.ItemType<RoRCrateWhite>(), 500));
globalLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(),ModContent.ItemType<RoRCrateGreen>(), 1000));
globalLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(),ModContent.ItemType<RoRCrateRed>(), 1500));
globalLoot.Add(ItemDropRule.Common(ModContent.ItemType<LunarCoin>(), 500));
globalLoot.Add(ItemDropRule.Common(ModContent.ItemType<LunarPod>(), 1000));
}
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
{
if (Main.hardMode)
if (npc.type == NPCID.Golem)
{
if (npc.type == NPCID.Golem)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<HalcyonSeed>(), 10));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<TitanicKnurl>(), 10));
}
if(npc.type == NPCID.SkeletronPrime) { npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3)); }
if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism)
{
LeadingConditionRule leadingConditionRule = new LeadingConditionRule(new Conditions.MissingTwin());
leadingConditionRule.OnSuccess(npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<EmpathyCores>(), 15)));
leadingConditionRule.OnSuccess(npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3)));
npcLoot.Add(leadingConditionRule);
}
if(npc.type == NPCID.TheDestroyer)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<ChargedPerforator>(), 10));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3));
}
if (npc.boss)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateWhite>(), 2));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateGreen>(), 4));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRCrateRed>(), 16));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RoRPearl>(), 100));
}
if (npc.type == NPCID.VoodooDemon) { npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<RpgLauncher>(), 100)); }
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<HalcyonSeed>(), 10));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<TitanicKnurl>(), 10));
}
if (npc.type == NPCID.SkeletronPrime) { npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3)); }
if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism)
{
LeadingConditionRule leadingConditionRule = new LeadingConditionRule(new Conditions.MissingTwin());
leadingConditionRule.OnSuccess(npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<EmpathyCores>(), 15)));
leadingConditionRule.OnSuccess(npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3)));
npcLoot.Add(leadingConditionRule);
}
if(npc.type == NPCID.QueenBee) { npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<QueensGland>(), 10)); }
if(npc.boss)
if (npc.type == NPCID.TheDestroyer)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<ChargedPerforator>(), 10));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PAIStaff>(), 3));
}
if (npc.boss)
{
npcLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(),ModContent.ItemType<RoRCrateWhite>(), 2));
npcLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(), ModContent.ItemType<RoRCrateGreen>(), 4));
npcLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(), ModContent.ItemType<RoRCrateRed>(), 16));
npcLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(), ModContent.ItemType<RoRPearl>(), 100));
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<LunarPod>(), 10));
}
if (npc.type == NPCID.VoodooDemon) { npcLoot.Add(ItemDropRule.ByCondition(new Conditions.IsHardmode(), ModContent.ItemType<RpgLauncher>(), 100)); }

if (npc.type == NPCID.QueenBee) { npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<QueensGland>(), 10)); }
if (npc.type == NPCID.WallofFlesh)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<ThrowingKnife>(), 5));
}
if(npc.type == NPCID.SkeletronHead)
if (npc.type == NPCID.SkeletronHead)
{
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<MutationStation>(), 2));
}
Expand Down Expand Up @@ -100,9 +94,9 @@ public override void ModifyShop(NPCShop shop)
public override void SetupTravelShop(int[] shop, ref int nextSlot)
{
int[] PossibleVendors = Mod.GetContent<Vendor>().Select(x => x.Type).ToArray();
if (Main.rand.NextBool())
if (!Main.rand.NextBool(4))
{
shop[nextSlot] = PossibleVendors[Main.rand.Next(PossibleVendors.Count())];
shop[nextSlot] = PossibleVendors[Main.rand.Next(PossibleVendors.Length)];
nextSlot++;
}
}
Expand Down
28 changes: 28 additions & 0 deletions Content/Buffs/MartianShock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ModLoader;

namespace LensRands.Content.Buffs
{
public class MartianShock : ModBuff
{
public override string Texture => LensRands.AssetsPath + "Buffs/StunProbed";
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.lifeRegen > 0)
{
npc.lifeRegen = 0;
}
npc.lifeRegen -= 40;
}
}
}
12 changes: 3 additions & 9 deletions Content/Buffs/MutationBuffs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ public override void Update(Player player, ref int buffIndex)
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.buffTime[buffIndex] % 10 == 0 && !npc.immortal)
if (npc.lifeRegen > 0)
{
if (npc.life != 1)
{
npc.life -= 1;
}
else
{
npc.StrikeInstantKill();
}
npc.lifeRegen = 0;
}
npc.lifeRegen -= 12;
}
}
public class SlowingStrikes : MutationBuffs
Expand Down
4 changes: 2 additions & 2 deletions Content/Items/Accessories/Carrier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LensRands.Content.Items.Accessories
public class Carrier : ModItem
{
public override string Texture => LensRands.AssetsPath + "Items/Accessories/Carrier";
public static readonly int AmmoChance = 10;
public static readonly int AmmoChance = 20;

public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoChance);

Expand Down Expand Up @@ -40,7 +40,7 @@ public override void UpdateAccessory(Player player, bool hideVisual)
public class CarrierPrime : ModItem
{
public override string Texture => LensRands.AssetsPath + "Items/Accessories/CarrierPrime";
public static readonly int AmmoChance = 25;
public static readonly int AmmoChance = 40;
public static readonly int DamageAddRanged = 5;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoChance,DamageAddRanged);

Expand Down
7 changes: 2 additions & 5 deletions Content/Items/Accessories/EndlessMunitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<EndlessMunitions2>())
.AddIngredient(ItemID.RangerEmblem)
.AddIngredient(ItemID.SoulofFright,15)
.AddIngredient(ItemID.SoulofMight, 15)
.AddIngredient(ItemID.SoulofSight, 15)
.AddIngredient(ItemID.AvengerEmblem)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
Expand All @@ -85,7 +82,7 @@ public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<EndlessMunitions4>())
.AddIngredient(ItemID.LunarBar,15)
.AddIngredient(ItemID.LunarBar,5)
.AddIngredient(ItemID.FragmentVortex,15)
.AddTile(TileID.TinkerersWorkbench)
.Register();
Expand Down
113 changes: 113 additions & 0 deletions Content/Items/Accessories/ManaWell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LensRands.Systems;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria;

namespace LensRands.Content.Items.Accessories
{
public abstract class ManaWell : ModItem
{
public abstract float damageMod { get; }
public override string Texture => LensRands.AssetsPath + "Items/Accessories/ManaWell";

public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((int)(damageMod * 100));
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.rare = ItemRarityID.Red;
Item.accessory = true;
Item.value = Item.buyPrice(0, 2, 50, 0);
}
public override void UpdateEquip(Player player)
{
player.GetModPlayer<LensPlayer>().ManaWellOn = true;
player.GetDamage(DamageClass.Magic) += damageMod;
player.manaCost *= 0;

}
}
public class ManaWell1 : ManaWell
{
public override float damageMod => -0.3f;
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ItemID.FallenStar, 50)
.AddIngredient(ItemID.LesserManaPotion,50)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
public class ManaWell2 : ManaWell
{
public override float damageMod => -0.2f;
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ManaWell1>())
.AddIngredient(ItemID.Bone, 50)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
public class ManaWell3 : ManaWell
{
public override float damageMod => -0.1f;
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ManaWell2>())
.AddIngredient(ItemID.AvengerEmblem)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
public class ManaWell4 : ManaWell
{
public override float damageMod => 0f;
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ManaWell3>())
.AddIngredient(ItemID.MagnetSphere)
.AddIngredient(ItemID.DestroyerEmblem)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
public class ManaWell5 : ManaWell
{
public override float damageMod => 0.1f;
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ManaWell4>())
.AddIngredient(ItemID.LunarBar, 5)
.AddIngredient(ItemID.FragmentNebula, 15)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
public class ManaWell6 : ManaWell
{
public override float damageMod => 0.2f;
public override void AddRecipes()
{
if (ModLoader.TryGetMod("CalamityMod", out Mod calamity) && calamity.TryFind("DarksunFragment", out ModItem moditem))
{
CreateRecipe()
.AddIngredient(ModContent.ItemType<ManaWell5>())
.AddIngredient(moditem, 20)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
}
}
}
37 changes: 37 additions & 0 deletions Content/Items/Accessories/MasterWormGear.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;

namespace LensRands.Content.Items.Accessories
{
public class MasterWormGear : ModItem
{
public float damagemod => 0.17f;
public override string Texture => LensRands.AssetsPath + "Items/Accessories/WormGear";
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((int)(damagemod * 100));
public override void SetDefaults()
{
Item.width = 32;
Item.height = 32;
Item.rare = ItemRarityID.Expert;
Item.accessory = true;
Item.value = Item.sellPrice(0, 12, 50, 0);
}
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ItemID.MasterNinjaGear)
.AddIngredient(ItemID.WormScarf)
.AddTile(TileID.TinkerersWorkbench)
.Register();
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.blackBelt = true;
player.dashType = 1;
player.spikedBoots = 2;
player.endurance += damagemod;
}
}
}
2 changes: 1 addition & 1 deletion Content/Items/Accessories/RORGreens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override void SetDefaults()
Item.height = 32;
Item.rare = ItemRarityID.Green;
Item.accessory = true;
Item.value = Item.buyPrice(0, 20, 0, 0);
Item.value = Item.sellPrice(0, 20, 0, 0);
}
}
public class Ukelele : RORGreens
Expand Down
Loading

0 comments on commit 4b45452

Please sign in to comment.