Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
bd03312b2b
6 files changed
+26
-15
No files matched your search
@@ -364,7 +364,7 @@ namespace CalamityMod
|
||||
"Ceaseless Void",
|
||||
(Func<bool>)(() => CalamityWorld.downedSentinel1),
|
||||
ModContent.ItemType<RuneofCos>(),
|
||||
new List<int>() {ModContent.ItemType<CeaselessVoidTrophy>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<CeaselessVoidTrophy>(), ModContent.ItemType<CeaselessVoidMask>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<DarkPlasma>(), ModContent.ItemType<MirrorBlade>(), ModContent.ItemType<ArcanumoftheVoid>(), ModContent.ItemType<TheEvolution>(), ItemID.SuperHealingPotion}, "Use a [i:" + ModContent.ItemType<RuneofCos>() + "] in the Dungeon",
|
||||
"[c/4B0082:The rift in time and space has moved away from your reach.]");
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace CalamityMod
|
||||
calamity,
|
||||
"Storm Weaver",
|
||||
(Func<bool>)(() => CalamityWorld.downedSentinel2), ModContent.ItemType<RuneofCos>(),
|
||||
new List<int>() {ModContent.ItemType<WeaverTrophy>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<WeaverTrophy>(), ModContent.ItemType<StormWeaverMask>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<ArmoredShell>(), ModContent.ItemType<TheStorm>(), ModContent.ItemType<StormDragoon>(), ItemID.SuperHealingPotion},
|
||||
"Use a [i:" + ModContent.ItemType<RuneofCos>() + "] in Space",
|
||||
"[c/EE82EE:Storm Weaver hid itself once again within the stormfront.]",
|
||||
@@ -391,7 +391,7 @@ namespace CalamityMod
|
||||
"Signus",
|
||||
(Func<bool>)(() => CalamityWorld.downedSentinel3),
|
||||
ModContent.ItemType<RuneofCos>(),
|
||||
new List<int>() {ModContent.ItemType<SignusTrophy>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<SignusTrophy>(), ModContent.ItemType<SignusMask>(), ModContent.ItemType<KnowledgeSentinels>()},
|
||||
new List<int>() {ModContent.ItemType<TwistingNether>(), ModContent.ItemType<Cosmilamp>(), ModContent.ItemType<CosmicKunai>(), ModContent.ItemType<SpectralVeil>(), ItemID.SuperHealingPotion},
|
||||
"Use a [i:" + ModContent.ItemType<RuneofCos>() + "] in the Underworld",
|
||||
"[c/BA55D3:The Devourer's assassin has finished its easy task.]");
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void NPCLoot()
|
||||
{
|
||||
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType<Phantoplasm>());
|
||||
DropHelper.DropItem(npc, ModContent.ItemType<Phantoplasm>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
public override void NPCLoot()
|
||||
{
|
||||
int bandageDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateInt : Main.expertMode ? 50 : 100;
|
||||
DropHelper.DropItemCondition(npc, ItemID.AdhesiveBandage, Main.hardMode, bandageDropRate, 1, 1);
|
||||
DropHelper.DropItemChance(npc, ItemID.AdhesiveBandage, bandageDropRate, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -52,12 +53,22 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
}
|
||||
}
|
||||
}
|
||||
public override bool? CanHitNPC(NPC target) => HomingCooldown == 0 && !target.townNPC
|
||||
&& target.type != NPCID.DD2EterniaCrystal && !target.immortal && !target.dontTakeDamage;
|
||||
|
||||
public override bool CanDamage()
|
||||
{
|
||||
return HomingCooldown == 0;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
HomingCooldown = 25;
|
||||
projectile.velocity *= -0.75f; //bounce off of enemy
|
||||
|
||||
//prevent dummy exploits
|
||||
if (target.type == NPCID.TargetDummy || target.type == ModContent.NPCType<SuperDummy>())
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
}
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
|
||||
@@ -59,10 +59,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
(player.allDamage + player.minionDamage - 1f));
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
float num633 = 700f;
|
||||
float num634 = 1300f;
|
||||
float num635 = 2600f;
|
||||
float num636 = 600f;
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<PhantomGuy>();
|
||||
player.AddBuff(ModContent.BuffType<Phantom>(), 3600);
|
||||
if (flag64)
|
||||
@@ -100,6 +96,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
}
|
||||
}
|
||||
float num633 = 700f;
|
||||
float num634 = 1300f;
|
||||
float num635 = 2600f;
|
||||
float num636 = 600f;
|
||||
Vector2 vector46 = projectile.position;
|
||||
bool flag25 = false;
|
||||
if (player.HasMinionAttackTargetNPC)
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
float num396 = projectile.position.X;
|
||||
float num397 = projectile.position.Y;
|
||||
float num398 = 700f;
|
||||
float minDistance = 7000f;
|
||||
bool flag11 = false;
|
||||
if (player.HasMinionAttackTargetNPC)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float num539 = npc.position.X + (float)(npc.width / 2);
|
||||
float num540 = npc.position.Y + (float)(npc.height / 2);
|
||||
float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540);
|
||||
if (num541 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
if (num541 < minDistance)
|
||||
{
|
||||
num396 = num539;
|
||||
num397 = num540;
|
||||
@@ -122,9 +122,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float num400 = Main.npc[num399].position.X + (float)(Main.npc[num399].width / 2);
|
||||
float num401 = Main.npc[num399].position.Y + (float)(Main.npc[num399].height / 2);
|
||||
float num402 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num400) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num401);
|
||||
if (num402 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num399].position, Main.npc[num399].width, Main.npc[num399].height))
|
||||
if (num402 < minDistance)
|
||||
{
|
||||
num398 = num402;
|
||||
minDistance = num402;
|
||||
num396 = num400;
|
||||
num397 = num401;
|
||||
flag11 = true;
|
||||
|
||||
Reference in new issue
Block a user