Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
This commit is contained in:
commit
92257d578c
31 files changed
+201
-58
No files matched your search
@@ -367,6 +367,9 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Exo Mechs: Ares
|
||||
// 35% resist to Devil's Devastation's slash.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
|
||||
|
||||
// 30% resist to Dynamic Pursuer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
|
||||
|
||||
@@ -484,9 +487,6 @@ namespace CalamityMod.Balancing
|
||||
// 15% resist to The Final Dawn's AoE sweep flames.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
|
||||
|
||||
// 15% resist to Dragon's Breath's beam of fire.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<DragonsBreathBurst>()))));
|
||||
|
||||
// 15% resist to God Slayer Slugs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#region Dashes and Dodges
|
||||
// Dash cooldowns (in frames)
|
||||
internal const int UniversalDashCooldown = 30;
|
||||
internal const int UniversalSashDashCooldown = 23;
|
||||
internal const int UniversalSashDashCooldown = 30;
|
||||
internal const int UniversalShieldSlamCooldown = 30;
|
||||
internal const int UniversalShieldBonkCooldown = 30;
|
||||
internal const int OnShieldBonkCooldown = 30;
|
||||
|
||||
@@ -783,9 +783,11 @@ namespace CalamityMod.CalPlayer
|
||||
public int gloveLevel = 0;
|
||||
public bool alreadyHasFrogLeg = false; // Unused, intended to prevent Frog Leg tinker stacking
|
||||
public bool eTalisman = false;
|
||||
/// <summary> Counter variable used for spawning Statis' Void Sash's scythes when dashing. </summary>
|
||||
public int statisTimer = 0;
|
||||
public bool statisNinjaBelt = false;
|
||||
/// <summary> Used to keep track of how many dashes in the same direction you make to prevent dashing away from bosses forever at max efficency. </summary>
|
||||
public int statisPenaltyTimer = 0;
|
||||
public int statisAnticheese = 0;
|
||||
public int statisTimerMax => (int)(Utils.Remap(statisAnticheese, 1, 6, 120, 50, true));
|
||||
public bool voidSashVisuals = true;
|
||||
public bool statisVoidSash = false;
|
||||
public bool nucleogenesis = false;
|
||||
@@ -2877,7 +2879,7 @@ namespace CalamityMod.CalPlayer
|
||||
scuttlerCooldown = 0;
|
||||
rogueCrownCooldown = 0;
|
||||
wingProjectileCooldown = 0;
|
||||
statisTimer = 0;
|
||||
statisPenaltyTimer = -1;
|
||||
hallowedRuneCooldown = 0;
|
||||
sulphurBubbleCooldown = 0;
|
||||
ladHearts = 0;
|
||||
|
||||
@@ -1963,8 +1963,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (vortexBoosterStealthDelay == 1)
|
||||
Player.vortexStealthActive = true;
|
||||
}
|
||||
if (statisTimer > 0 && Player.dashDelay >= 0)
|
||||
statisTimer = 0;
|
||||
if (statisPenaltyTimer > 0)
|
||||
statisPenaltyTimer--;
|
||||
if (statisPenaltyTimer == 0 && statisAnticheese > 0)
|
||||
{
|
||||
statisAnticheese--;
|
||||
statisPenaltyTimer = statisTimerMax;
|
||||
}
|
||||
if (hallowedRuneCooldown > 0)
|
||||
hallowedRuneCooldown--;
|
||||
if (sulphurBubbleCooldown > 0)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using System;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -14,11 +15,25 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
public int lastDashDir = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => (50f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
|
||||
{
|
||||
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
|
||||
if (player.Calamity().statisAnticheese < 6)
|
||||
player.Calamity().statisAnticheese++;
|
||||
}
|
||||
else
|
||||
player.Calamity().statisAnticheese = 0;
|
||||
if (player.Calamity().statisAnticheese > 1)
|
||||
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
|
||||
Time = 0;
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
|
||||
@@ -21,14 +21,26 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
public bool AngleSwap = true;
|
||||
public Vector2 aimVel;
|
||||
public bool strongVisuals = true;
|
||||
public int lastDashDir = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => (75f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
|
||||
{
|
||||
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
|
||||
if (player.Calamity().statisAnticheese < 6)
|
||||
player.Calamity().statisAnticheese++;
|
||||
}
|
||||
else
|
||||
player.Calamity().statisAnticheese = 0;
|
||||
if (player.Calamity().statisAnticheese > 1)
|
||||
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
|
||||
strongVisuals = player.Calamity().voidSashVisuals;
|
||||
Time = 0;
|
||||
aimVel = player.velocity;
|
||||
@@ -96,25 +108,6 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Periodically release scythes.
|
||||
player.Calamity().statisTimer++;
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 2 == 0 && false)
|
||||
{
|
||||
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
|
||||
|
||||
int scythe = Projectile.NewProjectile(player.GetSource_FromAI(), player.Center, player.velocity.RotatedBy(player.direction * (AngleSwap ? 30 : -30), default) * 0.1f - player.velocity / 2f, ModContent.ProjectileType<CosmicScythe>(), scytheDamage, 5f, player.whoAmI); ;
|
||||
if (scythe.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[scythe].DamageType = DamageClass.Generic;
|
||||
Main.projectile[scythe].usesIDStaticNPCImmunity = true;
|
||||
Main.projectile[scythe].idStaticNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
AngleSwap = !AngleSwap;
|
||||
|
||||
}
|
||||
|
||||
player.velocity.X *= 0.912f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class WulfrumComplexPanelWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.WulfrumComplexPanelWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(8).
|
||||
AddIngredient<AnodizedWulfrumMetal>().
|
||||
AddIngredient<WulfrumMetalScrap>().
|
||||
AddIngredient<AnodizedWulfrumMetal>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 315 B |
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 118;
|
||||
Item.height = 118;
|
||||
|
||||
Item.damage = 255;
|
||||
Item.damage = 400;
|
||||
Item.useAnimation = Item.useTime = 45;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
if (player.Calamity().demonSwordKillMode && player.ownedProjectileCounts[ModContent.ProjectileType<DevilsDevastationHoldout>()] <= 0 && player.Calamity().killModeCooldown == KillMode.cooldownMax + KillMode.buffMax)
|
||||
{
|
||||
Projectile blade = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<DevilsDevastationHoldout>(), Item.damage * 21, Item.knockBack, player.whoAmI, 0, throwCount); //This used to be 30x damage.
|
||||
Projectile blade = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<DevilsDevastationHoldout>(), Item.damage * 15, Item.knockBack, player.whoAmI, 0, throwCount); //This used to be 30x damage.
|
||||
}
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 88;
|
||||
Item.height = 88;
|
||||
Item.damage = 71;
|
||||
Item.damage = 90;
|
||||
Item.useAnimation = Item.useTime = 45;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 74;
|
||||
Item.height = 74;
|
||||
Item.damage = 44;
|
||||
Item.damage = 58;
|
||||
Item.useAnimation = Item.useTime = 50;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 70;
|
||||
Item.height = 70;
|
||||
Item.damage = 202;
|
||||
Item.damage = 195;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 90; // Yes it's actually supposed to be this slow
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 62;
|
||||
Item.height = 34;
|
||||
Item.damage = 465;
|
||||
Item.damage = 400;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = 30;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.width = 84;
|
||||
Item.height = 46;
|
||||
Item.damage = 88;
|
||||
Item.damage = 127;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
|
||||
@@ -270,7 +270,7 @@ BadgeofBravery: {
|
||||
DisplayName: Badge of Bravery
|
||||
Tooltip:
|
||||
'''
|
||||
Increases melee damage and melee crit by 10%
|
||||
Increases melee damage and critical strike chance by 10%
|
||||
Increases melee armor penetration by 5
|
||||
'''
|
||||
}
|
||||
@@ -1697,6 +1697,7 @@ StatisNinjaBelt: {
|
||||
10% increased movement speed, 32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.6x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
Consecutive dashes in the same direction reduce dash speed
|
||||
'''
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
@@ -1710,6 +1711,7 @@ StatisVoidSash: {
|
||||
Increases movement acceleration and deceleration by 1.85x
|
||||
Grants the ability to swim, climb walls, and dodge attacks
|
||||
Visual effects are reduced if visibility is disabled
|
||||
Consecutive dashes in the same direction reduce dash speed
|
||||
'''
|
||||
HoldShiftTooltip: "{$Common.DodgeInformation}"
|
||||
}
|
||||
|
||||
@@ -4243,3 +4243,8 @@ WulfrumPillar: {
|
||||
DisplayName: Wulfrum Pillar
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
WulfrumComplexPanelWall: {
|
||||
DisplayName: Wulfrum Complex Panel Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -619,7 +619,7 @@ Hellborn: {
|
||||
'''
|
||||
An ornate firearm created during the Draconic Era by Azafure's finest forgemaster
|
||||
Hold <left> to twirl the gun in your hand, rapidly hitting nearby enemies
|
||||
Hits with the gun itself add rounds to the gun, up to a max of 8
|
||||
Hits with the gun itself add rounds to the gun, up to a max of 12
|
||||
At the cost of one round, hold <right> to fire a giant energy sphere with potent recoil
|
||||
[c/E1B65F:'Know the grace of a gun forged through beauteous inspiration']
|
||||
'''
|
||||
|
||||
@@ -103,11 +103,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
ejectedBlade = projectile;
|
||||
}
|
||||
}
|
||||
ejectedBlade.localAI[0] = 5;
|
||||
ejectedBlade.ai[1] += 1000;
|
||||
ejectedBlade.velocity = Projectile.velocity.RotatedByRandom(0.2f);
|
||||
ejectedBlade.netUpdate = true;
|
||||
ejectedBlade.netSpam = 0;
|
||||
if (ejectedBlade != null)
|
||||
{
|
||||
ejectedBlade.localAI[0] = 5;
|
||||
ejectedBlade.ai[1] += 1000;
|
||||
ejectedBlade.velocity = Projectile.velocity.RotatedByRandom(0.2f);
|
||||
ejectedBlade.ForceNetUpdate();
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
|
||||
@@ -94,11 +94,11 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Vector2 vel = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 2;
|
||||
Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, vel.RotatedBy(MathHelper.ToRadians(45)), ModContent.ProjectileType<DevilsStrike>(), 0, 0f, Owner.whoAmI, 1, 0);
|
||||
}
|
||||
Projectile strike = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), (int)(Projectile.damage * 2.5f), 0f, Owner.whoAmI, lastHitTarget.whoAmI, 0);
|
||||
Projectile strike = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), lastHitTarget.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), (int)(Projectile.damage * 1.5f), 0f, Owner.whoAmI, lastHitTarget.whoAmI, 0);
|
||||
SoundStyle dieSound = new("CalamityMod/Sounds/Item/LanceofDestinyStrong");
|
||||
SoundEngine.PlaySound(dieSound with { Volume = 0.9f, Pitch = 0.3f }, lastHitTarget.Center);
|
||||
|
||||
int bonusDamage = 4500;
|
||||
int bonusDamage = 4000;
|
||||
if (lastHitTarget.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
lastHitTarget.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
@@ -302,7 +302,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
bool hasKillMode = Owner.Calamity().cooldowns.TryGetValue(KillMode.ID, out CooldownInstance killModeCD);
|
||||
|
||||
int bonusDamage = 4500;
|
||||
int bonusDamage = 4000;
|
||||
if (target.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
target.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
@@ -387,7 +387,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float minMult = 0.35f;
|
||||
int hitsToMinMult = 8;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult * (Owner.Calamity().mouseRight ? 2.5f : 1);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Melee/DevilsDevastation";
|
||||
|
||||
public int ChargeupTime => (int)Projectile.localAI[2];
|
||||
public int Lifetime = 180;
|
||||
public int Lifetime = 300;
|
||||
public float OverallProgress => 1 - Projectile.timeLeft / (float)Lifetime;
|
||||
public float ThrowProgress => 1 - Projectile.timeLeft / (float)(Lifetime);
|
||||
public float ChargeProgress => 1 - (Projectile.timeLeft - Lifetime) / (float)(ChargeupTime);
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public Color clr = Color.Lerp(Color.DeepPink, Color.Orange, 0.5f);
|
||||
public Color usedColor = Color.White;
|
||||
public bool thrown = false;
|
||||
public int fadeOutTime = 120;
|
||||
public int fadeOutTime = 240;
|
||||
public bool stuckInTarget = false;
|
||||
public int stuckTimer = 0;
|
||||
public bool exitedTarget = false;
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float minMult = 0.35f;
|
||||
int hitsToMinMult = 8;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult * (Owner.Calamity().mouseRight ? 2.5f : 1);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
int bonusDamage = 120;
|
||||
int bonusDamage = 100;
|
||||
if (target.Calamity().demonicFlamesBonusDamage <= bonusDamage)
|
||||
{
|
||||
target.Calamity().demonicFlamesBonusDamage = bonusDamage;
|
||||
|
||||
@@ -305,7 +305,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
float minMult = 0.3f;
|
||||
int hitsToMinMult = 7;
|
||||
float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true);
|
||||
modifiers.SourceDamage *= damageMult * (Owner.Calamity().mouseRight ? 2.5f : 1);
|
||||
modifiers.SourceDamage *= damageMult;
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Ranged;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 4;
|
||||
Projectile.localNPCHitCooldown = 5;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ArmorPenetration = 25;
|
||||
}
|
||||
@@ -201,7 +201,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
modifiers.SourceDamage *= 0.115f;
|
||||
modifiers.SourceDamage *= 0.075f;
|
||||
if (Owner.Calamity().hellbornShots < 12)
|
||||
{
|
||||
Owner.Calamity().hellbornShots++;
|
||||
|
||||
@@ -297,7 +297,6 @@ namespace CalamityMod.Systems.Collections
|
||||
"Goblin",
|
||||
"NoOneElse",
|
||||
"Nicholas",
|
||||
"Toasty",
|
||||
"oli saer",
|
||||
"Blobby6799",
|
||||
"Domrinth",
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
DustType = 108;
|
||||
AddMapEntry(new Color(112, 244, 244));
|
||||
HitSound = SoundID.Shatter;
|
||||
MinPick = 55;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
DustType = 108;
|
||||
AddMapEntry(new Color(194, 255, 67));
|
||||
HitSound = SoundID.Shatter;
|
||||
MinPick = 55;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class WulfrumComplexPanelWall : ModWall
|
||||
{
|
||||
internal static FramedMaskTexture GlowMask;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
GlowMask = new("CalamityMod/Walls/WulfrumComplexPanelWall_Glow", 36, 36);
|
||||
|
||||
Main.wallHouse[Type] = true;
|
||||
Main.wallLight[Type] = true;
|
||||
AddMapEntry(new Color(116, 153, 40));
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
GlowMask?.Unload();
|
||||
GlowMask = null;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.DungeonSpirit, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
public static void DrawWallGlow(int wallType, int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
if (GlowMask.Texture is null)
|
||||
return;
|
||||
|
||||
Tile tile = Main.tile[i, j];
|
||||
int xLength = 32;
|
||||
int xOff = 0;
|
||||
|
||||
int xPos = tile.WallFrameX + xOff;
|
||||
int yPos = tile.WallFrameY;
|
||||
|
||||
Rectangle frame = new Rectangle(xPos, yPos, xLength, 32);
|
||||
Color drawcolor;
|
||||
drawcolor = WorldGen.paintColor(tile.WallColor);
|
||||
drawcolor.A = 255;
|
||||
Vector2 zero = new Vector2(Main.offScreenRange, Main.offScreenRange);
|
||||
|
||||
if (Main.drawToScreen)
|
||||
zero = Vector2.Zero;
|
||||
|
||||
Vector2 pos = new Vector2(i * 16 - (int)Main.screenPosition.X, j * 16 - (int)Main.screenPosition.Y) + zero;
|
||||
Color lightColor = Lighting.GetColor(i, j, Color.White);
|
||||
|
||||
spriteBatch.Draw(TextureAssets.Wall[wallType].Value, pos + new Vector2(-8 + xOff, -8), frame, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
|
||||
if (GlowMask.HasContentInFramePos(xPos, yPos))
|
||||
{
|
||||
float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f);
|
||||
|
||||
float time = Main.GameUpdateCount;
|
||||
float waveScale1 = time * 0.064f;
|
||||
int scalar = i - (j / 2);
|
||||
float wave1 = waveScale1 * -50 + scalar * 12;
|
||||
float wave1angle = 0.30f + 0.25f * MathF.Sin(MathHelper.ToRadians(wave1));
|
||||
|
||||
drawcolor *= brightness;
|
||||
|
||||
float transparency = 0.02f + (wave1angle / 4);
|
||||
Color glowColor = Color.White * transparency;
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
//Vector2 offset = new Vector2(Main.rand.NextFloat(-1, 1f), Main.rand.NextFloat(-1, 1f)) * 0.2f * k;
|
||||
spriteBatch.Draw(GlowMask.Texture, pos + new Vector2(-8 + xOff, -8), frame, glowColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
DrawWallGlow(Type, i, j, spriteBatch);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 693 B |
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Reference in new issue
Block a user