Finished up Angelic Alliance I guess
This commit is contained in:
1 parent
34fb59182d
commit
d4367a52b5
36 files changed
+451
-89
No files matched your search
@@ -7,7 +7,7 @@ namespace CalamityMod.Buffs.Cooldowns
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Divine Bless Cooldown");
|
||||
DisplayName.SetDefault("Divine Recharge");
|
||||
Description.SetDefault("Your divine powers are recharging");
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
|
||||
@@ -7,12 +7,13 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Kami Injection");
|
||||
DisplayName.SetDefault("Divine Bless");
|
||||
Description.SetDefault("+5% damage, increased health regen, attacks inflict Banishing Fire");
|
||||
Main.debuff[Type] = false;
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
longerExpertDebuff = false;
|
||||
canBeCleared = false;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -11,6 +11,7 @@ using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.DifficultyItems;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.TreasureBags;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
@@ -615,7 +616,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int roverFrameCounter = 0;
|
||||
public int roverFrame = 0;
|
||||
public bool angelicAlliance = false;
|
||||
public int angelicActivate = 0;
|
||||
public int angelicActivate = -1;
|
||||
#endregion
|
||||
|
||||
#region Armor Set
|
||||
@@ -2141,7 +2142,7 @@ namespace CalamityMod.CalPlayer
|
||||
ladHearts = 0;
|
||||
prismaticLasers = 0;
|
||||
roverDriveTimer = 0;
|
||||
angelicActivate = 0;
|
||||
angelicActivate = -1;
|
||||
resetHeightandWidth = false;
|
||||
noLifeRegen = false;
|
||||
|
||||
@@ -2794,12 +2795,31 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CalamityMod.AngelicAllianceHotKey.JustPressed && angelicAlliance && Main.myPlayer == player.whoAmI && !divineBless && !divineBlessCooldown)
|
||||
{
|
||||
int seconds = CalamityUtils.SecondsToFrames(profanedCrystal ? 60f : 30f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBless>(), seconds, false);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<AllianceTriangle>(), 0, 0f, player.whoAmI);
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AngelicAllianceActivation"), player.Center);
|
||||
|
||||
// Spawn an archangel for every minion you have
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
{
|
||||
Projectile proj = Main.projectile[projIndex];
|
||||
if (proj.minionSlots <= 0f || !proj.IsSummon())
|
||||
continue;
|
||||
if (proj.active && proj.owner == player.whoAmI)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<AngelicAllianceArchangel>(), proj.damage / 4, proj.knockBack / 4f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CalamityMod.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
|
||||
wearingRogueArmor && rogueStealthMax > 0 && !sandCloakCooldown)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<SandCloakCooldown>(), 1800, false); //30 seconds
|
||||
rogueStealth -= rogueStealthMax * 0.25f;
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 7, 8, player.whoAmI, 0, 0);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<SandCloakVeil>(), 7, 8, player.whoAmI);
|
||||
Main.PlaySound(SoundID.Item, player.position, 45);
|
||||
}
|
||||
if (CalamityMod.SpectralVeilHotKey.JustPressed && spectralVeil && Main.myPlayer == player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f &&
|
||||
@@ -4369,7 +4389,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was turned to ashes by the Profaned Goddess.");
|
||||
}
|
||||
if (hFlames)
|
||||
if (hFlames || banishingFire)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(player.name + " fell prey to their sins.");
|
||||
}
|
||||
@@ -5107,6 +5127,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageMult += 0.1;
|
||||
}
|
||||
if (angelicAlliance && heldItem.type == ModContent.ItemType<KnowledgeProvidence>() && !hasClassType)
|
||||
{
|
||||
damageMult += 0.3;
|
||||
}
|
||||
if (silvaMelee && Main.rand.NextBool(4) && isTrueMelee)
|
||||
{
|
||||
damageMult += 4.0;
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -472,7 +473,7 @@ namespace CalamityMod.CalPlayer
|
||||
int totalMoonlightDyes = drawPlayer.dye.Count(dyeItem => dyeItem.type == ModContent.ItemType<ProfanedMoonlightDye>());
|
||||
if (totalMoonlightDyes <= 0)
|
||||
return;
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 5 + (int)MathHelper.Clamp(totalMoonlightDyes, 0f, 4f) * 2, MathHelper.Clamp(totalMoonlightDyes / 3f, 0f, 1f), GetCurrentMoonlightDyeColor(incrementOffsetAngle));
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 5 + (int)MathHelper.Clamp(totalMoonlightDyes, 0f, 4f) * 2, MathHelper.Clamp(totalMoonlightDyes / 3f, 0f, 1f), GetCurrentMoonlightDyeColor(), true);
|
||||
});
|
||||
|
||||
public static readonly PlayerLayer AuralisAuroraEffects = new PlayerLayer("CalamityMod", "AuralisAurora", PlayerLayer.Body, drawInfo =>
|
||||
@@ -488,7 +489,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
CalamityPlayer modPlayer = drawPlayer.Calamity();
|
||||
if (modPlayer.angelicActivate <= 0)
|
||||
if (drawPlayer.ownedProjectileCounts[ModContent.ProjectileType<AllianceTriangle>()] <= 0)
|
||||
return;
|
||||
CalamityUtils.DrawAuroras(drawPlayer, 7, 0.4f, CalamityUtils.ColorSwap(new Color(255, 163, 56), new Color(242, 48, 187), 3f));
|
||||
});
|
||||
|
||||
@@ -771,7 +771,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
player.lifeRegenTime++;
|
||||
|
||||
int lifeRegenTimeMaxBoost2 = 250;
|
||||
int lifeRegenMaxBoost2 = 1;
|
||||
float lifeRegenLifeRegenTimeMaxBoost2 = 4f;
|
||||
|
||||
|
||||
@@ -1053,8 +1053,6 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.auralisAurora--;
|
||||
if (modPlayer.auralisAuroraCooldown > 0)
|
||||
modPlayer.auralisAuroraCooldown--;
|
||||
if (modPlayer.angelicActivate > 0)
|
||||
modPlayer.angelicActivate--;
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
@@ -1901,6 +1899,13 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.prismaticLasers = 1800;
|
||||
player.AddBuff(ModContent.BuffType<PrismaticCooldown>(), CalamityUtils.SecondsToFrames(30f), true);
|
||||
}
|
||||
if (!modPlayer.angelicAlliance && modPlayer.divineBless)
|
||||
{
|
||||
modPlayer.divineBless = false;
|
||||
player.ClearBuff(ModContent.BuffType<DivineBless>());
|
||||
int seconds = CalamityUtils.SecondsToFrames(modPlayer.profanedCrystal ? 90f : 120f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBlessCooldown>(), seconds, false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -3499,15 +3504,16 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool crystal = modPlayer.profanedCrystal && !modPlayer.profanedCrystalForce;
|
||||
bool summonSet = modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon || modPlayer.dsSetBonus || modPlayer.omegaBlueSet || modPlayer.fearmongerSet;
|
||||
int guardianAmt = modPlayer.angelicAlliance ? 3 : 1;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
|
||||
|
||||
if (crystal || player.Calamity().minionSlotStat >= 10)
|
||||
{
|
||||
player.Calamity().gDefense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
@@ -3515,7 +3521,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
player.Calamity().gOffense = true;
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < 1)
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
@@ -3554,7 +3560,7 @@ namespace CalamityMod.CalPlayer
|
||||
bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5);
|
||||
bool notRetro = Lighting.NotRetro;
|
||||
if (!modPlayer.ZoneAbyss) //No abyss memes.
|
||||
Lighting.AddLight(player.Center, enrage ? 60 : offenseBuffs ? 50 : 10, enrage ? 12 : offenseBuffs ? 10 : 2, 0);
|
||||
Lighting.AddLight(player.Center, enrage ? 6 : offenseBuffs ? 5 : 1, enrage ? 1.2 : offenseBuffs ? 1 : 0.2, 0);
|
||||
if (enrage)
|
||||
{
|
||||
bool special = player.name == "Amber" || player.name == "Nincity" || player.name == "IbanPlay" || player.name == "Chen"; //People who either helped create the item or test it.
|
||||
@@ -3606,11 +3612,17 @@ namespace CalamityMod.CalPlayer
|
||||
ModContent.ProjectileType<FungalClumpMinion>(),
|
||||
ModContent.ProjectileType<HowlsHeartHowl>(),
|
||||
ModContent.ProjectileType<HowlsHeartCalcifer>(),
|
||||
ModContent.ProjectileType<HowlsHeartTurnipHead>()
|
||||
ModContent.ProjectileType<HowlsHeartTurnipHead>(),
|
||||
ModContent.ProjectileType<MiniGuardianAttack>(),
|
||||
ModContent.ProjectileType<MiniGuardianDefense>(),
|
||||
ModContent.ProjectileType<MiniGuardianHealer>()
|
||||
};
|
||||
int projAmt = 1;
|
||||
for (int i = 0; i < summonDeleteList.Count; i++)
|
||||
{
|
||||
if (player.ownedProjectileCounts[summonDeleteList[i]] > 1)
|
||||
if (i > 9 && modPlayer.angelicAlliance) // PSA donuts
|
||||
projAmt = 3;
|
||||
if (player.ownedProjectileCounts[summonDeleteList[i]] > projAmt)
|
||||
{
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
{
|
||||
@@ -3767,6 +3779,27 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.angelicAlliance && Main.myPlayer == player.whoAmI)
|
||||
{
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = player.buffType[l];
|
||||
if (hasBuff == ModContent.BuffType<DivineBless>())
|
||||
{
|
||||
modPlayer.angelicActivate = player.buffTime[l];
|
||||
}
|
||||
}
|
||||
if (modPlayer.angelicActivate == 1)
|
||||
{
|
||||
int seconds = CalamityUtils.SecondsToFrames(modPlayer.profanedCrystal ? 90f : 120f);
|
||||
player.AddBuff(ModContent.BuffType<DivineBlessCooldown>(), seconds, false);
|
||||
}
|
||||
if (player.FindBuffIndex(ModContent.BuffType<DivineBless>()) == -1)
|
||||
modPlayer.angelicActivate = -1;
|
||||
if (modPlayer.divineBless)
|
||||
player.allDamage += 0.05f;
|
||||
}
|
||||
|
||||
if (modPlayer.theBee)
|
||||
{
|
||||
if (player.statLife >= player.statLifeMax2)
|
||||
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Armor;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.Projectiles;
|
||||
using CalamityMod.Projectiles.Healing;
|
||||
@@ -745,6 +746,14 @@ namespace CalamityMod.CalPlayer
|
||||
public static void NPCDebuffs(Player player, Mod mod, NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool proj)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.angelicAlliance && player.ActiveItem().type == ItemType<KnowledgeProfanedGuardians>())
|
||||
{
|
||||
if (Main.rand.NextBool(10) || modPlayer.divineBless)
|
||||
{
|
||||
target.AddBuff(BuffType<BanishingFire>(), 60, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (melee) //prevents Deep Sea Dumbell from snagging true melee debuff memes
|
||||
{
|
||||
if (modPlayer.eGauntlet)
|
||||
@@ -930,6 +939,13 @@ namespace CalamityMod.CalPlayer
|
||||
public static void PvpDebuffs(Player player, Mod mod, Player target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool proj)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.angelicAlliance && player.ActiveItem().type == ItemType<KnowledgeProfanedGuardians>())
|
||||
{
|
||||
if (Main.rand.NextBool(10) || modPlayer.divineBless)
|
||||
{
|
||||
target.AddBuff(BuffType<BanishingFire>(), 60, false);
|
||||
}
|
||||
}
|
||||
if (melee)
|
||||
{
|
||||
if (modPlayer.eGauntlet)
|
||||
|
||||
@@ -14,9 +14,17 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Angelic Alliance");
|
||||
Tooltip.SetDefault("Increases all damage by 10%\n" +
|
||||
"Add some extra tooltip shit\n" +
|
||||
"Something something hotkey");
|
||||
Tooltip.SetDefault("Call upon the force of heaven to empower your attacks and minions\n" +
|
||||
"Further Empowerment to Holy Forces\n" +
|
||||
"Courage, Enlightenment, Bliss. United in Judgement\n" +
|
||||
"10% increased damage\n" +
|
||||
"While holding the Profaned Guardians Lore item, all attacks have a chance to inflict Banishing Fire\n" +
|
||||
"While holding the Providence Lore item, classless projectiles deal increased damage and the Holy Flames debuff deals more damage\n" +
|
||||
"While the Profaned Soul Crystal is equipped, additional guardians will be summoned for a total of nine\n" + //This is going to be broken as fuck because the angels aren't already, y'know?
|
||||
"This line is modified below. If you can read this, someone probably did something wrong (It was Ben)\n" +
|
||||
"While under the effects of Divine Bless, for every minion you have, an archangel shall be summoned to aid you in combat\n" +
|
||||
"Divine Bless also boosts your life regeneration and grants an additional +5% increased damage\n" +
|
||||
"This line is also modified below, kinda sus");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -31,12 +39,19 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
string hotkey = CalamityMod.AngelicAllianceHotkey.TooltipHotkeyString();
|
||||
string hotkey = CalamityMod.AngelicAllianceHotKey.TooltipHotkeyString();
|
||||
bool crystal = Main.player[Main.myPlayer].Calamity().profanedCrystal;
|
||||
int time = crystal ? 60 : 30;
|
||||
string time2 = crystal ? "1.5" : "2";
|
||||
foreach (TooltipLine line2 in list)
|
||||
{
|
||||
if (line2.mod == "Terraria" && line2.Name == "Tooltip2")
|
||||
if (line2.mod == "Terraria" && line2.Name == "Tooltip7")
|
||||
{
|
||||
line2.text = "Press " + hotkey + " to consume 25% of your maximum stealth to perform a short range teleport and render you momentarily invulnerable";
|
||||
line2.text = "Press " + hotkey + " to grace yourself in divinity for " + time + " seconds";
|
||||
}
|
||||
if (line2.mod == "Terraria" && line2.Name == "Tooltip10")
|
||||
{
|
||||
line2.text = "This effect has a cooldown of " + time2 + " minutes";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,7 +531,6 @@ namespace CalamityMod
|
||||
List<int> loot = new List<int>() { ItemType<YharonBag>(), ItemType<HellcasterFragment>(), ItemType<DragonRage>(), ItemType<TheBurningSky>(), ItemType<DragonsBreath>(), ItemType<ChickenCannon>(), ItemType<PhoenixFlameBarrage>(), ItemType<AngryChickenStaff>(), ItemType<ProfanedTrident>(), ItemType<FinalDawn>(), ItemType<VoidVortex>(), ItemType<YharimsCrystal>(), ItemType<YharimsGift>(), ItemType<DrewsWings>(), /*ItemType<BossRush>(), */ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<YharonTrophy>(), ItemType<YharonMask>(), ItemType<KnowledgeYharon>(), ItemType<ForgottenDragonEgg>(), ItemType<FoxDrive>() };
|
||||
string instructions = $"Use a [i:{summon}] in the Jungle Biome";
|
||||
// TODO -- this setup code is only run once, so the despawn message can't be changed post-eclipse. Find a way around this.
|
||||
string despawn = CalamityUtils.ColorMessage("Yharon found you too weak to stay near your gravestone.", new Color(0xFF, 0xA5, 0x00));
|
||||
string bossLogTex = "CalamityMod/NPCs/Yharon/Yharon_BossChecklist";
|
||||
AddBoss(bossChecklist, calamity, "Yharon", order, type, DownedYharon, summon, loot, collection, instructions, despawn, bossLogTex);
|
||||
@@ -542,7 +541,7 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("SupremeCalamitas", out float order);
|
||||
int type = NPCType<SupremeCalamitas>();
|
||||
int summon = ItemType<EyeofExtinction>();
|
||||
List<int> loot = new List<int>() { ItemType<CalamitousEssence>(), ItemType<Animus>(), ItemType<Azathoth>(), ItemType<Contagion>(), ItemType<CrystylCrusher>(), ItemType<Judgement>(), ItemType<DraconicDestruction>(), ItemType<Earth>(), ItemType<Endogenesis>(), ItemType<Fabstaff>(), ItemType<RoyalKnivesMelee>(), ItemType<NanoblackReaperRogue>(), ItemType<RedSun>(), ItemType<ScarletDevil>(), ItemType<SomaPrime>(), ItemType<BlushieStaff>(), ItemType<Svantechnical>(), ItemType<BensUmbrella>(), ItemType<TriactisTruePaladinianMageHammerofMightMelee>(), ItemType<Megafleet>(), ItemType<PrototypeAndromechaRing>(), ItemType<Vehemenc>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> loot = new List<int>() { ItemType<CalamitousEssence>(), ItemType<Animus>(), ItemType<Azathoth>(), ItemType<Contagion>(), ItemType<CrystylCrusher>(), ItemType<Judgement>(), ItemType<DraconicDestruction>(), ItemType<Earth>(), ItemType<Endogenesis>(), ItemType<Fabstaff>(), ItemType<RoyalKnivesMelee>(), ItemType<NanoblackReaperRogue>(), ItemType<RedSun>(), ItemType<ScarletDevil>(), ItemType<SomaPrime>(), ItemType<BlushieStaff>(), ItemType<Svantechnical>(), ItemType<BensUmbrella>(), ItemType<TriactisTruePaladinianMageHammerofMightMelee>(), ItemType<Megafleet>(), ItemType<PrototypeAndromechaRing>(), ItemType<Vehemenc>(), ItemType<AngelicAlliance>(), ItemType<OmegaHealingPotion>() };
|
||||
List<int> collection = new List<int>() { ItemType<SupremeCalamitasTrophy>(), ItemType<KnowledgeCalamitas>(), ItemType<BrimstoneJewel>(), ItemType<Levi>() };
|
||||
string instructions = $"Use an [i:{summon}]";
|
||||
string despawn = CalamityUtils.ColorMessage("Please don't waste my time.", new Color(0xFF, 0xA5, 0x00));
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.AquaticScourge;
|
||||
@@ -715,10 +716,26 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
bool allianceBoost = false;
|
||||
if (hFlames > 0)
|
||||
{
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.dead)
|
||||
continue;
|
||||
if (player.ActiveItem().type == ModContent.ItemType<KnowledgeProvidence>() && player.Calamity().angelicAlliance)
|
||||
{
|
||||
allianceBoost = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Oiled debuff makes flame debuffs 25% more effective
|
||||
if (npc.oiled)
|
||||
{
|
||||
int oiledDoT = (bFlames > 0 ? 10 : 0) + (hFlames > 0 ? 13 : 0) + (gsInferno > 0 ? 63 : 0) + (aFlames > 0 ? 32 : 0) + (dFlames > 0 ? 625 : 0) + (banishingFire > 0 ? 375 : 0);
|
||||
int oiledDoT = (bFlames > 0 ? 10 : 0) + (hFlames > 0 ? 13 : 0) + (allianceBoost ? 13 : 0) + (gsInferno > 0 ? 63 : 0) + (aFlames > 0 ? 32 : 0) + (dFlames > 0 ? 625 : 0) + (banishingFire > 0 ? 375 : 0);
|
||||
if (oiledDoT > 0)
|
||||
{
|
||||
int lifeRegenValue = oiledDoT * 4 + 12;
|
||||
@@ -731,7 +748,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
ApplyDPSDebuff(vaporfied, 30, 6, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(bFlames, 40, 8, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(hFlames, 50, 10, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(hFlames, allianceBoost ? 100 : 50, allianceBoost ? 20 : 10, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(pFlames, 100, 20, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(gsInferno, 250, 50, ref npc.lifeRegen, ref damage);
|
||||
ApplyDPSDebuff(astralInfection, 75, 15, ref npc.lifeRegen, ref damage);
|
||||
@@ -3840,7 +3857,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
if (hFlames > 0)
|
||||
if (hFlames > 0 || banishingFire > 0)
|
||||
{
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace CalamityMod.NPCs.GreatSandShark
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.behindTiles = true;
|
||||
npc.netAlways = true;
|
||||
npc.HitSound = SoundID.NPCHit1;
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.HitSound = SoundID.NPCHit56;
|
||||
npc.DeathSound = SoundID.NPCDeath60;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SulphuricPoisoning>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.HitSound = SoundID.NPCHit1;
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
npc.buffImmune[ModContent.BuffType<GodSlayerInferno>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<Nightwither>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<Shred>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.netAlways = true;
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.boss = true;
|
||||
npc.alpha = 255;
|
||||
npc.HitSound = SoundID.NPCHit41;
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.alpha = 255;
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.alpha = 255;
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<Shred>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
npc.buffImmune[ModContent.BuffType<Shred>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.noTileCollide = true;
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
npc.buffImmune[ModContent.BuffType<WarCleave>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<WhisperingDeath>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<SilvaStun>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.netAlways = true;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -40,6 +41,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
npc.buffImmune[BuffID.Ichor] = false;
|
||||
npc.buffImmune[BuffID.CursedInferno] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
}
|
||||
|
||||
@@ -2060,6 +2060,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
// Rejoice! Hybrid weapons are no more, so this list is no longer cluttered.
|
||||
DropHelper.DropItemFromSetCondition(npc, true, Main.expertMode,
|
||||
ModContent.ItemType<Animus>(),
|
||||
ModContent.ItemType<AngelicAlliance>(),
|
||||
ModContent.ItemType<Azathoth>(),
|
||||
ModContent.ItemType<Contagion>(),
|
||||
ModContent.ItemType<CrystylCrusher>(),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -46,6 +47,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
npc.buffImmune[BuffID.Ichor] = false;
|
||||
npc.buffImmune[BuffID.CursedInferno] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -48,6 +49,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
npc.buffImmune[BuffID.Ichor] = false;
|
||||
npc.buffImmune[BuffID.CursedInferno] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ namespace CalamityMod.NPCs.Yharon
|
||||
npc.buffImmune[BuffID.CursedInferno] = false;
|
||||
npc.buffImmune[ModContent.BuffType<DemonFlames>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<Shred>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<BanishingFire>()] = false;
|
||||
|
||||
npc.DR_NERD(normalDR, null, null, null, true);
|
||||
CalamityGlobalNPC global = npc.Calamity();
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class AngelicAllianceArchangel : ModProjectile
|
||||
{
|
||||
private int lifeSpan = 300;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Archangel");
|
||||
Main.projFrames[projectile.type] = 4;
|
||||
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 60;
|
||||
projectile.height = 68;
|
||||
projectile.netImportant = true;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 20;
|
||||
projectile.minionSlots = 0f;
|
||||
projectile.penetrate = -1;
|
||||
projectile.tileCollide = false;
|
||||
projectile.minion = true;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer) => writer.Write(lifeSpan);
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader) => lifeSpan = reader.ReadInt32();
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (!modPlayer.divineBless)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
lifeSpan--;
|
||||
if (lifeSpan <= 0)
|
||||
{
|
||||
projectile.alpha += 30;
|
||||
if (projectile.alpha >= 255)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
int dustAmt = 30;
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
{
|
||||
int idx = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, (int)CalamityDusts.ProfanedFire, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[idx].velocity *= 2f;
|
||||
Main.dust[idx].scale *= 1.15f;
|
||||
}
|
||||
projectile.localAI[0] += 1f;
|
||||
}
|
||||
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
{
|
||||
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue *
|
||||
player.MinionDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
|
||||
//Adjust sprite direction so it faces correctly
|
||||
if (Math.Abs(projectile.velocity.X) > 0.2f)
|
||||
{
|
||||
projectile.spriteDirection = -projectile.direction;
|
||||
}
|
||||
|
||||
projectile.ChargingMinionAI(1600f, 1800f, 2500f, 400f, 0, 30f, 24f, 12f, new Vector2(0f, -60f), 30f, 10f, true, true);
|
||||
|
||||
//Give off some light
|
||||
float lightScalar = Main.rand.NextFloat(0.9f, 1.1f) * Main.essScale;
|
||||
Lighting.AddLight(projectile.Center, 0.2f * lightScalar, 0.17f * lightScalar, 0.1f * lightScalar);
|
||||
|
||||
if (!projectile.FinalExtraUpdate())
|
||||
return;
|
||||
|
||||
//Frames
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 7)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame > 3)
|
||||
{
|
||||
projectile.frame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
Texture2D texture = Main.projectileTexture[projectile.type];
|
||||
int frameHeight = texture.Height / Main.projFrames[projectile.type];
|
||||
int frameY = frameHeight * projectile.frame;
|
||||
Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, spriteEffects, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit) => target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
|
||||
public override bool CanDamage() => projectile.alpha < 50;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -98,8 +99,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.tileCollide = false;
|
||||
int num17 = 100;
|
||||
Vector2 vector3 = projectile.Center;
|
||||
float num18 = Main.player[projectile.owner].Center.X - vector3.X;
|
||||
float num19 = Main.player[projectile.owner].Center.Y - vector3.Y;
|
||||
float num18 = player.Center.X - vector3.X;
|
||||
float num19 = player.Center.Y - vector3.Y;
|
||||
num19 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)(60 * -(float)Main.player[projectile.owner].direction);
|
||||
@@ -107,8 +108,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19));
|
||||
float num21 = 18f;
|
||||
|
||||
if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f &&
|
||||
projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height &&
|
||||
if (num20 < (float)num17 && player.velocity.Y == 0f &&
|
||||
projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height &&
|
||||
!Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
|
||||
{
|
||||
projectile.ai[0] = 0f;
|
||||
@@ -119,8 +120,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
if (num20 > 2000f)
|
||||
{
|
||||
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
|
||||
projectile.position = player.position;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (num20 < 50f)
|
||||
@@ -148,34 +148,34 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
if (projectile.velocity.X < num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X < 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.X > num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X > 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y < num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16;
|
||||
projectile.velocity.Y += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y < 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16 * 2f;
|
||||
projectile.velocity.Y += num16 * 2f;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y > num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16;
|
||||
projectile.velocity.Y -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16 * 2f;
|
||||
projectile.velocity.Y -= num16 * 2f;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -246,6 +246,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
projectile.MinionAntiClump();
|
||||
float num535 = projectile.position.X;
|
||||
float num536 = projectile.position.Y;
|
||||
float num537 = 3000f;
|
||||
@@ -253,9 +254,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC;
|
||||
if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2);
|
||||
float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2);
|
||||
float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540);
|
||||
float num539 = ownerMinionAttackTargetNPC2.Center.X;
|
||||
float num540 = ownerMinionAttackTargetNPC2.Center.Y;
|
||||
float num541 = Math.Abs(projectile.Center.X - num539) + Math.Abs(projectile.Center.Y - num540);
|
||||
if (num541 < num537)
|
||||
{
|
||||
num537 = num541;
|
||||
@@ -271,9 +272,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
if (Main.npc[num542].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2);
|
||||
float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2);
|
||||
float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544);
|
||||
float num543 = Main.npc[num542].Center.X;
|
||||
float num544 = Main.npc[num542].Center.Y;
|
||||
float num545 = Math.Abs(projectile.Center.X - num543) + Math.Abs(projectile.Center.Y - num544);
|
||||
if (num545 < num537)
|
||||
{
|
||||
num537 = num545;
|
||||
@@ -325,5 +326,17 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.frame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.player[projectile.owner].Calamity().angelicAlliance)
|
||||
target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
if (Main.player[projectile.owner].Calamity().angelicAlliance)
|
||||
target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -96,17 +97,17 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.tileCollide = false;
|
||||
int num17 = 100;
|
||||
Vector2 vector3 = projectile.Center;
|
||||
float num18 = Main.player[projectile.owner].Center.X - vector3.X;
|
||||
float num19 = Main.player[projectile.owner].Center.Y - vector3.Y;
|
||||
float num18 = player.Center.X - vector3.X;
|
||||
float num19 = player.Center.Y - vector3.Y;
|
||||
num19 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)(60 * -(float)Main.player[projectile.owner].direction);
|
||||
num18 += (float)(60 * -(float)player.direction);
|
||||
num19 -= 60f;
|
||||
float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19));
|
||||
float num21 = 18f;
|
||||
|
||||
if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f &&
|
||||
projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height &&
|
||||
if (num20 < (float)num17 && player.velocity.Y == 0f &&
|
||||
projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height &&
|
||||
!Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
|
||||
{
|
||||
projectile.ai[0] = 0f;
|
||||
@@ -117,8 +118,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
if (num20 > 2000f)
|
||||
{
|
||||
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
|
||||
projectile.position = player.position;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (num20 < 50f)
|
||||
@@ -146,34 +146,34 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
if (projectile.velocity.X < num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X < 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.X > num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X > 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y < num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16;
|
||||
projectile.velocity.Y += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y < 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16 * 2f;
|
||||
projectile.velocity.Y += num16 * 2f;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y > num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16;
|
||||
projectile.velocity.Y -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16 * 2f;
|
||||
projectile.velocity.Y -= num16 * 2f;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -244,6 +244,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
projectile.MinionAntiClump();
|
||||
float num535 = projectile.position.X;
|
||||
float num536 = projectile.position.Y;
|
||||
float num537 = 3000f;
|
||||
@@ -251,9 +252,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC;
|
||||
if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2);
|
||||
float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2);
|
||||
float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540);
|
||||
float num539 = ownerMinionAttackTargetNPC2.Center.X;
|
||||
float num540 = ownerMinionAttackTargetNPC2.Center.Y;
|
||||
float num541 = Math.Abs(projectile.Center.X - num539) + Math.Abs(projectile.Center.Y - num540);
|
||||
if (num541 < num537)
|
||||
{
|
||||
num537 = num541;
|
||||
@@ -269,9 +270,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
if (Main.npc[num542].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2);
|
||||
float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2);
|
||||
float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544);
|
||||
float num543 = Main.npc[num542].Center.X;
|
||||
float num544 = Main.npc[num542].Center.Y;
|
||||
float num545 = Math.Abs(projectile.Center.X - num543) + Math.Abs(projectile.Center.Y - num544);
|
||||
if (num545 < num537)
|
||||
{
|
||||
num537 = num545;
|
||||
@@ -321,5 +322,17 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.frame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.player[projectile.owner].Calamity().angelicAlliance)
|
||||
target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
if (Main.player[projectile.owner].Calamity().angelicAlliance)
|
||||
target.AddBuff(ModContent.BuffType<BanishingFire>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,13 +57,14 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
projectile.MinionAntiClump();
|
||||
Player projOwner = Main.player[projectile.owner];
|
||||
float num16 = 0.5f;
|
||||
projectile.tileCollide = false;
|
||||
int num17 = 100;
|
||||
Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
|
||||
float num18 = projOwner.position.X + (float)(projOwner.width / 2) - vector3.X;
|
||||
float num19 = projOwner.position.Y + (float)(projOwner.height / 2) - vector3.Y;
|
||||
Vector2 vector3 = projectile.Center;
|
||||
float num18 = projOwner.Center.X - vector3.X;
|
||||
float num19 = projOwner.Center.Y - vector3.Y;
|
||||
num19 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)Main.rand.Next(-10, 21);
|
||||
num18 += (float)(60 * -(float)projOwner.direction);
|
||||
@@ -83,8 +84,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
if (num20 > 2000f)
|
||||
{
|
||||
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
|
||||
projectile.position = projOwner.position;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (num20 < 50f)
|
||||
@@ -112,46 +112,46 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
if (projectile.velocity.X < num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X < 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X + num16;
|
||||
projectile.velocity.X += num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.X > num18)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.X > 0f)
|
||||
{
|
||||
projectile.velocity.X = projectile.velocity.X - num16;
|
||||
projectile.velocity.X -= num16;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y < num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16;
|
||||
projectile.velocity.Y += num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y < 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y + num16 * 2f;
|
||||
projectile.velocity.Y += num16 * 2f;
|
||||
}
|
||||
}
|
||||
if (projectile.velocity.Y > num19)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16;
|
||||
projectile.velocity.Y -= num16;
|
||||
if (num16 > 0.05f && projectile.velocity.Y > 0f)
|
||||
{
|
||||
projectile.velocity.Y = projectile.velocity.Y - num16 * 2f;
|
||||
projectile.velocity.Y -= num16 * 2f;
|
||||
}
|
||||
}
|
||||
if ((double)projectile.velocity.X > 0.25)
|
||||
if (projectile.velocity.X > 0.25f)
|
||||
{
|
||||
projectile.direction = -1;
|
||||
}
|
||||
else if ((double)projectile.velocity.X < -0.25)
|
||||
else if (projectile.velocity.X < -0.25f)
|
||||
{
|
||||
projectile.direction = 1;
|
||||
}
|
||||
|
||||
if ((double)Math.Abs(projectile.velocity.X) > 0.2)
|
||||
if (Math.Abs(projectile.velocity.X) > 0.2f)
|
||||
{
|
||||
projectile.spriteDirection = -projectile.direction;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class AllianceTriangle : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Alliance Triangle");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 154;
|
||||
projectile.height = 134;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.alpha = 254;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
Lighting.AddLight(projectile.Center, new Vector3(240, 185, 7) * (3f / 255));
|
||||
projectile.Center = player.Center;
|
||||
|
||||
projectile.ai[0]++;
|
||||
if (projectile.ai[0] <= 30f)
|
||||
{
|
||||
projectile.alpha -= 75;
|
||||
if (projectile.alpha < 0)
|
||||
projectile.alpha = 0;
|
||||
}
|
||||
else if (projectile.ai[0] > 120f)
|
||||
projectile.alpha += 50;
|
||||
|
||||
if (projectile.alpha >= 255 || player is null || player.dead)
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
if (projectile.alpha <= 0)
|
||||
return new Color(200, 200, 200, 200);
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool CanDamage() => false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Sounds.Custom
|
||||
{
|
||||
public class AngelicAllianceActivation : ModSound
|
||||
{
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume * 1f;
|
||||
soundInstance.Pan = pan;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
return soundInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1515,8 +1515,7 @@ namespace CalamityMod
|
||||
//Teleport to the player if abnormally far
|
||||
if (playerDist > 2000f)
|
||||
{
|
||||
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2);
|
||||
projectile.position = player.Center;
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
//If more than 70 pixels away, move toward the player
|
||||
@@ -3558,7 +3557,7 @@ namespace CalamityMod
|
||||
spriteBatch.Draw(glowmaskTexture, item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public static void DrawAuroras(Player player, float auroraCount, float opacity, Color color)
|
||||
public static void DrawAuroras(Player player, float auroraCount, float opacity, Color color, bool provDye = false)
|
||||
{
|
||||
float time = Main.GlobalTime % 3f / 3f;
|
||||
Texture2D auroraTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/AuroraTexture");
|
||||
@@ -3569,6 +3568,11 @@ namespace CalamityMod
|
||||
float yOffset = (float)Math.Sin(time * MathHelper.TwoPi + incrementOffsetAngle * 2f + MathHelper.ToRadians(60f)) * 6f;
|
||||
float rotation = (float)Math.Sin(incrementOffsetAngle) * MathHelper.Pi / 12f;
|
||||
Vector2 offset = new Vector2(xOffset, yOffset - 14f);
|
||||
|
||||
//Profaned Moonlight Dye because it needs to use something inside the loop
|
||||
if (provDye)
|
||||
color = CalamityPlayerDrawEffects.GetCurrentMoonlightDyeColor(incrementOffsetAngle);
|
||||
|
||||
DrawData drawData = new DrawData(auroraTexture,
|
||||
player.Top + offset - Main.screenPosition,
|
||||
null,
|
||||
|
||||
Reference in new issue
Block a user