Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
@@ -14,6 +14,7 @@ using CalamityMod.Items.DifficultyItems;
|
||||
using CalamityMod.Items.Fishing;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
|
||||
using CalamityMod.Items.Fishing.SulphurCatches;
|
||||
using CalamityMod.Items.Fishing.SunkenSeaCatches;
|
||||
using CalamityMod.Items.Fishing.FishingRods;
|
||||
using CalamityMod.Items.Mounts;
|
||||
@@ -367,6 +368,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool oldDie = false;
|
||||
public bool ursaSergeant = false;
|
||||
public bool thiefsDime = false;
|
||||
public bool dynamoStemCells = false;
|
||||
//public bool dukeScales = false;
|
||||
public bool sandWaifu = false;
|
||||
public bool sandBoobWaifu = false;
|
||||
@@ -1064,6 +1066,7 @@ namespace CalamityMod.CalPlayer
|
||||
oldDie = false;
|
||||
ursaSergeant = false;
|
||||
thiefsDime = false;
|
||||
dynamoStemCells = false;
|
||||
//dukeScales = false;
|
||||
|
||||
daedalusReflect = false;
|
||||
@@ -7603,6 +7606,10 @@ namespace CalamityMod.CalPlayer
|
||||
abyssPosX = true;
|
||||
}
|
||||
}
|
||||
if (ZoneAbyss || ZoneSulphur)
|
||||
{
|
||||
abyssPosX = true;
|
||||
}
|
||||
|
||||
if (alluringBait)
|
||||
{
|
||||
@@ -7827,6 +7834,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
biomeCrateList.Add(ModContent.ItemType<SunkenCrate>());
|
||||
}
|
||||
if (abyssPosX)
|
||||
{
|
||||
biomeCrateList.Add(ModContent.ItemType<AbyssalCrate>());
|
||||
}
|
||||
if (player.ZoneCorrupt)
|
||||
{
|
||||
biomeCrateList.Add(ItemID.CorruptFishingCrate);
|
||||
@@ -8065,6 +8076,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (power >= 60 && player.FindBuffIndex(BuffID.Gills) > -1 && NPC.downedPlantBoss && Main.rand.NextBool(25) && power < 160)
|
||||
{
|
||||
caughtType = ModContent.ItemType<Floodtide>();
|
||||
}
|
||||
|
||||
if (junk)
|
||||
{
|
||||
if (abyssPosX && power < 40)
|
||||
@@ -8094,54 +8110,58 @@ namespace CalamityMod.CalPlayer
|
||||
return;
|
||||
}*/
|
||||
|
||||
if (power >= 20)
|
||||
if (abyssPosX)
|
||||
{
|
||||
if (power >= 40)
|
||||
if (caughtType == ItemID.WoodenCrate)
|
||||
{
|
||||
if (abyssPosX && Main.rand.NextBool(15) && power < 80)
|
||||
caughtType = ItemID.WoodenCrate;
|
||||
}
|
||||
else if (caughtType == ItemID.IronCrate)
|
||||
{
|
||||
caughtType = ItemID.IronCrate;
|
||||
}
|
||||
else if (caughtType == ItemID.GoldenCrate)
|
||||
{
|
||||
caughtType = ItemID.GoldenCrate;
|
||||
}
|
||||
else if (caughtType == ItemID.FrogLeg)
|
||||
{
|
||||
caughtType = ItemID.FrogLeg;
|
||||
}
|
||||
else if (caughtType == ItemID.BalloonPufferfish)
|
||||
{
|
||||
caughtType = ItemID.BalloonPufferfish;
|
||||
}
|
||||
else if (caughtType == ItemID.ZephyrFish)
|
||||
{
|
||||
caughtType = ItemID.ZephyrFish;
|
||||
}
|
||||
else if (power >= 40)
|
||||
{
|
||||
if (Main.rand.NextBool(15) && power < 80)
|
||||
{
|
||||
caughtType = ModContent.ItemType<PlantyMush>();
|
||||
}
|
||||
if (power >= 60)
|
||||
if (Main.rand.NextBool(25) && power < 160)
|
||||
{
|
||||
if (player.FindBuffIndex(BuffID.Gills) > -1 && NPC.downedPlantBoss && Main.rand.NextBool(25) && power < 160)
|
||||
caughtType = ModContent.ItemType<AlluringBait>();
|
||||
}
|
||||
if (power >= 110)
|
||||
{
|
||||
if (abyssPosX && Main.rand.NextBool(25) && power < 240)
|
||||
{
|
||||
caughtType = ModContent.ItemType<Floodtide>();
|
||||
}
|
||||
if (abyssPosX && Main.rand.NextBool(25) && power < 160)
|
||||
{
|
||||
caughtType = ModContent.ItemType<AlluringBait>();
|
||||
}
|
||||
if (power >= 80)
|
||||
{
|
||||
if (abyssPosX && Main.hardMode && Main.rand.NextBool(15) && power < 210)
|
||||
{
|
||||
switch (Main.rand.Next(4))
|
||||
{
|
||||
case 0:
|
||||
caughtType = ModContent.ItemType<IronBoots>();
|
||||
break; //movement acc
|
||||
case 1:
|
||||
caughtType = ModContent.ItemType<DepthCharm>();
|
||||
break; //regen acc
|
||||
case 2:
|
||||
caughtType = ModContent.ItemType<AnechoicPlating>();
|
||||
break; //defense acc
|
||||
case 3:
|
||||
caughtType = ModContent.ItemType<StrangeOrb>();
|
||||
break; //light pet
|
||||
}
|
||||
}
|
||||
if (power >= 110)
|
||||
{
|
||||
if (abyssPosX && Main.rand.NextBool(25) && power < 240)
|
||||
{
|
||||
caughtType = ModContent.ItemType<AbyssalAmulet>();
|
||||
}
|
||||
}
|
||||
caughtType = ModContent.ItemType<AbyssalAmulet>();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player.cratePotion && Main.rand.NextBool(5)) //20%
|
||||
{
|
||||
caughtType = ModContent.ItemType<AbyssalCrate>();
|
||||
}
|
||||
else if (!player.cratePotion && Main.rand.NextBool(10)) //10%
|
||||
{
|
||||
caughtType = ModContent.ItemType<AbyssalCrate>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10439,7 +10459,8 @@ namespace CalamityMod.CalPlayer
|
||||
player.armorEffectDrawShadow = false;
|
||||
player.armorEffectDrawShadowSubtle = false;
|
||||
}
|
||||
if (CalamityWorld.ironHeart && !Main.gameMenu)
|
||||
|
||||
if (CalamityWorld.ironHeart && !Main.gameMenu)
|
||||
{
|
||||
Texture2D ironHeart = ModContent.GetTexture("CalamityMod/ExtraTextures/IronHeart");
|
||||
Main.heartTexture = Main.heart2Texture = ironHeart;
|
||||
@@ -10450,37 +10471,35 @@ namespace CalamityMod.CalPlayer
|
||||
Texture2D heart4 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart4");
|
||||
Texture2D heart5 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart5");
|
||||
Texture2D heart6 = ModContent.GetTexture("CalamityMod/ExtraTextures/Heart6");
|
||||
Texture2D heartOriginal = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal"); //Life fruit
|
||||
Texture2D heartOriginal2 = ModContent.GetTexture("CalamityMod/ExtraTextures/HeartOriginal2"); //Life crystal
|
||||
Texture2D heartOriginal = ModContent.GetTexture("Terraria/Heart2"); //Life fruit
|
||||
Texture2D heartOriginal2 = ModContent.GetTexture("Terraria/Heart"); //Life crystal
|
||||
|
||||
int totalFruit =
|
||||
(mFruit ? 1 : 0) +
|
||||
(bOrange ? 1 : 0) +
|
||||
(eBerry ? 1 : 0) +
|
||||
(dFruit ? 1 : 0);
|
||||
|
||||
switch (totalFruit)
|
||||
{
|
||||
default:
|
||||
Main.heart2Texture = heartOriginal;
|
||||
Main.heartTexture = heartOriginal2;
|
||||
break;
|
||||
case 4:
|
||||
Main.heart2Texture = heart6;
|
||||
Main.heartTexture = heartOriginal2;
|
||||
break;
|
||||
case 3:
|
||||
Main.heart2Texture = heart5;
|
||||
Main.heartTexture = heartOriginal2;
|
||||
break;
|
||||
case 2:
|
||||
Main.heart2Texture = heart4;
|
||||
Main.heartTexture = heartOriginal2;
|
||||
break;
|
||||
case 1:
|
||||
Main.heart2Texture = heart3;
|
||||
Main.heartTexture = heartOriginal2;
|
||||
break;
|
||||
}
|
||||
|
||||
Main.heartTexture = heartOriginal2;
|
||||
}
|
||||
if (revivify)
|
||||
{
|
||||
@@ -10973,7 +10992,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Penumbra Potion provides 10% stealth regen while moving, 20% at night and 30% during an eclipse
|
||||
if (penumbra)
|
||||
{
|
||||
if (Main.eclipse)
|
||||
if (Main.eclipse || umbraphileSet)
|
||||
stealthGenMoving += 0.3f;
|
||||
else if (!Main.dayTime)
|
||||
stealthGenMoving += 0.2f;
|
||||
|
||||
@@ -1764,6 +1764,7 @@ namespace CalamityMod
|
||||
ModContent.ItemType<SpearofDestiny>(),
|
||||
ModContent.ItemType<SpearofPaleolith>(),
|
||||
ModContent.ItemType<XerocPitchfork>(),
|
||||
ModContent.ItemType<ProfanedPartisan>()
|
||||
};
|
||||
|
||||
daggerList = new List<int>()
|
||||
@@ -1808,6 +1809,7 @@ namespace CalamityMod
|
||||
|
||||
spikyBallList = new List<int>() //There's more to come
|
||||
{
|
||||
ModContent.ItemType<GodsParanoia>(),
|
||||
ModContent.ItemType<HellsSun>(),
|
||||
ModContent.ItemType<SkyStabber>()
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace CalamityMod.Items.Accessories
|
||||
recipe.AddIngredient(ModContent.ItemType<Laudanum>());
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 5);
|
||||
recipe.AddIngredient(ItemID.Nanites, 250);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DynamoStemCells : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Dynamo Stem Cells");
|
||||
Tooltip.SetDefault(@"15% increased movement speed
|
||||
Ranged weapons have a chance to fire miniature birbs");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 4));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.accessory = true;
|
||||
item.expert = true;
|
||||
item.rare = 10;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().dynamoStemCells = true;
|
||||
player.moveSpeed += 0.15f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.Calamity().throwingCrit += 6;
|
||||
}
|
||||
|
||||
/*public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 14);
|
||||
@@ -40,6 +40,6 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ namespace CalamityMod.Items.Armor
|
||||
modPlayer.rogueStealthMax += 1.15f;
|
||||
player.setBonus = "Rogue weapons have a chance to create explosions on hit\n" +
|
||||
"Stealth strikes always create an explosion\n" +
|
||||
"Penumbra potions always build stealth at max effectiveness\n" +
|
||||
"Rogue stealth builds while not attacking and not moving, up to a max of 115\n" +
|
||||
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
|
||||
"Rogue stealth only reduces when you attack, it does not reduce while moving\n" +
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor
|
||||
player.Calamity().throwingCrit += 10;
|
||||
}
|
||||
|
||||
/*public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 18);
|
||||
@@ -37,6 +37,6 @@ namespace CalamityMod.Items.Armor
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,6 +286,16 @@ namespace CalamityMod.Items
|
||||
}
|
||||
}
|
||||
}
|
||||
if (player.Calamity().dynamoStemCells)
|
||||
{
|
||||
if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 80)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, ModContent.ProjectileType<Minibirb>(), (int)((double)damage * 2), 2f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
{
|
||||
public class AbyssalCrate : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Abyssal Crate");
|
||||
Tooltip.SetDefault("{$CommonItemTooltip.RightClickToOpen}");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.maxStack = 999;
|
||||
item.consumable = true;
|
||||
item.width = 32;
|
||||
item.height = 32;
|
||||
item.rare = 2;
|
||||
item.value = Item.sellPrice(gold: 1);
|
||||
item.createTile = ModContent.TileType<AbyssalCrateTile>();
|
||||
item.useTurn = true;
|
||||
item.autoReuse = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.useStyle = 1;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
//Modded materials
|
||||
DropHelper.DropItem(player, ItemID.Starfish, 2, 3);
|
||||
DropHelper.DropItem(player, ItemID.Seashell, 2, 3);
|
||||
DropHelper.DropItem(player, ItemID.Coral, 2, 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<CloakingGland>(), 0.5f, 2, 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<VictoryShard>(), 0.5f, 2, 3);
|
||||
if (NPC.downedPlantBoss || CalamityWorld.downedCalamitas)
|
||||
{
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<DepthCells>(), 0.5f, 5, 10);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<Lumenite>(), 0.5f, 5, 10);
|
||||
}
|
||||
if (NPC.downedGolemBoss)
|
||||
{
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<CruptixBar>(), 0.25f, 5, 10);
|
||||
}
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<ReaperTooth>(), 0.25f, 5, 10);
|
||||
}
|
||||
|
||||
// Equipment
|
||||
DropHelper.DropItemFromSetCondition(player, Main.hardMode, 0.2f,
|
||||
ModContent.ItemType<StrangeOrb>(),
|
||||
ModContent.ItemType<DepthCharm>(),
|
||||
ModContent.ItemType<IronBoots>(),
|
||||
ModContent.ItemType<AnechoicPlating>());
|
||||
|
||||
//Bait
|
||||
DropHelper.DropItemChance(player, ItemID.MasterBait, 10, 1, 2);
|
||||
DropHelper.DropItemChance(player, ItemID.JourneymanBait, 5, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.ApprenticeBait, 3, 2, 3);
|
||||
|
||||
//Potions
|
||||
DropHelper.DropItemChance(player, ItemID.ObsidianSkinPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.SwiftnessPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.IronskinPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.NightOwlPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.ShinePotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.MiningPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.HeartreachPotion, 10, 1, 3);
|
||||
DropHelper.DropItemChance(player, ItemID.TrapsightPotion, 10, 1, 3); //Dangersense Potion
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<AnechoicCoating>(), 10, 1, 3);
|
||||
if (Main.hardMode)
|
||||
{
|
||||
DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.GreaterHealingPotion: ItemID.GreaterManaPotion, 5, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
DropHelper.DropItem(player, Main.rand.Next(100) >= 49 ? ItemID.HealingPotion : ItemID.ManaPotion, 5, 10);
|
||||
}
|
||||
|
||||
//Money
|
||||
DropHelper.DropItem(player, ItemID.SilverCoin, 10, 90);
|
||||
DropHelper.DropItemChance(player, ItemID.GoldCoin, 0.5f, 1, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Materials
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 3;
|
||||
item.value = Item.sellPrice(silver: 80);
|
||||
item.rare = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Materials
|
||||
item.height = 32;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.sellPrice(silver: 16);
|
||||
item.rare = 8;
|
||||
item.rare = 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,8 @@ namespace CalamityMod.Items.Materials
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.sellPrice(silver: 36);
|
||||
item.rare = 3;
|
||||
item.value = Item.sellPrice(silver: 80);
|
||||
item.rare = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Materials
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.maxStack = 999;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 3;
|
||||
item.value = Item.sellPrice(silver: 80);
|
||||
item.rare = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Potions
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.BottledWater);
|
||||
recipe.AddIngredient(ModContent.ItemType<CalamityDust>(), 3);
|
||||
recipe.AddIngredient(ModContent.ItemType<SolarVeil>(), 3);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment, 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<EssenceofChaos>());
|
||||
recipe.AddTile(TileID.AlchemyTable);
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Potions
|
||||
recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.BottledWater);
|
||||
recipe.AddIngredient(ModContent.ItemType<BloodOrb>(), 30);
|
||||
recipe.AddIngredient(ItemID.LunarTabletFragment);
|
||||
recipe.AddIngredient(ModContent.ItemType<SolarVeil>());
|
||||
recipe.AddTile(TileID.AlchemyTable);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.NPCs.Bumblebirb;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
@@ -47,6 +48,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<Swordsplosion>(), DropHelper.RareVariantDropRateInt);
|
||||
|
||||
// Equipment
|
||||
DropHelper.DropItem(player, ModContent.ItemType<DynamoStemCells>());
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<RedLightningContainer>(), CalamityWorld.revenge);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public class GodsParanoia : RogueWeapon
|
||||
{
|
||||
private static int damage = 250;
|
||||
private static int knockBack = 5;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("God's Paranoia");
|
||||
Tooltip.SetDefault(@"Shoots a speedy homing spiky ball. Stacks up to 10.
|
||||
Attaches to enemies and summons localized storm of god slayer kunai
|
||||
Stealth strikes home in faster and summon kunai at a faster rate
|
||||
Right click to delete all existing spiky balls");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = damage;
|
||||
item.Calamity().rogue = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.width = 1;
|
||||
item.height = 1;
|
||||
item.useTime = 15;
|
||||
item.useAnimation = 15;
|
||||
item.useStyle = 1;
|
||||
item.knockBack = knockBack;
|
||||
item.value = Item.buyPrice(0, 18, 0, 0);
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 14;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.maxStack = 10;
|
||||
|
||||
item.shootSpeed = 5f;
|
||||
item.shoot = ModContent.ProjectileType<GodsParanoiaProj>();
|
||||
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
if (player.ownedProjectileCounts[item.shoot] > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int UseMax = item.stack - 1;
|
||||
|
||||
if (player.ownedProjectileCounts[item.shoot] > UseMax)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.killSpikyBalls = false;
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
modPlayer.killSpikyBalls = true;
|
||||
return false;
|
||||
}
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
recipe.AddIngredient(ItemID.SpikyBall, 200);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 2);
|
||||
recipe.AddIngredient(ModContent.ItemType<NightmareFuel>(), 2);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 485 B |
@@ -0,0 +1,71 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
//TODO -- Add a proper tooltip and balance the weapon, set Stealth Strike to true and what not
|
||||
//(aka add a shoot method cuz it doesnt have it [holy shit this is so bad and outdated])
|
||||
public class ProfanedPartisan : RogueWeapon
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Partisan");
|
||||
Tooltip.SetDefault(@"Fires an unholy spear that explodes on death
|
||||
Stealth strikes spawn smaller spears to fly along side it");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 1500;
|
||||
item.knockBack = 8f;
|
||||
item.crit += 15;
|
||||
|
||||
item.width = 56;
|
||||
item.height = 56;
|
||||
item.useStyle = 1;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.useTime = 15;
|
||||
item.useAnimation = 15;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.rare = 10;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
item.Calamity().rogue = true;
|
||||
|
||||
item.autoReuse = true;
|
||||
item.shootSpeed = 6f;
|
||||
item.shoot = ModContent.ProjectileType<ProfanedPartisanproj>();
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
||||
{
|
||||
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<CrystalPiercer>(), 200);
|
||||
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 6);
|
||||
recipe.AddIngredient(ModContent.ItemType<DivineGeode>(), 4);
|
||||
recipe.AddIngredient(ModContent.ItemType <UnholyEssence>(), 25);
|
||||
recipe.AddTile(TileID.LunarCraftingStation);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -48,7 +48,7 @@ Stealth strikes leak tar as they fly");
|
||||
return true;
|
||||
}
|
||||
|
||||
/*public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.MolotovCocktail, 50);
|
||||
@@ -58,6 +58,6 @@ Stealth strikes leak tar as they fly");
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -945,7 +945,7 @@ namespace CalamityMod.NPCs
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.6);
|
||||
}
|
||||
|
||||
if (Main.bloodMoon && NPC.downedMoonlord && !npc.boss && !npc.friendly && !npc.dontTakeDamage && npc.lifeMax <= 2000)
|
||||
if (Main.bloodMoon && NPC.downedMoonlord && !npc.boss && !npc.friendly && !npc.dontTakeDamage && npc.lifeMax <= 2000 && npc.damage > 0)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 3.5);
|
||||
npc.damage += 100;
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.Crags
|
||||
{
|
||||
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType<EssenceofChaos>());
|
||||
}
|
||||
//DropHelper.DropItemChance(npc, ModContent.ItemType<GaelsGreatsword>(), CalamityWorld.defiled ? 0.05f : 0.02f);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<GaelsGreatsword>(), CalamityWorld.defiled ? 0.05f : 0.02f);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.Crags
|
||||
{
|
||||
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType<EssenceofChaos>());
|
||||
}
|
||||
//DropHelper.DropItemChance(npc, ModContent.ItemType<GaelsGreatsword>(), CalamityWorld.defiled ? 0.05f : 0.02f);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<GaelsGreatsword>(), CalamityWorld.defiled ? 0.05f : 0.02f);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
public class Minibirb : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Minibirb");
|
||||
Main.projFrames[projectile.type] = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 8;
|
||||
projectile.height = 8;
|
||||
projectile.friendly = true;
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.light = 0.25f;
|
||||
projectile.extraUpdates = 1;
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Collision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height);
|
||||
Main.PlaySound(3, (int)projectile.position.X, (int)projectile.position.Y, 51, 1f, 0f);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
Main.PlaySound(3, (int)projectile.position.X, (int)projectile.position.Y, 51, 1f, 0f);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 4)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame > 1)
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
if (Main.rand.Next(5) == 0)
|
||||
{
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 244, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
||||
}
|
||||
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? MathHelper.Pi : 0f);
|
||||
|
||||
float pcx = projectile.Center.X;
|
||||
float pcy = projectile.Center.Y;
|
||||
float var1 = 800f;
|
||||
bool flag = false;
|
||||
for (int npcvar = 0; npcvar < 200; npcvar++)
|
||||
{
|
||||
if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1))
|
||||
{
|
||||
float var2 = Main.npc[npcvar].position.X + (Main.npc[npcvar].width / 2);
|
||||
float var3 = Main.npc[npcvar].position.Y + (Main.npc[npcvar].height / 2);
|
||||
float var4 = Math.Abs(projectile.position.X + (projectile.width / 2) - var2) + Math.Abs(projectile.position.Y + (projectile.height / 2) - var3);
|
||||
if (var4 < var1)
|
||||
{
|
||||
var1 = var4;
|
||||
pcx = var2;
|
||||
pcy = var3;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
float homingstrenght = 10f;
|
||||
Vector2 vector1 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
|
||||
float var6 = pcx - vector1.X;
|
||||
float var7 = pcy - vector1.Y;
|
||||
float var8 = (float)Math.Sqrt(var6 * var6 + var7 * var7);
|
||||
var8 = homingstrenght / var8;
|
||||
var6 *= var8;
|
||||
var7 *= var8;
|
||||
projectile.velocity.X = (projectile.velocity.X * 20f + var6) / 21f;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * 20f + var7) / 21f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,106 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
public class GodsParanoiaDart : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Kunai");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 6;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.aiStyle = 27;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
projectile.rotation = projectile.velocity.ToRotation() + (MathHelper.Pi / 2);
|
||||
|
||||
projectile.velocity.X *= 1.025f;
|
||||
projectile.velocity.Y *= 1.025f;
|
||||
if (projectile.velocity.X > 12f)
|
||||
{
|
||||
projectile.velocity.X = 12f;
|
||||
}
|
||||
if (projectile.velocity.Y > 12f)
|
||||
{
|
||||
projectile.velocity.Y = 12f;
|
||||
}
|
||||
|
||||
int num822 = Dust.NewDust(projectile.position, projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num822];
|
||||
dust.velocity *= 0.1f;
|
||||
Main.dust[num822].scale = 1.3f;
|
||||
Main.dust[num822].noGravity = true;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
projectile.position = projectile.Center;
|
||||
projectile.width = projectile.height = 192;
|
||||
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
|
||||
projectile.maxPenetrate = -1;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
projectile.damage /= 2;
|
||||
projectile.Damage();
|
||||
for (int num621 = 0; num621 < 2; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 5; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
Main.dust[num624].scale = 0.5f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num624].scale = 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
if (projectile.timeLeft > 595)
|
||||
return false;
|
||||
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 518 B |
@@ -0,0 +1,247 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
public class GodsParanoiaProj : ModProjectile
|
||||
{
|
||||
public int kunaiStabbing = 12;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("God's Paranoia");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 6;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 15;
|
||||
projectile.height = 15;
|
||||
projectile.friendly = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, 0.35f, 0f, 0.25f);
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num137 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), 1, 1, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 0.5f);
|
||||
Main.dust[num137].alpha = projectile.alpha;
|
||||
Main.dust[num137].velocity *= 0f;
|
||||
Main.dust[num137].noGravity = true;
|
||||
}
|
||||
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
kunaiStabbing += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
kunaiStabbing++;
|
||||
}
|
||||
if (kunaiStabbing >= 20)
|
||||
{
|
||||
kunaiStabbing = 0;
|
||||
float startOffsetX = Main.rand.NextFloat(100f, 200f) * (Main.rand.NextBool() ? -1f : 1f);
|
||||
float startOffsetY = Main.rand.NextFloat(100f, 200f) * (Main.rand.NextBool() ? -1f : 1f);
|
||||
Vector2 startPos = new Vector2(projectile.position.X + startOffsetX, projectile.position.Y + startOffsetY);
|
||||
float dx = projectile.position.X - startPos.X;
|
||||
float dy = projectile.position.Y - startPos.Y;
|
||||
|
||||
// Add some randomness / inaccuracy
|
||||
dx += Main.rand.NextFloat(-5f, 5f);
|
||||
dy += Main.rand.NextFloat(-5f, 5f);
|
||||
float speed = Main.rand.NextFloat(20f, 25f);
|
||||
float dist = (float)Math.Sqrt((double)(dx * dx + dy * dy));
|
||||
dist = speed / dist;
|
||||
dx *= dist;
|
||||
dy *= dist;
|
||||
Vector2 kunaiSp = new Vector2(dx, dy);
|
||||
float angle = Main.rand.NextFloat(MathHelper.TwoPi);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int idx = Projectile.NewProjectile(startPos, kunaiSp, ModContent.ProjectileType<GodsParanoiaDart>(), projectile.damage, 1f, projectile.owner, 0f, 0f);
|
||||
Main.projectile[idx].rotation = angle;
|
||||
}
|
||||
}
|
||||
}
|
||||
int num988 = 15;
|
||||
bool flag55 = false;
|
||||
float[] var_2_2CB4E_cp_0 = projectile.localAI;
|
||||
int var_2_2CB4E_cp_1 = 0;
|
||||
float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1];
|
||||
var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f;
|
||||
if (projectile.localAI[0] % 30f == 0f)
|
||||
{
|
||||
flag55 = true;
|
||||
}
|
||||
int num989 = (int)projectile.ai[1];
|
||||
if ((projectile.localAI[0] <= (float)(60 * num988)) && (num989 > 0 || num989 <= 200) && Main.npc[num989].active && !Main.npc[num989].dontTakeDamage)
|
||||
{
|
||||
projectile.Center = Main.npc[num989].Center - projectile.velocity * 2f;
|
||||
projectile.gfxOffY = Main.npc[num989].gfxOffY;
|
||||
if (flag55)
|
||||
{
|
||||
Main.npc[num989].HitEffect(0, 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.rotation += 0.2f * (float)projectile.direction;
|
||||
float pcx = projectile.Center.X;
|
||||
float pcy = projectile.Center.Y;
|
||||
float var1 = 800f;
|
||||
bool flag = false;
|
||||
for (int npcvar = 0; npcvar < 200; npcvar++)
|
||||
{
|
||||
if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1))
|
||||
{
|
||||
float var2 = Main.npc[npcvar].position.X + (Main.npc[npcvar].width / 2);
|
||||
float var3 = Main.npc[npcvar].position.Y + (Main.npc[npcvar].height / 2);
|
||||
float var4 = Math.Abs(projectile.position.X + (projectile.width / 2) - var2) + Math.Abs(projectile.position.Y + (projectile.height / 2) - var3);
|
||||
if (var4 < var1)
|
||||
{
|
||||
var1 = var4;
|
||||
pcx = var2;
|
||||
pcy = var3;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
float homingstrenght = (projectile.Calamity().stealthStrike ? 14f : 7f);
|
||||
Vector2 vector1 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
|
||||
float var6 = pcx - vector1.X;
|
||||
float var7 = pcy - vector1.Y;
|
||||
float var8 = (float)Math.Sqrt(var6 * var6 + var7 * var7);
|
||||
var8 = homingstrenght / var8;
|
||||
var6 *= var8;
|
||||
var7 *= var8;
|
||||
projectile.velocity.X = (projectile.velocity.X * 20f + var6) / 21f;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * 20f + var7) / 21f;
|
||||
}
|
||||
}
|
||||
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.killSpikyBalls == true)
|
||||
{
|
||||
projectile.active = false;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage &&
|
||||
((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) ||
|
||||
(projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1))
|
||||
{
|
||||
if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i]))
|
||||
{
|
||||
bool flag3;
|
||||
if (Main.npc[i].type == 414)
|
||||
{
|
||||
Rectangle rect = Main.npc[i].getRect();
|
||||
int num5 = 8;
|
||||
rect.X -= num5;
|
||||
rect.Y -= num5;
|
||||
rect.Width += num5 * 2;
|
||||
rect.Height += num5 * 2;
|
||||
flag3 = projectile.Colliding(myRect, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
flag3 = projectile.Colliding(myRect, Main.npc[i].getRect());
|
||||
}
|
||||
if (flag3)
|
||||
{
|
||||
if (Main.npc[i].reflectingProjectiles && projectile.CanReflect())
|
||||
{
|
||||
Main.npc[i].ReflectProjectile(projectile.whoAmI);
|
||||
return;
|
||||
}
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.ai[1] = (float)i;
|
||||
projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f;
|
||||
projectile.netUpdate = true;
|
||||
projectile.StatusNPC(i);
|
||||
int num28 = 10;
|
||||
Point[] array2 = new Point[num28];
|
||||
int num29 = 0;
|
||||
for (int l = 0; l < 1000; l++)
|
||||
{
|
||||
if (l != projectile.whoAmI && Main.projectile[l].active && Main.projectile[l].owner == Main.myPlayer && Main.projectile[l].type == projectile.type && Main.projectile[l].ai[0] == 1f && Main.projectile[l].ai[1] == (float)i)
|
||||
{
|
||||
array2[num29++] = new Point(l, Main.projectile[l].timeLeft);
|
||||
if (num29 >= array2.Length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num29 >= array2.Length)
|
||||
{
|
||||
int num30 = 0;
|
||||
for (int m = 1; m < array2.Length; m++)
|
||||
{
|
||||
if (array2[m].Y < array2[num30].Y)
|
||||
{
|
||||
num30 = m;
|
||||
}
|
||||
}
|
||||
Main.projectile[array2[num30].X].Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (targetHitbox.Width > 8 && targetHitbox.Height > 8)
|
||||
{
|
||||
targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 485 B |
@@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
speed.Normalize();
|
||||
speed *= ((float)Main.rand.Next(30, 61) * 0.1f) * 2f;
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speed.X, speed.Y, mod.ProjectileType("LuminousShard"), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speed.X, speed.Y, ModContent.ProjectileType<LuminousShard>(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
//TODO -- Make the dust from the explosion not look like ass, reduce timeleft if neccesary
|
||||
public class PartisanExplosion : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Explosion");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 100;
|
||||
projectile.height = 100;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.friendly = true;
|
||||
projectile.timeLeft = 10;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
float speedx = Main.rand.NextFloat(-0.9f, 0.9f);
|
||||
float speedy = Main.rand.NextFloat(-0.9f, 0.9f);
|
||||
int d = Dust.NewDust(projectile.position, 33, 33, 244, speedx, speedy, 120, default(Color), 2.6f);
|
||||
Main.dust[d].position = projectile.Center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 423 B |
@@ -0,0 +1,113 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
//TODO -- The stealth strike got changed so everything relating to that can go die, dust is ass here too
|
||||
public class ProfanedPartisanproj : ModProjectile
|
||||
{
|
||||
public int stealthStrikeTimer = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Partisan");
|
||||
ProjectileID.Sets.TrailCacheLength[projectile.type] = 6;
|
||||
ProjectileID.Sets.TrailingMode[projectile.type] = 0;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 20;
|
||||
projectile.height = 20;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = 5;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.extraUpdates = 3;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.ai[0] < 0.4f)
|
||||
{
|
||||
projectile.ai[0] += 0.1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
projectile.tileCollide = true;
|
||||
}
|
||||
|
||||
//Backwards projectile fix
|
||||
projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt();
|
||||
projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi);
|
||||
//Rotating 45 degrees if shooting right
|
||||
if (projectile.spriteDirection == 1)
|
||||
{
|
||||
projectile.rotation += MathHelper.ToRadians(45f);
|
||||
drawOffsetX = -26;
|
||||
drawOriginOffsetX = 13;
|
||||
drawOriginOffsetY = 2;
|
||||
}
|
||||
//Rotating 45 degrees if shooting right
|
||||
if (projectile.spriteDirection == -1)
|
||||
{
|
||||
projectile.rotation -= MathHelper.ToRadians(45f);
|
||||
drawOffsetX = 2;
|
||||
drawOriginOffsetX = -13;
|
||||
drawOriginOffsetY = 2;
|
||||
}
|
||||
|
||||
if (Main.rand.Next(3) == 0)
|
||||
{
|
||||
int d = Dust.NewDust(projectile.position, projectile.width, projectile.height, 244, projectile.velocity.X, projectile.velocity.Y, 100, default(Color), 1.1f);
|
||||
Main.dust[d].position = projectile.Center;
|
||||
Main.dust[d].velocity *= 0.3f;
|
||||
Main.dust[d].velocity += projectile.velocity * 0.85f;
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, 1f, 0.8f, 0.2f);
|
||||
|
||||
if (projectile.Calamity().stealthStrike) //Stealth strike
|
||||
{
|
||||
Vector2 spearposition = new Vector2(projectile.Center.X + Main.rand.NextFloat(-15f, 15f), projectile.Center.Y + Main.rand.NextFloat(-15f, 15f));
|
||||
Vector2 spearspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y);
|
||||
stealthStrikeTimer++;
|
||||
if (stealthStrikeTimer >= 18)
|
||||
{
|
||||
Projectile.NewProjectile(spearposition, spearspeed, ModContent.ProjectileType<ProfanedPartisanspear>(), projectile.damage/2, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
stealthStrikeTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
Dust.NewDust(projectile.position, projectile.width, projectile.height, 244, 0f, 0f, 50, default(Color), 2.6f);
|
||||
}
|
||||
Main.PlaySound(2, projectile.position, 45);
|
||||
Vector2 explode = new Vector2(0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center, explode, ModContent.ProjectileType<PartisanExplosion>(), projectile.damage, projectile.knockBack * 1.3f, projectile.owner);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,124 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
//TODO -- This projectile literally does nothing so have fun
|
||||
public class ProfanedPartisanspear : ModProjectile
|
||||
{
|
||||
public int timer = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Spear");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.extraUpdates = 3;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.timeLeft = 600;
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
if (projectile.ai[1] != 1f)
|
||||
{
|
||||
if (projectile.velocity.X != oldVelocity.X)
|
||||
{
|
||||
projectile.velocity.X = -oldVelocity.X;
|
||||
}
|
||||
if (projectile.velocity.Y != oldVelocity.Y)
|
||||
{
|
||||
projectile.velocity.Y = -oldVelocity.Y;
|
||||
}
|
||||
projectile.ai[1] = 1f;
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.extraUpdates = 2;
|
||||
if (projectile.timeLeft > 280)
|
||||
projectile.timeLeft = 280;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
|
||||
if (projectile.ai[1] != 1f)
|
||||
{
|
||||
projectile.velocity.X = -projectile.velocity.X;
|
||||
projectile.velocity.Y = -projectile.velocity.Y;
|
||||
projectile.ai[1] = 1f;
|
||||
projectile.ai[0] = 1f;
|
||||
projectile.extraUpdates = 2;
|
||||
if (projectile.timeLeft > 280)
|
||||
projectile.timeLeft = 280;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
if (projectile.ai[0] == 1f)
|
||||
timer++;
|
||||
if (timer >= 5)
|
||||
projectile.penetrate = 1;
|
||||
float pcx = projectile.Center.X;
|
||||
float pcy = projectile.Center.Y;
|
||||
if (timer >= 10)
|
||||
{
|
||||
float var1 = 800f;
|
||||
bool flag = false;
|
||||
for (int npcvar = 0; npcvar < 200; npcvar++)
|
||||
{
|
||||
if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1))
|
||||
{
|
||||
float var2 = Main.npc[npcvar].position.X + (Main.npc[npcvar].width / 2);
|
||||
float var3 = Main.npc[npcvar].position.Y + (Main.npc[npcvar].height / 2);
|
||||
float var4 = Math.Abs(projectile.position.X + (projectile.width / 2) - var2) + Math.Abs(projectile.position.Y + (projectile.height / 2) - var3);
|
||||
if (var4 < var1)
|
||||
{
|
||||
var1 = var4;
|
||||
pcx = var2;
|
||||
pcy = var3;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
float homingstrenght = 7f;
|
||||
Vector2 vector1 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
|
||||
float var6 = pcx - vector1.X;
|
||||
float var7 = pcy - vector1.Y;
|
||||
float var8 = (float)Math.Sqrt(var6 * var6 + var7 * var7);
|
||||
var8 = homingstrenght / var8;
|
||||
var6 *= var8;
|
||||
var7 *= var8;
|
||||
projectile.velocity.X = (projectile.velocity.X * 20f + var6) / 21f;
|
||||
projectile.velocity.Y = (projectile.velocity.Y * 20f + var7) / 21f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
Texture2D tex = Main.projectileTexture[projectile.type];
|
||||
spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 707 B |
@@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
projectile.aiStyle = 68;
|
||||
projectile.timeLeft = 180;
|
||||
projectile.Calamity().rogue = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Sounds.Item
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume * 1.85f;
|
||||
soundInstance.Volume = volume * 1.1f;
|
||||
soundInstance.Pan = pan;
|
||||
soundInstance.Pitch = (float)Main.rand.Next(-25, 26) * 0.01f;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Fishing.SulphurCatches;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class AbyssalCrateTile : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolidTop[Type] = true;
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileTable[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.addTile(Type);
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Abyssal Crate");
|
||||
AddMapEntry(new Color(47, 79, 79), name); //dark slate gray
|
||||
dustType = 33;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
type = 44;
|
||||
}
|
||||
else
|
||||
{
|
||||
type = 33;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
||||
{
|
||||
Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType<AbyssalCrate>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 703 B |
@@ -149,9 +149,13 @@ namespace CalamityMod.Tiles
|
||||
}
|
||||
}
|
||||
|
||||
public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem)
|
||||
public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem)
|
||||
{
|
||||
if (Main.tile[i, j].type != ModContent.TileType<LumenylCrystals>() && Main.tile[i, j].type != ModContent.TileType<SeaPrismCrystals>() && Main.tileSolid[Main.tile[i, j].type])
|
||||
// TODO -- holy shit THAT IS NOT HOW YOU NULL CHECK OH MY GOD THIS EXPLAINS EVERYTHING
|
||||
if(Main.tile[i,j] is null)
|
||||
return;
|
||||
|
||||
if (Main.tile[i, j].type != ModContent.TileType<LumenylCrystals>() && Main.tile[i, j].type != ModContent.TileType<SeaPrismCrystals>() && Main.tileSolid[Main.tile[i, j].type])
|
||||
{
|
||||
if (Main.tile[i + 1, j] != null)
|
||||
{
|
||||
|
||||