Merge branch '1.4' of https://github.com/CalamityTeam/CalamityMod into 1.4
No files matched your search
@@ -153,6 +153,8 @@ namespace CalamityMod.CalPlayer
|
||||
#region Town NPC Shop Variables
|
||||
public bool newMerchantInventory = false;
|
||||
public bool newPainterInventory = false;
|
||||
public bool newGolferInventory = false;
|
||||
public bool newZoologistInventory = false;
|
||||
public bool newDyeTraderInventory = false;
|
||||
public bool newPartyGirlInventory = false;
|
||||
public bool newStylistInventory = false;
|
||||
@@ -169,6 +171,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool newWizardInventory = false;
|
||||
public bool newSteampunkerInventory = false;
|
||||
public bool newCyborgInventory = false;
|
||||
public bool newPrincessInventory = false;
|
||||
public bool newSkeletonMerchantInventory = false;
|
||||
public bool newPermafrostInventory = false;
|
||||
public bool newCirrusInventory = false;
|
||||
@@ -333,6 +336,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Rage
|
||||
public bool RageEnabled => CalamityWorld.revenge || shatteredCommunity;
|
||||
public bool rageModeActive = false;
|
||||
public float rage = 0f;
|
||||
public float rageMax = 100f; // 0 to 100% by default
|
||||
@@ -349,6 +353,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Adrenaline
|
||||
public bool AdrenalineEnabled => CalamityWorld.revenge || draedonsHeart;
|
||||
public bool adrenalineModeActive = false;
|
||||
public float adrenaline = 0f;
|
||||
public float adrenalineMax = 100f; // 0 to 100% by default
|
||||
@@ -432,6 +437,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool laudanum = false;
|
||||
public bool heartOfDarkness = false;
|
||||
public bool draedonsHeart = false;
|
||||
public int nanomachinesLockoutTimer = 0;
|
||||
public bool vexation = false;
|
||||
public bool dodgeScarf = false;
|
||||
public bool evasionScarf = false;
|
||||
@@ -469,7 +475,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool fBarrier = false;
|
||||
public bool aBrain = false;
|
||||
public bool amalgam = false;
|
||||
public bool lol = false;
|
||||
public bool raiderTalisman = false;
|
||||
public int raiderStack = 0;
|
||||
public int raiderCooldown = 0;
|
||||
@@ -489,7 +494,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool projRefRare = false;
|
||||
public int projRefRareLifeRegenCounter = 0;
|
||||
public bool nanotech = false;
|
||||
public bool artemisEmblem = false;
|
||||
public bool deadshotBrooch = false;
|
||||
public bool shadowMinions = false;
|
||||
public bool holyMinions = false;
|
||||
public bool alchFlask = false;
|
||||
@@ -1156,6 +1161,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
newMerchantInventory = false;
|
||||
newPainterInventory = false;
|
||||
newGolferInventory = false;
|
||||
newZoologistInventory = false;
|
||||
newDyeTraderInventory = false;
|
||||
newPartyGirlInventory = false;
|
||||
newStylistInventory = false;
|
||||
@@ -1172,6 +1179,7 @@ namespace CalamityMod.CalPlayer
|
||||
newWizardInventory = false;
|
||||
newSteampunkerInventory = false;
|
||||
newCyborgInventory = false;
|
||||
newPrincessInventory = false;
|
||||
newSkeletonMerchantInventory = false;
|
||||
newPermafrostInventory = false;
|
||||
newCirrusInventory = false;
|
||||
@@ -1207,6 +1215,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
boost.AddWithCondition("newMerchantInventory", newMerchantInventory);
|
||||
boost.AddWithCondition("newPainterInventory", newPainterInventory);
|
||||
boost.AddWithCondition("newGolferInventory", newGolferInventory);
|
||||
boost.AddWithCondition("newZoologistInventory", newZoologistInventory);
|
||||
boost.AddWithCondition("newDyeTraderInventory", newDyeTraderInventory);
|
||||
boost.AddWithCondition("newPartyGirlInventory", newPartyGirlInventory);
|
||||
boost.AddWithCondition("newStylistInventory", newStylistInventory);
|
||||
@@ -1223,6 +1233,7 @@ namespace CalamityMod.CalPlayer
|
||||
boost.AddWithCondition("newWizardInventory", newWizardInventory);
|
||||
boost.AddWithCondition("newSteampunkerInventory", newSteampunkerInventory);
|
||||
boost.AddWithCondition("newCyborgInventory", newCyborgInventory);
|
||||
boost.AddWithCondition("newPrincessInventory", newPrincessInventory);
|
||||
boost.AddWithCondition("newSkeletonMerchantInventory", newSkeletonMerchantInventory);
|
||||
boost.AddWithCondition("newPermafrostInventory", newPermafrostInventory);
|
||||
boost.AddWithCondition("newCirrusInventory", newCirrusInventory);
|
||||
@@ -1310,6 +1321,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
newMerchantInventory = boost.Contains("newMerchantInventory");
|
||||
newPainterInventory = boost.Contains("newPainterInventory");
|
||||
newGolferInventory = boost.Contains("newGolferInventory");
|
||||
newZoologistInventory = boost.Contains("newZoologistInventory");
|
||||
newDyeTraderInventory = boost.Contains("newDyeTraderInventory");
|
||||
newPartyGirlInventory = boost.Contains("newPartyGirlInventory");
|
||||
newStylistInventory = boost.Contains("newStylistInventory");
|
||||
@@ -1326,6 +1339,7 @@ namespace CalamityMod.CalPlayer
|
||||
newWizardInventory = boost.Contains("newWizardInventory");
|
||||
newSteampunkerInventory = boost.Contains("newSteampunkerInventory");
|
||||
newCyborgInventory = boost.Contains("newCyborgInventory");
|
||||
newPrincessInventory = boost.Contains("newPrincessInventory");
|
||||
newSkeletonMerchantInventory = boost.Contains("newSkeletonMerchantInventory");
|
||||
newPermafrostInventory = boost.Contains("newPermafrostInventory");
|
||||
newCirrusInventory = boost.Contains("newCirrusInventory");
|
||||
@@ -1471,6 +1485,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ResetRogueStealth();
|
||||
|
||||
// Reset adrenaline duration to default. If Draedon's Heart is equipped, it'll change itself every frame.
|
||||
AdrenalineDuration = CalamityUtils.SecondsToFrames(5);
|
||||
|
||||
contactDamageReduction = 0D;
|
||||
projectileDamageReduction = 0D;
|
||||
rogueVelocity = 1f;
|
||||
@@ -1627,7 +1644,7 @@ namespace CalamityMod.CalPlayer
|
||||
uberBees = false;
|
||||
projRefRare = false;
|
||||
nanotech = false;
|
||||
artemisEmblem = false;
|
||||
deadshotBrooch = false;
|
||||
cryogenSoul = false;
|
||||
yInsignia = false;
|
||||
eGauntlet = false;
|
||||
@@ -1670,7 +1687,6 @@ namespace CalamityMod.CalPlayer
|
||||
manaOverloader = false;
|
||||
royalGel = false;
|
||||
handWarmer = false;
|
||||
lol = false;
|
||||
raiderTalisman = false;
|
||||
gSabaton = false;
|
||||
sGlyph = false;
|
||||
@@ -2312,6 +2328,7 @@ namespace CalamityMod.CalPlayer
|
||||
triumph = false;
|
||||
penumbra = false;
|
||||
shadow = false;
|
||||
nanomachinesLockoutTimer = 0;
|
||||
photosynthesis = false;
|
||||
astralInjection = false;
|
||||
gravityNormalizer = false;
|
||||
@@ -2978,31 +2995,28 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddBuff(ModContent.BuffType<RageMode>(), 2);
|
||||
|
||||
// Play Rage Activation sound
|
||||
SoundEngine.PlaySound( RageActivationSound, Player.position);
|
||||
SoundEngine.PlaySound(RageActivationSound, Player.position);
|
||||
|
||||
// TODO -- improve Rage activation visuals
|
||||
for (int num502 = 0; num502 < 64; num502++)
|
||||
// TODO -- Rage should provide glowy red afterimages to the player for the duration.
|
||||
// If Shattered Community is equipped, the afterimages are magenta instead.
|
||||
int rageDustID = 235;
|
||||
int dustCount = 132;
|
||||
float minSpeed = 4f;
|
||||
float maxSpeed = 11f;
|
||||
for (int i = 0; i < dustCount; ++i)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Main.dust[dust].scale *= 1.15f;
|
||||
}
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Player.Center;
|
||||
Vector2 vector7 = vector6 - Player.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, (int)CalamityDusts.Brimstone, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
float speed = (float)Math.Sqrt(Main.rand.NextFloat(minSpeed * minSpeed, maxSpeed * maxSpeed));
|
||||
Vector2 dustVel = Main.rand.NextVector2Unit() * speed;
|
||||
Dust d = Dust.NewDustPerfect(Player.Center, rageDustID, dustVel);
|
||||
d.noGravity = !Main.rand.NextBool(4); // 25% of dust has gravity
|
||||
d.noLight = false;
|
||||
d.scale = Main.rand.NextFloat(0.9f, 2.1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger for pressing the Adrenaline hotkey.
|
||||
if (CalamityKeybinds.AdrenalineHotKey.JustPressed && CalamityWorld.revenge)
|
||||
if (CalamityKeybinds.AdrenalineHotKey.JustPressed && AdrenalineEnabled)
|
||||
{
|
||||
if (adrenaline == adrenalineMax && !adrenalineModeActive)
|
||||
{
|
||||
@@ -3011,23 +3025,53 @@ namespace CalamityMod.CalPlayer
|
||||
// Play Adrenaline Activation sound
|
||||
SoundEngine.PlaySound(AdrenalineActivationSound, Player.position);
|
||||
|
||||
// TODO -- improve Adrenaline activation visuals
|
||||
for (int num502 = 0; num502 < 64; num502++)
|
||||
// TODO -- Adrenaline should provide bright green vibrating afterimages on the player for the duration.
|
||||
int dustPerSegment = 96;
|
||||
|
||||
// Parametric segment 1: y = 3x + 120
|
||||
Vector2 segmentOneStart = new Vector2(0f, -120f);
|
||||
Vector2 segmentOneEnd = new Vector2(-48f, 24f);
|
||||
Vector2 segmentOneIncrement = (segmentOneEnd - segmentOneStart) / dustPerSegment;
|
||||
|
||||
// Parametric segment 2: y = 0.5x
|
||||
Vector2 segmentTwoStart = segmentOneEnd;
|
||||
Vector2 segmentTwoEnd = new Vector2(48f, -24f);
|
||||
Vector2 segmentTwoIncrement = (segmentTwoEnd - segmentTwoStart) / dustPerSegment;
|
||||
|
||||
// Parametric segment 3: y = 3x - 120
|
||||
Vector2 segmentThreeStart = segmentTwoEnd;
|
||||
Vector2 segmentThreeEnd = new Vector2(0f, 120f);
|
||||
Vector2 segmentThreeIncrement = (segmentThreeEnd - segmentThreeStart) / dustPerSegment;
|
||||
|
||||
float maxDustVelSpread = 1.2f;
|
||||
for (int i = 0; i < dustPerSegment; ++i)
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, 206, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
Main.dust[dust].scale *= 2f;
|
||||
}
|
||||
int num226 = 36;
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + Player.Center;
|
||||
Vector2 vector7 = vector6 - Player.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 206, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
Main.dust[num228].noLight = true;
|
||||
Main.dust[num228].velocity = vector7;
|
||||
bool electricity = Main.rand.NextBool(4);
|
||||
int dustID = electricity ? 132 : DustID.TerraBlade;
|
||||
|
||||
float interpolant = i + 0.5f;
|
||||
float spreadSpeed = Main.rand.NextFloat(0.5f, maxDustVelSpread);
|
||||
if (electricity)
|
||||
spreadSpeed *= 4f;
|
||||
|
||||
Vector2 segmentOnePos = Player.Center + segmentOneStart + segmentOneIncrement * interpolant;
|
||||
Dust d = Dust.NewDustPerfect(segmentOnePos, dustID, Vector2.Zero);
|
||||
if (electricity)
|
||||
d.noGravity = false;
|
||||
d.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||
d.velocity = Main.rand.NextVector2Unit() * spreadSpeed;
|
||||
|
||||
Vector2 segmentTwoPos = Player.Center + segmentTwoStart + segmentTwoIncrement * interpolant;
|
||||
d = Dust.CloneDust(d);
|
||||
d.position = segmentTwoPos;
|
||||
d.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||
d.velocity = Main.rand.NextVector2Unit() * spreadSpeed;
|
||||
|
||||
Vector2 segmentThreePos = Player.Center + segmentThreeStart + segmentThreeIncrement * interpolant;
|
||||
d = Dust.CloneDust(d);
|
||||
d.position = segmentThreePos;
|
||||
d.scale = Main.rand.NextFloat(0.8f, 1.4f);
|
||||
d.velocity = Main.rand.NextVector2Unit() * spreadSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4503,8 +4547,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (witheredDebuff && witheringWeaponEnchant)
|
||||
damageMult += 0.6;
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult);
|
||||
// Rippers are always checked for application, because there are ways to get rippers outside of Rev now
|
||||
CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult);
|
||||
|
||||
damage = (int)(damage * damageMult);
|
||||
#endregion
|
||||
@@ -4538,12 +4582,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (draedonsHeart)
|
||||
{
|
||||
if (Player.StandingStill() && Player.itemAnimation == 0)
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
|
||||
if ((target.damage > 0 || target.boss) && !target.SpawnedFromStatue && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (CalamityConfig.Instance.Proficiency)
|
||||
@@ -4614,8 +4652,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (witheredDebuff)
|
||||
damageMult += 0.6;
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult);
|
||||
// Rippers are always checked for application, because there are ways to get rippers outside of Rev now
|
||||
CalamityUtils.ApplyRippersToDamage(this, isTrueMelee, ref damageMult);
|
||||
|
||||
if (filthyGlove && proj.Calamity().stealthStrike && proj.CountsAsClass<RogueDamageClass>())
|
||||
{
|
||||
@@ -4724,12 +4762,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (proj.type == ProjectileID.SpectreWrath && Player.ghostHurt)
|
||||
damage = (int)(damage * 0.7);
|
||||
|
||||
if (draedonsHeart)
|
||||
{
|
||||
if (Player.StandingStill() && Player.itemAnimation == 0)
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Handle on-hit ranged effects for the gem tech armor set.
|
||||
@@ -4939,8 +4971,8 @@ namespace CalamityMod.CalPlayer
|
||||
hasIFrames = true;
|
||||
|
||||
// If this NPC deals defense damage with contact damage, then apply defense damage.
|
||||
// Defense damage is not applied if the player has iframes, is otherwise invincible, or has Lul equipped.
|
||||
if (npc.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible && !lol)
|
||||
// Defense damage is not applied if the player has iframes or is otherwise invincible.
|
||||
if (npc.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible)
|
||||
DealDefenseDamage(damage);
|
||||
|
||||
if (areThereAnyDamnBosses && CalamityMod.bossVelocityDamageScaleValues.ContainsKey(npc.type))
|
||||
@@ -5037,9 +5069,13 @@ namespace CalamityMod.CalPlayer
|
||||
theBeeCooldown = 600;
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
// Full Adrenaline DR does not apply when using Draedon's Heart
|
||||
// Instead, nanomachine accumulation is stopped for a while
|
||||
if (AdrenalineEnabled)
|
||||
{
|
||||
if (adrenaline == adrenalineMax && !adrenalineModeActive)
|
||||
if (draedonsHeart)
|
||||
nanomachinesLockoutTimer = DraedonsHeart.NanomachinePauseAfterDamage;
|
||||
else if (adrenaline == adrenalineMax && !adrenalineModeActive)
|
||||
{
|
||||
double adrenalineDRBoost = 0D +
|
||||
(adrenalineBoostOne ? 0.05 : 0D) +
|
||||
@@ -5225,8 +5261,8 @@ namespace CalamityMod.CalPlayer
|
||||
hasIFrames = true;
|
||||
|
||||
// If this projectile is capable of dealing defense damage, then apply defense damage.
|
||||
// Defense damage is not applied if the player has iframes, is otherwise invincible, or has Lul equipped.
|
||||
if (proj.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible && !lol)
|
||||
// Defense damage is not applied if the player has iframes or is otherwise invincible.
|
||||
if (proj.Calamity().canBreakPlayerDefense && !hasIFrames && !invincible)
|
||||
DealDefenseDamage(damage);
|
||||
|
||||
if (projRefRare)
|
||||
@@ -5281,7 +5317,8 @@ namespace CalamityMod.CalPlayer
|
||||
theBeeCooldown = 600;
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
// Full Adrenaline DR does not apply when using Draedon's Heart
|
||||
if (AdrenalineEnabled && !draedonsHeart)
|
||||
{
|
||||
if (adrenaline == adrenalineMax && !adrenalineModeActive)
|
||||
{
|
||||
@@ -5774,7 +5811,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.eocDash = 0;
|
||||
}
|
||||
|
||||
if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0))
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodslayerArmorDash.ID && Player.dashDelay < 0))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen = 0;
|
||||
@@ -5872,10 +5909,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (HandleDodges())
|
||||
return false;
|
||||
|
||||
// Lul makes the player completely invincible.
|
||||
if (lol)
|
||||
return false;
|
||||
|
||||
// Unless holding Coldheart Icicle, the Purified Jam makes you completely invincible.
|
||||
if (invincible && Player.ActiveItem().type != ModContent.ItemType<ColdheartIcicle>())
|
||||
return false;
|
||||
@@ -5960,7 +5993,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Shattered Community makes the player gain rage based on the amount of damage taken.
|
||||
// Also set the Rage gain cooldown to prevent bizarre abuse cases.
|
||||
if (CalamityWorld.revenge && shatteredCommunity && rageGainCooldown == 0)
|
||||
if (shatteredCommunity && rageGainCooldown == 0)
|
||||
{
|
||||
float HPRatio = (float)damage / Player.statLifeMax2;
|
||||
float rageConversionRatio = 0.8f;
|
||||
@@ -5991,7 +6024,7 @@ namespace CalamityMod.CalPlayer
|
||||
modStealth = 1f;
|
||||
|
||||
// Give Rage combat frames because being hurt counts as combat.
|
||||
if (CalamityWorld.revenge)
|
||||
if (RageEnabled)
|
||||
rageCombatFrames = RageCombatDelayTime;
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
@@ -6043,7 +6076,8 @@ namespace CalamityMod.CalPlayer
|
||||
witheringDamageDone = 0;
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
// Lose adrenaline on hit, unless using Draedon's Heart.
|
||||
if (AdrenalineEnabled && !draedonsHeart)
|
||||
{
|
||||
if (!adrenalineModeActive && damage > 0) // To prevent paladin's shield ruining adren even with 0 dmg taken
|
||||
{
|
||||
@@ -8147,7 +8181,20 @@ namespace CalamityMod.CalPlayer
|
||||
defenseDamageTaken = cap;
|
||||
|
||||
// Apply defense damage to the adamantite armor set boost.
|
||||
AdamantiteSetDefenseBoost -= defenseDamageTaken;
|
||||
if (AdamantiteSetDefenseBoost > 0)
|
||||
{
|
||||
int defenseDamageToAdamantite = Math.Min(AdamantiteSetDefenseBoost, defenseDamageTaken);
|
||||
AdamantiteSetDefenseBoost -= defenseDamageToAdamantite;
|
||||
defenseDamageTaken -= defenseDamageToAdamantite;
|
||||
|
||||
// If Adamantite Armor's set bonus entirely absorbed the defense damage, then display the number and play the sound,
|
||||
// but don't actually reduce defense or trigger the defense damage recovery cooldown.
|
||||
if (defenseDamageTaken <= 0)
|
||||
{
|
||||
ShowDefenseDamageEffects(defenseDamageToAdamantite);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply that defense damage on top of whatever defense damage the player currently has.
|
||||
int previousDefenseDamage = CurrentDefenseDamage;
|
||||
@@ -8168,6 +8215,12 @@ namespace CalamityMod.CalPlayer
|
||||
// Reset the delay between iframes and being able to recover from defense damage.
|
||||
defenseDamageDelayFrames = DefenseDamageRecoveryDelay;
|
||||
|
||||
// Audiovisual effects
|
||||
ShowDefenseDamageEffects(defenseDamageTaken);
|
||||
}
|
||||
|
||||
private void ShowDefenseDamageEffects(int defDamage)
|
||||
{
|
||||
// Play a sound from taking defense damage.
|
||||
if (hurtSoundTimer == 0)
|
||||
{
|
||||
@@ -8176,7 +8229,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Display text indicating that defense damage was taken.
|
||||
string text = (-defenseDamageTaken).ToString();
|
||||
string text = (-defDamage).ToString();
|
||||
Color messageColor = Color.LightGray;
|
||||
Rectangle location = new Rectangle((int)Player.position.X, (int)Player.position.Y - 16, Player.width, Player.height);
|
||||
CombatText.NewText(location, messageColor, Language.GetTextValue(text));
|
||||
|
||||
@@ -51,6 +51,15 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
PlayerDrawLayers.Shoes.Hide();
|
||||
}
|
||||
|
||||
if (drawInfo.drawPlayer.Calamity().andromedaState != AndromedaPlayerState.Inactive)
|
||||
{
|
||||
foreach (var layer in PlayerDrawLayerLoader.Layers)
|
||||
{
|
||||
if (layer != PlayerDrawLayers.BackAcc)
|
||||
layer.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void DrawEffects(PlayerDrawSet drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright)
|
||||
@@ -485,7 +494,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.bFlames || calamityPlayer.aFlames || calamityPlayer.rageModeActive)
|
||||
if (calamityPlayer.bFlames || calamityPlayer.aFlames)
|
||||
{
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
{
|
||||
@@ -541,23 +550,48 @@ namespace CalamityMod.CalPlayer
|
||||
fullBright = true;
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.adrenalineModeActive)
|
||||
|
||||
// Dust while Rage Mode is active
|
||||
if (calamityPlayer.rageModeActive)
|
||||
{
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
if (drawInfo.shadow == 0f)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 206, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
|
||||
Main.dust[dust].velocity *= 1.8f;
|
||||
Main.dust[dust].velocity.Y -= 0.5f;
|
||||
drawInfo.DustCache.Add(dust);
|
||||
}
|
||||
if (noRogueStealth)
|
||||
{
|
||||
r *= 0.01f;
|
||||
g *= 0.15f;
|
||||
b *= 0.1f;
|
||||
fullBright = true;
|
||||
int dustCount = Main.rand.NextBool() ? 2 : 3;
|
||||
for (int i = 0; i < dustCount; ++i)
|
||||
{
|
||||
int dustID = ModContent.DustType<BrimstoneFlame>();
|
||||
if (shatteredCommunity && Main.rand.NextBool(3))
|
||||
dustID = DustID.DemonTorch;
|
||||
|
||||
Vector2 dustVel = Player.velocity * 0.5f;
|
||||
int idx = Dust.NewDust(drawInfo.Position, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
Dust d = Main.dust[idx];
|
||||
d.fadeIn = 0.4f;
|
||||
d.scale = Main.rand.NextFloat(0.8f, 1.5f);
|
||||
d.noGravity = true;
|
||||
d.noLight = false;
|
||||
drawInfo.DustCache.Add(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dust while Adrenaline Mode is active
|
||||
if (calamityPlayer.adrenalineModeActive)
|
||||
{
|
||||
if (drawInfo.shadow == 0f)
|
||||
{
|
||||
int dustID = 132;
|
||||
Vector2 dustVel = Player.velocity * 0.5f;
|
||||
int idx = Dust.NewDust(drawInfo.Position, Player.width, Player.height, dustID, dustVel.X, dustVel.Y);
|
||||
Dust d = Main.dust[idx];
|
||||
d.fadeIn = 1.1f;
|
||||
d.scale = Main.rand.NextFloat(0.8f, 1.5f);
|
||||
d.noGravity = Main.rand.NextBool(4);
|
||||
d.noLight = false;
|
||||
drawInfo.DustCache.Add(idx);
|
||||
}
|
||||
}
|
||||
|
||||
if (calamityPlayer.gsInferno)
|
||||
{
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
@@ -697,16 +731,6 @@ namespace CalamityMod.CalPlayer
|
||||
fullBright = true;
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.draedonsHeart && !calamityPlayer.shadeRegen && !calamityPlayer.cFreeze && Player.StandingStill() && Player.itemAnimation == 0)
|
||||
{
|
||||
if (noRogueStealth)
|
||||
{
|
||||
r *= 0f;
|
||||
g *= 0.5f;
|
||||
b *= 0f;
|
||||
fullBright = true;
|
||||
}
|
||||
}
|
||||
if (calamityPlayer.bBlood)
|
||||
{
|
||||
if (Main.rand.NextBool(6) && drawInfo.shadow == 0f)
|
||||
@@ -844,7 +868,7 @@ namespace CalamityMod.CalPlayer
|
||||
List<int> tankItems = new List<int>()
|
||||
{
|
||||
ModContent.ItemType<FlurrystormCannon>(),
|
||||
ModContent.ItemType<MepheticSprayer>(),
|
||||
ModContent.ItemType<BlightSpewer>(),
|
||||
ModContent.ItemType<BrimstoneFlameblaster>(),
|
||||
ModContent.ItemType<BrimstoneFlamesprayer>(),
|
||||
ModContent.ItemType<SparkSpreader>(),
|
||||
|
||||
@@ -601,7 +601,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.mount.Dismount(Player);
|
||||
}
|
||||
|
||||
if (lol || (silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0))
|
||||
if ((silvaCountdown > 0 && hasSilvaEffect && silvaSet) || (DashID == GodSlayerDash.ID && Player.dashDelay < 0))
|
||||
{
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen = 0;
|
||||
@@ -871,24 +871,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (draedonsHeart)
|
||||
{
|
||||
boostedRegen = true;
|
||||
if (Player.lifeRegen > 0 && Player.statLife < actualMaxLife)
|
||||
{
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(2))
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 107, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (photosynthesis)
|
||||
{
|
||||
boostedRegen = true;
|
||||
@@ -962,8 +944,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.statLife < actualMaxLife)
|
||||
{
|
||||
// The soft cap doesn't apply if the player is not moving and not using a weapon while having any of the following:
|
||||
// Shiny Stone, Draedon's Heart, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper.
|
||||
bool noLifeRegenCap = (Player.shinyStone || draedonsHeart || cFreeze || shadeRegen || photosynthesis || camper) &&
|
||||
// Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Photosynthesis Potion buff or The Camper.
|
||||
bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || photosynthesis || camper) &&
|
||||
Player.StandingStill() && Player.itemAnimation == 0;
|
||||
|
||||
if (!noLifeRegenCap)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using CalamityMod.Balancing;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
@@ -9,6 +12,7 @@ using CalamityMod.Cooldowns;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.EntitySources;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
@@ -42,22 +46,17 @@ using CalamityMod.UI;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.GameInput;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using CalamityMod.EntitySources;
|
||||
using ReLogic.Content;
|
||||
using Terraria.GameContent;
|
||||
using CalamityMod.Systems;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -172,8 +171,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
// player.rangedCrit already contains the crit stat of the held item, no need to grab it separately.
|
||||
// Don't store the base 4% because you're not removing it.
|
||||
spiritOriginConvertedCrit = (int)(Player.GetCritChance<RangedDamageClass>() - 4);
|
||||
Player.GetCritChance<RangedDamageClass>() = 4;
|
||||
spiritOriginConvertedCrit = (int)(Player.GetTotalCritChance<RangedDamageClass>() - 4);
|
||||
Player.GetCritChance<RangedDamageClass>() = -spiritOriginConvertedCrit;
|
||||
}
|
||||
|
||||
if (Player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>())
|
||||
@@ -191,7 +190,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Revengeance Effects
|
||||
private void RevengeanceModeMiscEffects()
|
||||
{
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
// Adjusts the life steal cap in rev/death
|
||||
float lifeStealCap = (CalamityWorld.malice || BossRushEvent.BossRushActive) ? 30f : CalamityWorld.death ? 45f : 60f;
|
||||
@@ -221,23 +220,16 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.hurtCooldowns[k] > immuneTimeLimit)
|
||||
Player.hurtCooldowns[k] = immuneTimeLimit;
|
||||
}
|
||||
|
||||
// Adrenaline and Rage
|
||||
if (CalamityWorld.revenge)
|
||||
UpdateRippers();
|
||||
}
|
||||
}
|
||||
|
||||
// If Revengeance Mode is not active, then set rippers to zero
|
||||
else if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
rage = 0;
|
||||
adrenaline = 0;
|
||||
}
|
||||
// Adrenaline and Rage
|
||||
UpdateRippers();
|
||||
}
|
||||
|
||||
private void UpdateRippers()
|
||||
{
|
||||
#region Rage
|
||||
// Figure out Rage's current duration based on boosts.
|
||||
if (rageBoostOne)
|
||||
RageDuration += RageDurationPerBooster;
|
||||
@@ -364,31 +356,37 @@ namespace CalamityMod.CalPlayer
|
||||
rageDiff -= rageMax / RageFadeTime;
|
||||
|
||||
// Apply the rage change and cap rage in both directions.
|
||||
rage += rageDiff;
|
||||
if (rage < 0)
|
||||
rage = 0;
|
||||
|
||||
if (rage >= rageMax)
|
||||
// Changes are only applied if the Rage mechanic is available.
|
||||
if (RageEnabled)
|
||||
{
|
||||
// If Rage is not active, it is capped at 100%.
|
||||
if (!rageModeActive)
|
||||
rage = rageMax;
|
||||
rage += rageDiff;
|
||||
if (rage < 0)
|
||||
rage = 0;
|
||||
|
||||
// If using the Shattered Community, Rage is capped at 200% while it's active.
|
||||
// This prevents infinitely stacking rage before a fight by standing on spikes/lava with a regen build or the Nurse handy.
|
||||
else if (shatteredCommunity && rage >= 2f * rageMax)
|
||||
rage = 2f * rageMax;
|
||||
|
||||
// Play a sound when the Rage Meter is full
|
||||
if (playFullRageSound)
|
||||
if (rage >= rageMax)
|
||||
{
|
||||
playFullRageSound = false;
|
||||
SoundEngine.PlaySound(RageFilledSound, Player.position);
|
||||
}
|
||||
}
|
||||
else
|
||||
playFullRageSound = true;
|
||||
// If Rage is not active, it is capped at 100%.
|
||||
if (!rageModeActive)
|
||||
rage = rageMax;
|
||||
|
||||
// If using the Shattered Community, Rage is capped at 200% while it's active.
|
||||
// This prevents infinitely stacking rage before a fight by standing on spikes/lava with a regen build or the Nurse handy.
|
||||
else if (shatteredCommunity && rage >= 2f * rageMax)
|
||||
rage = 2f * rageMax;
|
||||
|
||||
// Play a sound when the Rage Meter is full
|
||||
if (playFullRageSound)
|
||||
{
|
||||
playFullRageSound = false;
|
||||
SoundEngine.PlaySound(RageFilledSound, Player.position);
|
||||
}
|
||||
}
|
||||
else
|
||||
playFullRageSound = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Adrenaline
|
||||
// This is how much Adrenaline will be changed by this frame.
|
||||
float adrenalineDiff = 0;
|
||||
bool SCalAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>());
|
||||
@@ -396,7 +394,30 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// If Adrenaline Mode is currently active, you smoothly lose all adrenaline over the duration.
|
||||
if (adrenalineModeActive)
|
||||
{
|
||||
adrenalineDiff = -adrenalineMax / AdrenalineDuration;
|
||||
|
||||
// If using Draedon's Heart, you get healing instead of damage.
|
||||
if (draedonsHeart)
|
||||
{
|
||||
Player.statLife += DraedonsHeart.NanomachinesHeal / DraedonsHeart.NanomachinesDuration;
|
||||
if (Player.statLife >= Player.statLifeMax2)
|
||||
Player.statLife = Player.statLifeMax2;
|
||||
|
||||
// Old Draedon's Heart dust effect from its standing still regen. Works just fine.
|
||||
int dustID = DustID.TerraBlade;
|
||||
{
|
||||
int regen = Dust.NewDust(Player.position, Player.width, Player.height, dustID, 0f, 0f, 200, default, 1f);
|
||||
Main.dust[regen].noGravity = true;
|
||||
Main.dust[regen].fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
Main.dust[regen].velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
Main.dust[regen].position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly.
|
||||
@@ -414,28 +435,35 @@ namespace CalamityMod.CalPlayer
|
||||
adrenalineDiff *= 0.67f;
|
||||
|
||||
// Apply the adrenaline change and cap adrenaline in both directions.
|
||||
adrenaline += adrenalineDiff;
|
||||
if (adrenaline < 0)
|
||||
adrenaline = 0;
|
||||
|
||||
if (adrenaline >= adrenalineMax)
|
||||
// Changes are only applied if the Adrenaline mechanic is available.
|
||||
if (AdrenalineEnabled && nanomachinesLockoutTimer == 0)
|
||||
{
|
||||
adrenaline = adrenalineMax;
|
||||
adrenaline += adrenalineDiff;
|
||||
if (adrenaline < 0)
|
||||
adrenaline = 0;
|
||||
|
||||
// Play a sound when the Adrenaline Meter is full
|
||||
if (playFullAdrenalineSound)
|
||||
if (adrenaline >= adrenalineMax)
|
||||
{
|
||||
playFullAdrenalineSound = false;
|
||||
SoundEngine.PlaySound(AdrenalineFilledSound, Player.position);
|
||||
adrenaline = adrenalineMax;
|
||||
|
||||
// Play a sound when the Adrenaline Meter is full
|
||||
if (playFullAdrenalineSound)
|
||||
{
|
||||
playFullAdrenalineSound = false;
|
||||
SoundEngine.PlaySound(AdrenalineFilledSound, Player.position);
|
||||
}
|
||||
}
|
||||
else
|
||||
playFullAdrenalineSound = true;
|
||||
}
|
||||
else
|
||||
playFullAdrenalineSound = true;
|
||||
|
||||
if (nanomachinesLockoutTimer > 0)
|
||||
nanomachinesLockoutTimer--;
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Misc Effects
|
||||
|
||||
private void HandleBlazingMouseEffects()
|
||||
{
|
||||
// The sigil's brightness slowly fades away every frame if not incinerating anything.
|
||||
@@ -1477,8 +1505,8 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Remove Purified Jam and Lul accessory thorn damage exploits
|
||||
if (invincible || lol)
|
||||
// Remove Purified Jam thorn damage exploits
|
||||
if (invincible)
|
||||
{
|
||||
Player.thorns = 0f;
|
||||
Player.turtleThorns = false;
|
||||
@@ -3682,13 +3710,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Draedon's Heart bonus
|
||||
if (draedonsHeart)
|
||||
{
|
||||
if (Player.StandingStill() && Player.itemAnimation == 0)
|
||||
Player.statDefense += (int)(Player.statDefense * 0.75);
|
||||
}
|
||||
|
||||
// Endurance reductions
|
||||
EnduranceReductions();
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
public class StatisBeltOfCursesDash : PlayerDashEffect
|
||||
public class StatisVoidSashDash : PlayerDashEffect
|
||||
{
|
||||
public static new string ID => "Statis' Belt of Curses";
|
||||
public static new string ID => "Statis' Void Sash";
|
||||
|
||||
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Linq;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -11,7 +9,7 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
{
|
||||
public class AndromedaMechLayer : PlayerDrawLayer
|
||||
{
|
||||
public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.Skin);
|
||||
public override Position GetDefaultPosition() => new AfterParent(PlayerDrawLayers.BackAcc);
|
||||
|
||||
public override bool GetDefaultVisibility(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
|
||||
@@ -52,7 +52,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float4 metalColor = lerp(color, float4(BlendColor(color.rgb * 0.6, uColor), 1), 0.7);
|
||||
|
||||
// And mix it all together.
|
||||
return (color * 0.35 + metalColor * 0.65 + updraftColor * 0.8 + cloudColor * 0.3) * color.a * 0.85;
|
||||
return (color * 0.35 + metalColor * 0.65 + updraftColor * 0.8 + cloudColor * 0.3) * color.a * sampleColor * 0.85;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,13 +21,13 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float interval = cos(uTime * 7 + framedCoords.x * 4) / 2 + 0.5;
|
||||
float4 returnColor = float4(lerp(uColor, uSecondaryColor, interval), 1); // Fade between two colors depending on the time and x position on the texture in a 0-1 cosine linear interpolation. The color can vary.
|
||||
return returnColor * color; // And multiply by the original color to give it a blend effect.
|
||||
return returnColor * sampleColor * color; // And multiply by the original color to give it a blend effect.
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
|
||||
@@ -42,7 +42,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
|
||||
// Become notably darker to reinforce the stone aesthetic.
|
||||
stoneColor.rgb *= 0.2 + noiseColor.r * 0.65;
|
||||
return (stoneColor + flameColor * 0.4) * color.a;
|
||||
return (stoneColor + flameColor * 0.4) * sampleColor * color.a;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,14 +21,14 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float interval = (cos((uTime - 0.5) * 17 + framedCoords.y * 8) / 2 + 0.5);
|
||||
float interval = (sin((uTime - 0.5) * 17 + framedCoords.y * 8) / 2 + 0.5);
|
||||
float4 returnColor = float4(lerp(uColor, uSecondaryColor, interval), 1); // One again, use a cosine lerp based on position and time, but this time, with the Y position.
|
||||
|
||||
return returnColor * color;
|
||||
return returnColor * color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ float2 uLegacyArmorSheetSize;
|
||||
|
||||
float2 RotatedBy(float2 xy, float theta)
|
||||
{
|
||||
return float2(xy.x * cos(theta) + xy.y * sin(theta), xy.x * sin(theta) - xy.y * cos(theta));
|
||||
return float2(xy.x * sin(theta + 1.57) + xy.y * sin(theta), xy.x * sin(theta) - xy.y * sin(theta + 1.57));
|
||||
}
|
||||
|
||||
float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
@@ -26,18 +26,18 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float interval = (cos(uTime * 2.2 + framedCoords.x * framedCoords.y * 1.55) * 0.5 + 0.5) * 0.6 + 0.2; // A complex function that works based on the X and Y coords with a 0.2-0.8 range.
|
||||
float interval = (sin(uTime * 2.2 + framedCoords.x * framedCoords.y * 1.55 + 1.57) * 0.5 + 0.5) * 0.6 + 0.2; // A complex function that works based on the X and Y coords with a 0.2-0.8 range.
|
||||
float brightness = 1.35;
|
||||
float3 returnColor = uColor;
|
||||
// Rotate the colors around and adjust the brightness.
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float2 positionAt = float2(interval, 1 - interval);
|
||||
positionAt = (RotatedBy(float2(cos(uTime * 1.7 + i / 4 * 6.283), cos(uTime * 1.9 + i / 4 * 6.283)), uTime + i / 4 * 6.283) * 0.5 + 0.5) - positionAt;
|
||||
positionAt = (RotatedBy(float2(sin(uTime * 1.7 + i / 4 * 6.283), sin(uTime * 1.9 + i / 4 * 6.283)), uTime + i / 4 * 6.283) * 0.5 + 0.5) - positionAt;
|
||||
float dist = distance(coords, positionAt);
|
||||
if (dist < 0.35)
|
||||
{
|
||||
@@ -52,12 +52,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
returnColor = lerp(returnColor, uSecondaryColor, (framedCoords.y - 0.5) * 3);
|
||||
}
|
||||
|
||||
return float4(returnColor, 1) * color * brightness;
|
||||
return float4(returnColor, 1) * color * sampleColor * brightness;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
|
||||
@@ -42,12 +42,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
|
||||
// Use a specialized blend method to create the shine effect.
|
||||
color.rgb = (length(color.rgb) <= 0.5) ? 2 * color.rgb * goldColor : 1 - 2 * (1 - color.rgb) * (1 - goldColor);
|
||||
return (color + noiseColor * 0.45) * color.a;
|
||||
return (color + noiseColor * 0.45) * sampleColor * color.a;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 pixelBelow = tex2D(uImage0, coords);
|
||||
@@ -41,7 +41,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
// Handle red fades based on noise.
|
||||
color = lerp(color, float4(1, 0, 0, 1), pow(noiseColor.r, 3) * 0.3 + verticalFlowMovement * 0.3 + 0.16) * color.a;
|
||||
|
||||
return color * (1 + (1 - outlineFade) * 0.25);
|
||||
return color * (1 + (1 - outlineFade) * 0.25) * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
@@ -36,7 +36,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float3 flameColor = lerp(alteredColor, alteredSecondaryColor, fadeToRed);
|
||||
flameColor.r = 0.6 + sqrt(fadeToRed) * 0.4;
|
||||
color = lerp(color, float4(flameColor, 1), 0.45) * color.a;
|
||||
return color * lerp(1.3, 5.4, pow(flameStreakBrightness, 4.44));
|
||||
return color * lerp(1.3, 5.4, pow(flameStreakBrightness, 4.44)) * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 noiseColor = tex2D(uImage1, framedCoords);
|
||||
@@ -40,12 +40,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
blendFactor *= framedCoords.y / 0.2;
|
||||
}
|
||||
float4 colorBlendMultiplier = lerp(float4(blendColor, 1), float4(1, 1, 1, 1), saturate(pow(blendFactor * 1.5, 2)));
|
||||
return (lerp(color, float4(blendColor, 1), blendFactor * 0.5 + 0.2) * color.a) * colorBlendMultiplier * (1 + brightness);
|
||||
return (lerp(color, float4(blendColor, 1), blendFactor * 0.5 + 0.2) * color.a) * colorBlendMultiplier * (1 + brightness) * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -27,14 +27,14 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
coords.x += randomness(uTime + framedCoords.y).x * (1 - framedCoords.y) * 6 / uImageSize0.x; // Add an X offset based on a noise function, giving a moon lord void-esque shader effect.
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float4 returnColor = color * 0.1;
|
||||
returnColor.a = color.a;
|
||||
return returnColor;
|
||||
return returnColor * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float2 swirlOffset = float2(sin(uTime * 0.26 + 1.754) * 0.31, sin(uTime * 0.26) * 0.16) * uSaturation;
|
||||
@@ -46,12 +46,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
|
||||
// And create stars based on a noise texture that rise upward.
|
||||
color = lerp(color, float4(starColor, 1) * color.a, fadeToNormal * pow(brightnessFactor, 6) * 0.15);
|
||||
return color * (1 + brightnessFactor);
|
||||
return color * (1 + brightnessFactor) * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
@@ -35,7 +35,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
baseColor *= 1 + pow(baseColor, 5).r * 8 - noiseColor2.r * 1.25;
|
||||
baseColor = lerp(baseColor, uSecondaryColor * 2, pow(noiseColor.r, 2));
|
||||
|
||||
return float4(baseColor, 1) * opacity;
|
||||
return float4(baseColor, 1) * sampleColor * opacity;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 noiseColor = tex2D(uImage1, float2(frac(framedCoords.x + uTime * 0.1), framedCoords.y));
|
||||
@@ -39,7 +39,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
if (normalizedDistanceFromCenter > 0.7)
|
||||
fadeToSecondaryColor *= saturate(1 - (normalizedDistanceFromCenter - 0.7) / 0.2);
|
||||
float4 endFadeColor = lerp(float4(uColor, 1), float4(uSecondaryColor, 1), 0.5);
|
||||
return (lerp(color, endFadeColor, 0.3 + fadeToSecondaryColor * 0.6) * color.a) * (1 + brightness);
|
||||
return (lerp(color, endFadeColor, 0.3 + fadeToSecondaryColor * 0.6) * color.a) * sampleColor * (1 + brightness);
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -25,22 +25,22 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
|
||||
float4 noiseColor = tex2D(uImage1, coords);
|
||||
float interval = cos(uTime * 7 + framedCoords.y * 6) * 0.5 + 0.5;
|
||||
float interval = sin(uTime * 7 + framedCoords.y * 6 + 1.57) * 0.5 + 0.5;
|
||||
|
||||
float brightness = pow((interval + sin(uTime + framedCoords.x * uTime * framedCoords.y * cos(uTime)) * 0.5 + 0.5) * 0.5, 2); // Force the brightness to rise to 1 more quickly
|
||||
float brightness = pow((interval + sin(uTime + framedCoords.x * uTime * framedCoords.y * sin(uTime)) * 0.5 + 0.5) * 0.5, 2); // Force the brightness to rise to 1 more quickly
|
||||
brightness = brightness * (MaxBrightness - MinBrightness) + MinBrightness; // And bring it to a specified range
|
||||
|
||||
float4 colorMap = float4(lerp(uColor, uSecondaryColor, interval) + noiseColor.rgb * 0.4, 1);
|
||||
colorMap.rgb *= brightness;
|
||||
colorMap.rgb = colorMap.rgb - colorMap.rgb % Variance; // Slice the return color map to make pixels appear less varied and more extreme
|
||||
|
||||
return colorMap * color;
|
||||
return colorMap * color * sampleColor * sampleColor.a;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -29,20 +29,20 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float interval = (cos(framedCoords.x * 6.283 + uTime * 3.141) * 2 + sin(uTime * 7 + framedCoords.y * 6)) * 0.125 + 0.5;
|
||||
float interval = (sin(framedCoords.x * 6.283 + uTime * 3.141) * 2 + sin(uTime * 7 + framedCoords.y * 6)) * 0.125 + 0.5;
|
||||
interval *= 2; // Exaggerate the interval.
|
||||
float4 returnColor = float4(lerp(colors[floor(interval) % 4], colors[floor(interval + 1) % 4], interval % 1), 1); // But clamp it to a 0-1 range.
|
||||
|
||||
return returnColor * color * 1.95;
|
||||
return returnColor * color * sampleColor * 1.95;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float time = (sin(uTime + framedCoords.x * cos(uTime + 3.141 * framedCoords.x) + 1.5707 * framedCoords.y) * 0.5 + 0.5) * 6;
|
||||
float time = (sin(uTime + framedCoords.x * sin(uTime + 3.141 * framedCoords.x) + 1.5707 * framedCoords.y) * 0.5 + 0.5) * 6;
|
||||
float timeFloored = floor(time);
|
||||
|
||||
float3 colors[6] =
|
||||
@@ -40,12 +40,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
|
||||
// Use a multi-lerp to fade between colors and then base them on a trig-based time step.
|
||||
color.rgb *= lerp(colors[timeFloored] / 255.0, colors[(timeFloored + 1) % 6] / 255.0, time / 6) * 1.6;
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
|
||||
@@ -30,7 +30,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float luminosity = (color.r + color.g + color.b) / 3;
|
||||
color.rgb = luminosity * idealColor * 1.3; // Average out the colors.
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 noiseColor = tex2D(uImage1, float2(framedCoords.x, framedCoords.y - uTime * 0.45) * 0.1);
|
||||
@@ -66,12 +66,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float brightness = (blendFactor * 0.4 + noiseColor.r * 0.9) * 1.2;
|
||||
|
||||
float4 colorBlendMultiplier = lerp(float4(blendColor, 1), float4(1, 1, 1, 1), saturate(blendFactor * 1.5));
|
||||
return (lerp(color, float4(blendColor, 1), blendFactor * 0.5 + 0.2) * color.a) * colorBlendMultiplier * (1 + brightness);
|
||||
return (lerp(color, float4(blendColor, 1), blendFactor * 0.5 + 0.2) * color.a) * sampleColor * colorBlendMultiplier * (1 + brightness);
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float3 idealColor = uColor;
|
||||
@@ -33,7 +33,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float luminosity = (color.r + color.g + color.b) / 3;
|
||||
color.rgb = luminosity * idealColor * 1.6; // Average out the colors.
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 noiseColor = tex2D(uImage1, float2(framedCoords.x, frac(framedCoords.y + uTime * 0.7)));
|
||||
@@ -39,7 +39,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
float4 blendedColor = (color + endFadeColor) * 0.5 - 0.05;
|
||||
blendedColor *= 1.4;
|
||||
blendedColor.a = 1;
|
||||
return blendedColor * color.a * (1 + lerp(0.07, 0.3, fadeToSecondaryColor) + noiseColor.g * 0.1);
|
||||
return blendedColor * color.a * (1 + lerp(0.07, 0.3, fadeToSecondaryColor) + noiseColor.g * 0.1) * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,13 +21,13 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
|
||||
// Read the fade map as a streak.
|
||||
float4 fadeMapColor = tex2D(uImage1, float2(frac(framedCoords.x * 0.18 + cos(uTime * 0.9) * 0.021), frac(framedCoords.y * 0.32 + uTime * 0.2)));
|
||||
float4 fadeMapColor = tex2D(uImage1, float2(frac(framedCoords.x * 0.18 + sin(uTime * 0.9) * 0.021), frac(framedCoords.y * 0.32 + uTime * 0.2)));
|
||||
fadeMapColor.r *= pow(framedCoords.x, 0.2);
|
||||
|
||||
float opacity = lerp(1.05, 1.95, fadeMapColor.r);
|
||||
@@ -41,7 +41,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
transformColor = lerp(transformColor, float3(206 / 255, 116 / 255, 59 / 255), orangeFade);
|
||||
color.rgb = lerp(color.rgb, transformColor, fadeMapColor.r);
|
||||
opacity *= color.a;
|
||||
return color * opacity;
|
||||
return color * sampleColor * opacity;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -19,8 +19,8 @@ float2 uLegacyArmorSheetSize;
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 returnColor = tex2D(uImage0, coords);
|
||||
returnColor.rgb *= uColor * max(1, (cos(uTime) * 0.5 + 0.5) * 0.3 + 1.3);
|
||||
return returnColor;
|
||||
returnColor.rgb *= uColor * max(1, (sin(uTime) * 0.5 + 0.5) * 0.3 + 1.3);
|
||||
return returnColor * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
@@ -30,7 +30,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
|
||||
color.rgb *= ((framedCoords.x * uColor * (1 - yMultiplier) * 1.4) + ((1 - framedCoords.x) * uSecondaryColor * yMultiplier * 1.7)) * luminosity * 2.1;
|
||||
color.rgb *= clamp(1.6 * saturate(distance((0.5, 0.5), framedCoords)), 0.8, 1.6); // Intensify the colors based on how far they are from the center of the sprite.
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -18,14 +18,14 @@ float2 uLegacyArmorSheetSize;
|
||||
|
||||
float2 RotatedBy(float theta, float x, float y)
|
||||
{
|
||||
return float2(x * cos(theta) + y * sin(theta), x * sin(theta) - y * cos(theta));
|
||||
return float2(x * sin(theta + 1.57) + y * sin(theta), x * sin(theta) - y * sin(theta + 1.57));
|
||||
}
|
||||
float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
{
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float sineTime = sin(uTime); // Saved so that I don't have the compute this multiple times. Shaders have a limited number of mathematical instructions you can use - 64.
|
||||
@@ -35,7 +35,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
modifiedCoords = RotatedBy(uTime + 0.4 * sineTime, modifiedCoords.y, modifiedCoords.x);
|
||||
float4 noiseColor = tex2D(uImage1, modifiedCoords);
|
||||
|
||||
float xMultiplier = cos(framedCoords.x * 2.3 + uTime) + 1;
|
||||
float xMultiplier = sin(framedCoords.x * 2.3 + uTime + 1.57) + 1;
|
||||
float yMultiplier = sin(framedCoords.y * 2 + uTime * 1.4) + 1;
|
||||
|
||||
float interpolationValue = saturate(xMultiplier * yMultiplier) * 0.7 + 0.3; // Range of 0-1. Depends on the current coordinates and the time.
|
||||
@@ -43,12 +43,12 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
color.rgb *= 0.2 + pow(noiseColor.rgb, 3); // Squash the color to the upper and lower bounds and add a bit of lightness to it.
|
||||
color.rgb *= lerp(uColor, uSecondaryColor, interpolationValue); // Blend with the secondary color.
|
||||
color.rgb *= 1.7 + (sineTime * 0.5 + 1.5) * interpolationValue; // Range of 1.7 to 3.7, can cause certain spots to become very bright.
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
@@ -42,7 +42,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
// Handle sludge fades based on noise.
|
||||
color = lerp(color, float4(uSecondaryColor * 0.375, 1), pow(noiseColor.r, 3) * 0.3 + verticalFlowMovement * 0.3 + 0.13) * color.a;
|
||||
|
||||
return color * (1 + (1 - outlineFade) * 0.1);
|
||||
return color * sampleColor * (1 + (1 - outlineFade) * 0.1);
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -22,17 +22,17 @@ float2 InverseLerp(float2 start, float2 end, float2 x)
|
||||
return saturate((x - start) / (end - start));
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 framedCoords = (coords * uImageSize0 - uSourceRect.xy) / uSourceRect.zw;
|
||||
float4 color = tex2D(uImage0, coords);
|
||||
float sineTime = sin(uTime); // Saved so that I don't have the compute this multiple times. Shaders have a limited number of mathematical instructions you can use - 64.
|
||||
float2 modifiedCoords = coords;
|
||||
modifiedCoords.x += cos(uTime + framedCoords.y) * 0.5 + 0.5; // Cause the effect to sway around a bit with time.
|
||||
modifiedCoords.x += sin(uTime + framedCoords.y + 1.57) * 0.5 + 0.5; // Cause the effect to sway around a bit with time.
|
||||
|
||||
float4 noiseColor = tex2D(uImage1, frac(modifiedCoords));
|
||||
|
||||
float xMultiplier = cos(framedCoords.x * 2.3 + uTime * 1.15) + 0.5;
|
||||
float xMultiplier = sin(framedCoords.x * 2.3 + uTime * 1.15 + 1.57) + 0.5;
|
||||
float yMultiplier = (sin(framedCoords.y * 2 + uTime * 1.4) + 1) * 0.5;
|
||||
|
||||
color.rgb *= lerp(uColor, uSecondaryColor, saturate(xMultiplier * yMultiplier * 1.6));
|
||||
@@ -41,7 +41,7 @@ float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOO
|
||||
color.rgb *= 1.6; // Sometimes give light "patches" depending on the swaying noise image.
|
||||
}
|
||||
color.rgb *= 1.6; // Brighten the shader over time.
|
||||
return color;
|
||||
return color * sampleColor;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
|
||||
@@ -20,12 +20,12 @@ float4 uShaderSpecificData;
|
||||
|
||||
float2 RotatedBy(float2 xy, float theta)
|
||||
{
|
||||
return float2(xy.x * cos(theta) + xy.y * sin(theta), xy.x * sin(theta) - xy.y * cos(theta));
|
||||
return float2(xy.x * sin(theta + 1.57) - xy.y * sin(theta), xy.x * sin(theta) + xy.y * sin(theta + 1.57));
|
||||
}
|
||||
float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float2 worldPos = uWorldPosition + RotatedBy(coords - 0.5, uRotation - 1.57) * uSize;
|
||||
if (sign(dot(uIntersectionNormal, worldPos - uIntersectionPosition)) == uIntersectionCutoffDirection)
|
||||
float2 worldPos = uWorldPosition + RotatedBy(coords - 0.5, uRotation) * uSize;
|
||||
if (sign(dot(uIntersectionNormal, normalize(worldPos - uIntersectionPosition))) == uIntersectionCutoffDirection)
|
||||
return 0;
|
||||
|
||||
return tex2D(uImage0, coords) * sampleColor;
|
||||
|
||||
@@ -36,9 +36,9 @@ VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
VertexShaderOutput output = (VertexShaderOutput) 0;
|
||||
float2 coords = input.Coordinates - 0.5;
|
||||
float rotationSine = sin(uSaturation);
|
||||
float rotationCosine = cos(uSaturation);
|
||||
float rotationCosine = sin(uSaturation + 1.57);
|
||||
float rotationOriginSine = sin(uCircularRotation);
|
||||
float rotationOriginCosine = cos(uCircularRotation);
|
||||
float rotationOriginCosine = sin(uCircularRotation + 1.57);
|
||||
float2x2 rotationMatrix = float2x2(rotationCosine, -rotationSine, rotationSine, rotationCosine);
|
||||
float2x2 circularRotationMatrix = float2x2(rotationOriginCosine, -rotationOriginSine, rotationOriginSine, rotationOriginCosine);
|
||||
float2x2 scalingMatrix = float2x2(2, 0, 0, 1);
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("SirensHeart")]
|
||||
public class AquaticHeart : ModItem
|
||||
{
|
||||
public override void Load()
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class CheatTestThing : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("lul");
|
||||
Tooltip.SetDefault("Grants complete invulnerability to almost everything");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
Item.height = 26;
|
||||
Item.value = 0; // lul intentionally has zero value
|
||||
Item.Calamity().customRarity = CalamityRarity.HotPink;
|
||||
Item.accessory = true; // lul cannot be duplicated in Journey Mode
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().lol = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -87,7 +87,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ArtemisEmblem>().
|
||||
AddIngredient<DeadshotBrooch>().
|
||||
AddIngredient(ItemID.LunarBar).
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
|
||||
@@ -5,12 +5,13 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class ArtemisEmblem : ModItem
|
||||
[LegacyName("DaedalusEmblem")]
|
||||
public class DeadshotBrooch : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Artemis Emblem");
|
||||
DisplayName.SetDefault("Deadshot Brooch");
|
||||
Tooltip.SetDefault("10% increased ranged damage, 5% increased ranged critical strike chance and 20% reduced ammo usage\n" +
|
||||
"Greatly increases all ranged projectile velocity");
|
||||
}
|
||||
@@ -26,7 +27,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().artemisEmblem = true;
|
||||
player.Calamity().deadshotBrooch = true;
|
||||
player.Calamity().rangedAmmoCost *= 0.8f;
|
||||
player.GetDamage<RangedDamageClass>() += 0.1f;
|
||||
player.GetCritChance<RangedDamageClass>() += 5;
|
||||
|
Before Width: | Height: | Size: 870 B After Width: | Height: | Size: 870 B |
@@ -3,18 +3,34 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.World;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DraedonsHeart : ModItem
|
||||
{
|
||||
private const double ContactDamageReduction = 0.15D;
|
||||
|
||||
// Duration of Nanomachines in frames.
|
||||
internal static readonly int NanomachinesDuration = 120;
|
||||
|
||||
// Duration of time where Nanomachines won't accumulate after taking damage, in frames.
|
||||
internal static readonly int NanomachinePauseAfterDamage = 240;
|
||||
|
||||
internal static readonly int NanomachinesHeal = 240;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Draedon's Heart");
|
||||
Tooltip.SetDefault("Reduces the amount of defense damage you take by 50%\n" +
|
||||
"Standing still regenerates your life quickly, reduces your damage by 50% and boosts your defense by 75%\n" +
|
||||
"Nanomachines, son");
|
||||
Tooltip.SetDefault("15% reduced contact damage from enemies\n" +
|
||||
"Reduces defense damage taken by 50%\n" + "Replaces Adrenaline with the Nanomachines meter\n" +
|
||||
$"Unlike Adrenaline, you lose no Nanomachines when you take damage, but they stop accumulating for {NanomachinePauseAfterDamage / 60} seconds\n" +
|
||||
$"With full Nanomachines, press & to heal {NanomachinesHeal} health over {NanomachinesDuration / 60} seconds\n" +
|
||||
"While healing, wings are disabled and your mobility is crippled\n" +
|
||||
"'Nanomachines, son.'");
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 11));
|
||||
}
|
||||
|
||||
@@ -23,15 +39,43 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.width = 52;
|
||||
Item.height = 68;
|
||||
Item.accessory = true;
|
||||
Item.defense = 48;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
// TODO -- If you unequip Draedon's Heart, you should lose all Adrenaline.
|
||||
// TODO -- You should not be able to equip or unequip Draedon's Heart while Adrenaline is active.
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.draedonsHeart = true;
|
||||
modPlayer.AdrenalineDuration = NanomachinesDuration;
|
||||
modPlayer.contactDamageReduction += ContactDamageReduction;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
// The 3rd tooltip line "Replaces Adrenaline..." is replaced on Normal or Expert
|
||||
TooltipLine nanomachineMeterLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2");
|
||||
if (nanomachineMeterLine != null && !CalamityWorld.revenge)
|
||||
nanomachineMeterLine.Text = "Adds the Nanomachines meter";
|
||||
|
||||
// The 4th tooltip line "Unlike Adrenaline..." is replaced on Normal or Expert
|
||||
TooltipLine doesntStopOnDamageLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip3");
|
||||
if (doesntStopOnDamageLine != null && !CalamityWorld.revenge)
|
||||
doesntStopOnDamageLine.Text = "Nanomachines accumulate over time while fighting bosses\n" +
|
||||
$"Taking damage stops the accumulation for {NanomachinePauseAfterDamage / 60} seconds";
|
||||
|
||||
// The 5th tooltip line "With full Nanomachines" has the & replaced with the hotkey.
|
||||
string adrenKey = CalamityKeybinds.AdrenalineHotKey.TooltipHotkeyString();
|
||||
TooltipLine hotkeyLine = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip4");
|
||||
if (hotkeyLine != null)
|
||||
{
|
||||
string tooltipWithHotkey = hotkeyLine.Text.Replace("&", adrenKey);
|
||||
hotkeyLine.Text = tooltipWithHotkey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.GetCritChance<RangedDamageClass>() += 5;
|
||||
player.magicQuiver = true;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.artemisEmblem = true;
|
||||
modPlayer.deadshotBrooch = true;
|
||||
modPlayer.rangedAmmoCost *= 0.8f;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CreateRecipe().
|
||||
AddRecipeGroup("QuiversGroup").
|
||||
AddIngredient<ArtemisEmblem>().
|
||||
AddIngredient<DeadshotBrooch>().
|
||||
AddIngredient(ItemID.LunarBar, 8).
|
||||
AddIngredient<GalacticaSingularity>(4).
|
||||
AddIngredient<AscendantSpiritEssence>(4).
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("FabledTortoiseShell")]
|
||||
public class FlameLickedShell : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -4,6 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("DukeScales")]
|
||||
public class OldDukeScales : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if ((player.armor[0].type == ModContent.ItemType<DaedalusHat>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadgear>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHelm>() || player.armor[0].type == ModContent.ItemType<DaedalusHelmet>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusVisor>()) &&
|
||||
if ((player.armor[0].type == ModContent.ItemType<DaedalusHeadMagic>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadSummon>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHeadMelee>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadRanged>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHeadRogue>()) &&
|
||||
player.armor[1].type == ModContent.ItemType<DaedalusBreastplate>() && player.armor[2].type == ModContent.ItemType<DaedalusLeggings>())
|
||||
{
|
||||
player.endurance += 0.08f;
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
@@ -155,6 +157,11 @@ namespace CalamityMod.Items.Accessories
|
||||
// Stat tooltips are added dynamically.
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
|
||||
// Line 1: If not on Rev+, note that the accessory enables Rage.
|
||||
TooltipLine rageOverTimeLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip1");
|
||||
if (rageOverTimeLine != null && !CalamityWorld.revenge)
|
||||
rageOverTimeLine.Text = "Adds the Rage meter\n" + rageOverTimeLine.Text;
|
||||
|
||||
// Line 6: Current level
|
||||
sb.Append("Current level: ");
|
||||
sb.Append(level);
|
||||
|
||||
@@ -4,6 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("ChaosAmulet")]
|
||||
public class SpelunkersAmulet : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("SpiritGenerator")]
|
||||
public class SpiritGlyph : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -8,6 +8,7 @@ using CalamityMod.CalPlayer.Dashes;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("StatisBeltofCurses")]
|
||||
public class StatisVoidSash : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
@@ -39,7 +40,7 @@ namespace CalamityMod.Items.Accessories
|
||||
player.jumpSpeedBoost += 0.6f;
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
modPlayer.DashID = StatisBeltOfCursesDash.ID;
|
||||
modPlayer.DashID = StatisVoidSashDash.ID;
|
||||
player.dash = 0;
|
||||
player.spikedBoots = 2;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("Sponge")]
|
||||
public class TheSponge : ModItem
|
||||
{
|
||||
public override string Texture => (DateTime.Now.Month == 4 && DateTime.Now.Day == 1) ? "CalamityMod/Items/Accessories/TheSpongeReal" : "CalamityMod/Items/Accessories/TheSponge";
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria.DataStructures;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("UnstablePrism")]
|
||||
public class UnstableGraniteCore : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("CalamityRing")]
|
||||
public class VoidofCalamity : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -9,6 +9,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Balloon)]
|
||||
[LegacyName("SamuraiBadge")]
|
||||
public class WarbanneroftheSun : ModItem
|
||||
{
|
||||
internal const float MaxBonus = 0.2f;
|
||||
|
||||
@@ -10,6 +10,7 @@ using Terraria.DataStructures;
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
[AutoloadEquip(EquipType.Wings)]
|
||||
[LegacyName("AureateWings")]
|
||||
public class AureateBooster : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -10,6 +10,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
[AutoloadEquip(EquipType.Wings)]
|
||||
[LegacyName("DiscordianWings")]
|
||||
public class HadalMantle : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
@@ -36,10 +37,10 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if ((player.armor[0].type == ModContent.ItemType<AtaxiaHeadgear>() || player.armor[0].type == ModContent.ItemType<AtaxiaHelm>() ||
|
||||
player.armor[0].type == ModContent.ItemType<AtaxiaHelmet>() || player.armor[0].type == ModContent.ItemType<AtaxiaHood>() ||
|
||||
player.armor[0].type == ModContent.ItemType<AtaxiaMask>()) &&
|
||||
player.armor[1].type == ModContent.ItemType<AtaxiaArmor>() && player.armor[2].type == ModContent.ItemType<AtaxiaSubligar>())
|
||||
if ((player.armor[0].type == ModContent.ItemType<HydrothermicHeadRanged>() || player.armor[0].type == ModContent.ItemType<HydrothermicHeadMelee>() ||
|
||||
player.armor[0].type == ModContent.ItemType<HydrothermicHeadSummon>() || player.armor[0].type == ModContent.ItemType<HydrothermicHeadRogue>() ||
|
||||
player.armor[0].type == ModContent.ItemType<HydrothermicHeadMagic>()) &&
|
||||
player.armor[1].type == ModContent.ItemType<HydrothermicArmor>() && player.armor[2].type == ModContent.ItemType<HydrothermicSubligar>())
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.05f;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories.Wings
|
||||
{
|
||||
[AutoloadEquip(EquipType.Wings, EquipType.Shoes)]
|
||||
[LegacyName("InfinityBoots")]
|
||||
public class SeraphTracers : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if ((player.armor[0].type == ModContent.ItemType<DaedalusHat>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadgear>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHelm>() || player.armor[0].type == ModContent.ItemType<DaedalusHelmet>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusVisor>()) &&
|
||||
if ((player.armor[0].type == ModContent.ItemType<DaedalusHeadMagic>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadSummon>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHeadMelee>() || player.armor[0].type == ModContent.ItemType<DaedalusHeadRanged>() ||
|
||||
player.armor[0].type == ModContent.ItemType<DaedalusHeadRogue>()) &&
|
||||
player.armor[1].type == ModContent.ItemType<DaedalusBreastplate>() && player.armor[2].type == ModContent.ItemType<DaedalusLeggings>())
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() += 0.05f;
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
[LegacyName("AccelerationBullet")]
|
||||
public class AccelerationRound : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -6,6 +6,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
[LegacyName("AcidBullet")]
|
||||
public class AcidRound : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
[LegacyName("FlashBullet")]
|
||||
public class FlashRound : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -9,7 +9,8 @@ using CalamityMod.CalPlayer.Dashes;
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AuricTeslaHelm : ModItem
|
||||
[LegacyName("AuricTeslaHelm")]
|
||||
public class AuricTeslaRoyalHelm : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class DaedalusHat : ModItem
|
||||
[LegacyName("DaedalusHat")]
|
||||
public class DaedalusHeadMagic : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class DaedalusHelm : ModItem
|
||||
[LegacyName("DaedalusHelm")]
|
||||
public class DaedalusHeadMelee : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class DaedalusHelmet : ModItem
|
||||
[LegacyName("DaedalusHelmet")]
|
||||
public class DaedalusHeadRanged : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |