Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
This commit is contained in:
commit
e3902cd326
68 files changed
+266
-22
No files matched your search
+8
-1
@@ -303,7 +303,14 @@ namespace CalamityMod
|
||||
// Centralizing hair dye shaders like this seems absurdly stiff
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<AdrenalineHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<RageHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<WingTimeHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(139, 205, 255), ((float)player.wingTime / (float)player.wingTimeMax))));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<WingTimeHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) =>
|
||||
{
|
||||
float flightTimeInterpolant = player.wingTime / player.wingTimeMax;
|
||||
if (player.mount.Active)
|
||||
flightTimeInterpolant = 1f;
|
||||
|
||||
return Color.Lerp(player.hairColor, new Color(139, 205, 255), flightTimeInterpolant);
|
||||
}));
|
||||
GameShaders.Hair.BindShader(ModContent.ItemType<StealthHairDye>(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(186, 85, 211), (player.Calamity().rogueStealth / player.Calamity().rogueStealthMax))));
|
||||
|
||||
PopupGUIManager.LoadGUIs();
|
||||
|
||||
@@ -116,6 +116,11 @@ namespace CalamityMod.Effects
|
||||
GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"] = new MiscShaderData(new Ref<Effect>(AdditiveFusableParticleEdgeShader), "ParticlePass");
|
||||
|
||||
GameShaders.Misc["CalamityMod:DoGPortal"] = new MiscShaderData(new Ref<Effect>(DoGPortalShader), "ScreenPass");
|
||||
|
||||
//A little experimenting courtesy of looking at how slr does it.
|
||||
var screenRef = new Ref<Effect>(CalamityMod.Instance.Assets.Request<Effect>("Effects/SpreadTelegraph", AssetRequestMode.ImmediateLoad).Value);
|
||||
Filters.Scene["SpreadTelegraph"] = new Filter(new ScreenShaderData(screenRef, "TelegraphPass"), EffectPriority.High);
|
||||
Filters.Scene["SpreadTelegraph"].Load();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!--Should fonts be compiled. => | true | false |-->
|
||||
<add key="CompileFonts" value="false" />
|
||||
<!--Should materials be compiled seperately, or included with the model. => | true | false |-->
|
||||
<add key="CompileMaterialsSeperate" value="false" />
|
||||
<!--Should textures be compiled. => | true | false |-->
|
||||
<add key="CompileTextures" value="true" />
|
||||
<!--Should pngs be ignored when compiling textures. => | true | false |-->
|
||||
<add key="IgnorePng" value="true" />
|
||||
<!--Target profile options. => | HiDef | Reach |-->
|
||||
<add key="TargetProfile" value="HiDef" />
|
||||
<!--Compress output options. => | true | false |-->
|
||||
<add key="CompressOutput" value="false" />
|
||||
<!--Full path to input folder. Default => | default |-->
|
||||
<add key="InputDirectory" value="default" />
|
||||
<!--Full path to intermediate folder. Default => | default |-->
|
||||
<!--Note: This in unimportant.-->
|
||||
<add key="IntermediateDirectory" value="default" />
|
||||
<!--Full path to output folder. Default => | default |-->
|
||||
<add key="OutputDirectory" value="default" />
|
||||
<!--Should files be rebuilt if an xnb already exists. => | true | false |-->
|
||||
<!--Warning: If this is disabled content will not be rebuilt even if the xnb is out-of-date-->
|
||||
<add key="RebuildAll" value="true" />
|
||||
<!--Scale multiplier for compiled models. Default => | 1f |-->
|
||||
<add key="ModelScale" value="1.0" />
|
||||
<!--Should the vertex winding order be swapped for compiled models. Default => | false |-->
|
||||
<add key="ModelSwapWindingOrder" value="false" />
|
||||
<!--Should tangents be generated for compiled models. Default => | false |-->
|
||||
<!--Note: Will increase file size, but is needed for normal/bump mapping.-->
|
||||
<add key="ModelGenerateTangentFrames" value="false" />
|
||||
<!--Should the output be shader bytecode (.fxc file) instead of compiling it into a xnb. Default => | false |-->
|
||||
<add key="OutputEffectBytecode" value="false" />
|
||||
<!--The file extension for the output file type, the default for some is xnc since terraria prevents the loading of most .xnb files-->
|
||||
<!--Note: Include the period-->
|
||||
<add key="EffectExtension" value=".xnb" />
|
||||
<add key="FontExtension" value=".xnb" />
|
||||
<add key="TextureExtension" value=".xnc" />
|
||||
<add key="ModelExtension" value=".xnc" />
|
||||
<add key="MaterialExtension" value=".xnc" />
|
||||
</appSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,91 @@
|
||||
float3 edgeColor;
|
||||
float3 centerColor;
|
||||
|
||||
float edgeBlendLenght;
|
||||
float edgeBlendStrength;
|
||||
|
||||
float mainOpacity;
|
||||
float centerOpacity;
|
||||
float halfSpreadAngle;
|
||||
|
||||
texture sampleTexture;
|
||||
sampler2D Texture1Sampler = sampler_state { texture = <sampleTexture>; magfilter = LINEAR; minfilter = LINEAR; mipfilter = LINEAR; AddressU = wrap; AddressV = wrap; };
|
||||
|
||||
|
||||
//I can't believe it has gotten down to this.
|
||||
float realCos(float value)
|
||||
{
|
||||
return sin(value + 1.57079);
|
||||
}
|
||||
|
||||
//Gets the distance of a plot from a line with a specified origin and angle
|
||||
float distanceFromLine(float2 origin, float angle, float2 plot)
|
||||
{
|
||||
return abs(realCos(angle) * (origin.y - plot.y) - sin(angle) * (origin.x - plot.x));
|
||||
}
|
||||
|
||||
//Gets the distance of a plot from a line with a specified origin and angle, but crops the line so it only expands towards the angle
|
||||
float distanceFromLineCropped(float2 origin, float angle, float2 plot, float plotAngle)
|
||||
{
|
||||
//If the angle between the line's angle and the plot's angle is less than 90° (aka , not BEHIND the half-line), return the distance from the line
|
||||
if (abs(angle - plotAngle) < 1.5707)
|
||||
return distanceFromLine(origin, angle, plot);
|
||||
|
||||
//If we are behind the line, just give the distance between the start point and the plot
|
||||
else
|
||||
return length(origin - plot);
|
||||
|
||||
}
|
||||
|
||||
|
||||
float4 main(float2 uv : TEXCOORD) : COLOR
|
||||
{
|
||||
//Set the uv's Y position to be only contained within the upper half of the texture, to mirror it around a horizontal axis
|
||||
if (uv.y > 0.5)
|
||||
uv.y = 1 - uv.y;
|
||||
|
||||
float2 mappedUv = float2(uv.x - 0.5, abs(uv.y - 0.5));
|
||||
|
||||
//get the length of the doubled distance, so that 0 = at the center of the sprite and 1 = at the very edge of the circle
|
||||
float distanceFromCenter = length(mappedUv) * 2;
|
||||
|
||||
//Crop the sprite into a circle
|
||||
if (distanceFromCenter > 1)
|
||||
return float4(0, 0, 0, 0);
|
||||
|
||||
//Grabs the angle (only as a positive angle, since it's a mirror image udnerneath.
|
||||
float angle = atan2(mappedUv.y, mappedUv.x);
|
||||
//Grabs the distance of the point from the edge line.
|
||||
float distanceFromLine = distanceFromLineCropped(float2(0, 0), halfSpreadAngle, mappedUv, angle);
|
||||
|
||||
//Grab the colors to blend the edge lines with.
|
||||
float3 colour = float3(0, 0, 0);
|
||||
float opacity = 0;
|
||||
//If we are inside the spread's radius.
|
||||
if (angle <= halfSpreadAngle)
|
||||
{
|
||||
colour = lerp(centerColor, edgeColor, pow(angle / halfSpreadAngle, 9));
|
||||
opacity = centerOpacity * pow(1 - distanceFromCenter, 2);
|
||||
}
|
||||
|
||||
//If we are further from the line than the edge's blending lenght, just don't even do the blending.
|
||||
if (distanceFromLine > edgeBlendLenght)
|
||||
return float4(colour * opacity * mainOpacity, opacity * mainOpacity);
|
||||
|
||||
//The higher this value is, the more we blend with the edge's opacity & color.
|
||||
float edgeBlendFactor = pow(1 - distanceFromLine / edgeBlendLenght, edgeBlendStrength);
|
||||
|
||||
colour = lerp(colour, edgeColor, edgeBlendFactor);
|
||||
opacity = lerp(opacity, 1 * pow(1 - distanceFromCenter, 3), edgeBlendFactor) * mainOpacity;
|
||||
|
||||
colour = colour * opacity;
|
||||
return float4(colour, opacity);
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TelegraphPass
|
||||
{
|
||||
PixelShader = compile ps_3_0 main();
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -111,6 +111,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.WorldGen.AttemptFossilShattering += PreventFossilShattering;
|
||||
IL.Terraria.Projectile.Damage += MakeTagDamageMultiplicative;
|
||||
On.Terraria.Player.GetPickaxeDamage += RemoveHellforgePickaxeRequirement;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC += ColorBlightedGel;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL.Terraria.NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
@@ -202,6 +203,7 @@ namespace CalamityMod.ILEditing
|
||||
IL.Terraria.WorldGen.AttemptFossilShattering -= PreventFossilShattering;
|
||||
IL.Terraria.Projectile.Damage -= MakeTagDamageMultiplicative;
|
||||
On.Terraria.Player.GetPickaxeDamage -= RemoveHellforgePickaxeRequirement;
|
||||
On.Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC -= ColorBlightedGel;
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
IL.Terraria.NPC.NPCLoot -= FixSplittingWormBannerDrops;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using System;
|
||||
@@ -367,7 +371,33 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Fix Chlorophyte Crystal Attacking Where it Shouldn't
|
||||
|
||||
// TODO -- Finish this
|
||||
#endregion Fix Chlorophyte Crystal Attacking Where it Shouldn't
|
||||
|
||||
#region Color Blighted Gel
|
||||
private static void ColorBlightedGel(On.Terraria.GameContent.ItemDropRules.CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex)
|
||||
{
|
||||
orig(npc, itemIndex);
|
||||
|
||||
Item item = Main.item[itemIndex];
|
||||
int itemID = item.type;
|
||||
bool colorWasChanged = false;
|
||||
|
||||
if (itemID == ModContent.ItemType<BlightedGel>() && npc.type == ModContent.NPCType<CrimulanBlightSlime>())
|
||||
{
|
||||
item.color = new Color(1f, 0f, 0.16f, 0.6f);
|
||||
colorWasChanged = true;
|
||||
}
|
||||
if (itemID == ItemID.SharkFin && npc.type == ModContent.NPCType<Mauler>())
|
||||
{
|
||||
item.color = new Color(151, 115, 57, 255);
|
||||
colorWasChanged = true;
|
||||
}
|
||||
|
||||
// Sync the color changes.
|
||||
if (colorWasChanged)
|
||||
NetMessage.SendData(MessageID.ItemTweaker, -1, -1, null, itemID, 1f);
|
||||
}
|
||||
#endregion Color Blighted Gel
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("One of the ancient relics\n" +
|
||||
"Increases flight time, movement speed and jump speed by 10%");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 8));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Only one sun can be active at once\n" +
|
||||
"Provides a moderate amount of light in the Abyss");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Equip in a vanity slot to change the cursor without dealing damage\n" +
|
||||
"These changes work in conjunction with the Rainbow Cursor");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Mana Burn deals damage over time relative to the intensity of the debuff\n" +
|
||||
"This debuff does not reduce your magic damage");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 7));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Halves enemy contact damage\n" +
|
||||
"When you take contact damage this effect has a 20 second cooldown");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("One of the ancient relics\n" +
|
||||
"Creates a rotating ice shield around you that damages and slows down enemies on contact");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"During the night the player has +15 defense\n" +
|
||||
"Both of these bonuses are granted during an eclipse");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 7));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"While healing, you take &% less damage\n" +
|
||||
"'Nanomachines, son.'");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Ranged weapons have a chance to fire mini swarmers
|
||||
Grants immunity to Dragon Fire and Electrified");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Being below 25% life grants 20 defense and 15% increased max movement speed and acceleration\n" +
|
||||
"Grants resistance against cold attacks");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Rage does not fade away when out of combat\n" +
|
||||
"Revengeance drop");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("The heart of the world\n" +
|
||||
"Summons all elementals to protect you");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 8));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Summons Howl to fight for you, Calcifer to light your way, and Turnip-Head to follow you around\n" +
|
||||
"Placing this accessory in vanity slots will summon the trio without the combat or exploration utilities");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"If you have the regenerative boost, a phantomic heart will occasionally materialise granting massive health regen\n" +
|
||||
"If you have the defensive boost, a phantomic bulwark will absorb 20% of the next projectile's damage that hits the bulwark, shattering it");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Summons an offensive guardian if you are wearing the tarragon summon set (or stronger), which boosts your summon damage and your minion slots\n" +
|
||||
"If you get hit, most of their effects will disappear for 5 seconds");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Transforms you into an emissary of the profaned goddess\n" +
|
||||
"This tooltip gets modified");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
return;
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"While Rage Mode is active, taking damage gives only half as much rage\n" +
|
||||
"Deal damage with Rage Mode to further empower your wrath\n");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"+100 max mana\n" +
|
||||
"Increases pickup range for mana stars");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 8));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Minions inflict holy flames and shadowflames on hit\n" +
|
||||
"Grants immunity to Shadowflame");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -22,6 +23,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"This cooldown is shared with all other dodges and reflects\n" +
|
||||
"Dashes leave homing scythes in your wake");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(8, 3));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Shade rains down when you are hit\n" +
|
||||
"Nearby enemies receive a variety of debuffs when you are hit");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(9, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Reduces the DoT effects of harmful debuffs inflicted on you\n" +
|
||||
"Thank you to all of my supporters who made this mod a reality");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 10));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"If this effect triggers you get a health regeneration boost for 5 seconds\n" +
|
||||
"If the same enemy projectile type hits you again you will resist its damage by 15%");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 10));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Increases max minions by 1 and minions inflict the Shadowflame debuff on enemies\n" +
|
||||
"Grants immunity to Shadowflame");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -29,6 +30,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"6.25% of the damage from enemy attacks is absorbed and converted into healing\n" +
|
||||
"Grants immunity to Armor Crunch");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 30));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Immunity to Electrified and you resist all electrical projectile and enemy damage\n" +
|
||||
"Enemy bullets do half damage to you and are reflected back at the enemy for 800% their original damage");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 16));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Accessories
|
||||
DisplayName.SetDefault("Unstable Granite Core");
|
||||
Tooltip.SetDefault("Three sparks are released on critical hits");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("Increases melee damage, true melee damage and melee speed the closer you are to enemies\n" +
|
||||
"Max boost is 20% increased melee damage, true melee damage and melee speed");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
"All melee attacks and projectiles inflict frostburn\n" +
|
||||
"Icicles rain down as you fly");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 3));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(120, 6.25f, 1f);
|
||||
}
|
||||
|
||||
|
||||
@@ -1785,10 +1785,10 @@ namespace CalamityMod.Items
|
||||
_ => prefix,
|
||||
};
|
||||
}
|
||||
else if (item.CountsAsClass<MeleeDamageClass>())
|
||||
else if (item.CountsAsClass<MeleeDamageClass>() || item.IsWhip())
|
||||
{
|
||||
// Yoyos, Flails, Spears, etc.
|
||||
if (item.channel || item.noMelee)
|
||||
if ((item.channel || item.noMelee) && !item.IsWhip())
|
||||
{
|
||||
prefix = reforgeTier switch
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Ascendant Spirit Essence");
|
||||
Tooltip.SetDefault("A catalyst of the highest caliber formed by fusing powerful souls");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Ashes of Annihilation");
|
||||
Tooltip.SetDefault("The smoldering essence of the Witch's wrath");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Materials
|
||||
SacrificeTotal = 25;
|
||||
DisplayName.SetDefault("Ashes of Calamity");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Materials
|
||||
SacrificeTotal = 25;
|
||||
DisplayName.SetDefault("Dark Plasma");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Darksun Fragment");
|
||||
Tooltip.SetDefault("An impacted crystal suffused with opposing celestial energies");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 8));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Effulgent Feather");
|
||||
Tooltip.SetDefault("It vibrates with fluffy golden energy");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(3, 11));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -22,5 +23,6 @@ namespace CalamityMod.Items.Materials
|
||||
Item.maxStack = 999;
|
||||
Item.value = Item.buyPrice(0, 6, 50, 0);
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Endothermic Energy");
|
||||
Tooltip.SetDefault("Its deathly chill sucks the life from its surroundings");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Galactica Singularity");
|
||||
Tooltip.SetDefault("A shard of the cosmos");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 24));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Nightmare Fuel");
|
||||
Tooltip.SetDefault("May drain your sanity");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Phantoplasm");
|
||||
Tooltip.SetDefault("It churns and seethes with ghastly malice");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
@@ -12,6 +13,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Ruinous Soul");
|
||||
Tooltip.SetDefault("A shard of the distant past");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -21,5 +23,6 @@ namespace CalamityMod.Items.Materials
|
||||
Item.maxStack = 999;
|
||||
Item.value = Item.buyPrice(0, 7, 0, 0);
|
||||
Item.Calamity().customRarity = CalamityRarity.PureGreen;
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Materials
|
||||
SacrificeTotal = 5;
|
||||
DisplayName.SetDefault("Stormlion Mandible");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 8));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Materials
|
||||
DisplayName.SetDefault("Unholy Essence");
|
||||
Tooltip.SetDefault("The essence of profaned creatures");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 5));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items
|
||||
"Teleportation is disabled while Chaos State is active\n" +
|
||||
"Works while in the inventory");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 7));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Tooltip.SetDefault("And everything under the sun is in tune,\n" +
|
||||
"But the sun is eclipsed by the moon.");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Tooltip.SetDefault("Releases fire and souls upward from a held book\n" +
|
||||
"As the book is held the power of both increases");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
"ID and power-level locked\n" +
|
||||
"Prove your strength or have the correct user ID to wield this sword");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 13));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Tooltip.SetDefault("Throws a throwing knife that leaves sparks as it travels.\n" +
|
||||
"Stealth strikes cause the knife to be faster and leave a huge shower of sparks as it travels");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 4));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
"An ancient artifact from a previous age, it waits for your command...\n" +
|
||||
"This is a terrible idea, but it isn't yours anyways... right?");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 14));
|
||||
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
||||
SacrificeTotal = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
|
||||
BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert,
|
||||
|
||||
// Will move to localization whenever that is cleaned up.
|
||||
new FlavorTextBestiaryInfoElement("A confusing beast. They share qualities with many of the other desert creatures, yet seem to be able to store vast amounts of water in their bodies.")
|
||||
// Will move to localization whenever that is cleaned up.
|
||||
new FlavorTextBestiaryInfoElement("A confusing beast. They share qualities with many of the other desert creatures, yet seem to be able to store vast amounts of water in their bodies.")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
Main.eclipse ||
|
||||
Main.snowMoon ||
|
||||
Main.pumpkinMoon ||
|
||||
Main.invasionType != InvasionID.None ||
|
||||
NPC.AnyNPCs(ModContent.NPCType<Cnidrion>()))
|
||||
{
|
||||
return 0f;
|
||||
|
||||
@@ -7,6 +7,8 @@ using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.Graphics.Shaders;
|
||||
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
@@ -82,17 +84,23 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
var effect = Filters.Scene["SpreadTelegraph"].GetShader().Shader;
|
||||
effect.Parameters["centerOpacity"].SetValue(0.7f);
|
||||
effect.Parameters["mainOpacity"].SetValue((float)Math.Sqrt(ChargeProgress));
|
||||
effect.Parameters["halfSpreadAngle"].SetValue(Spread / 2f);
|
||||
effect.Parameters["edgeColor"].SetValue(Color.DeepSkyBlue.ToVector3());
|
||||
effect.Parameters["centerColor"].SetValue(Color.DodgerBlue.ToVector3());
|
||||
effect.Parameters["edgeBlendLenght"].SetValue(0.07f);
|
||||
effect.Parameters["edgeBlendStrength"].SetValue(8f);
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, effect, Main.GameViewMatrix.TransformationMatrix);
|
||||
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/InvisibleProj").Value;
|
||||
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/DeathstareBeam").Value;
|
||||
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
float angle = (Owner.MountedCenter - Owner.Calamity().mouseWorld).ToRotation() + (Spread / 2f) * i - MathHelper.PiOver2;
|
||||
Vector2 scale = new Vector2(0.2f, 1f) * 3f;
|
||||
Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition, null, Color.DodgerBlue * 0.5f * (float)Math.Sqrt(ChargeProgress), angle, new Vector2(texture.Width / 2f, texture.Height), scale, 0, 0);
|
||||
}
|
||||
float angle = (Owner.Calamity().mouseWorld - Owner.MountedCenter).ToRotation();
|
||||
Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition, null, Color.White, angle, new Vector2(texture.Width / 2f, texture.Height/2f), 700f, 0, 0);
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
@@ -111,7 +119,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
for (int i = 0; i < ShotProjectiles; i++)
|
||||
{
|
||||
float angleOffset = MathHelper.Lerp(Spread * -0.5f, Spread * 0.5f, i / (float)ShotProjectiles);
|
||||
float angleOffset = MathHelper.Lerp(Spread * -0.5f, Spread * 0.5f, i / ((float)ShotProjectiles - 1));
|
||||
Vector2 direction = (mainAngle + angleOffset).ToRotationVector2();
|
||||
|
||||
if (Owner.whoAmI == Main.myPlayer)
|
||||
|
||||
@@ -139,8 +139,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
// Only perform hit effects after reaching approximately 55% of the way out.
|
||||
if (Main.player[Projectile.owner].WithinRange(target.Center, 475f))
|
||||
// Only perform hit effects after reaching approximately 40% of the way out.
|
||||
if (Main.player[Projectile.owner].WithinRange(target.Center, 345f))
|
||||
return;
|
||||
|
||||
// Inflicts Daybroken, Abyssal Flames and Holy Flames for 3 seconds on-hit
|
||||
@@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
// Only perform hit effects after reaching approximately 55% of the way out.
|
||||
if (Projectile.WithinRange(Main.player[Projectile.owner].Center, 475f))
|
||||
if (Projectile.WithinRange(Main.player[Projectile.owner].Center, 345f))
|
||||
return;
|
||||
|
||||
// Inflicts Abyssal Flames and Holy Flames for 8 seconds on-hit
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
Projectile.DamageType = RogueDamageClass.Instance;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -2;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.MaxUpdates = 3;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
Reference in new issue
Block a user