Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
35bb4e5cd1
21 files changed
+41
-35
No files matched your search
@@ -641,6 +641,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool glSword = false;
|
||||
public bool mWorm = false;
|
||||
public bool iClasper = false;
|
||||
public bool magicHat = false;
|
||||
public bool herring = false;
|
||||
public bool blackhawk = false;
|
||||
public bool calamari = false;
|
||||
@@ -1414,6 +1415,7 @@ namespace CalamityMod.CalPlayer
|
||||
glSword = false;
|
||||
mWorm = false;
|
||||
iClasper = false;
|
||||
magicHat = false;
|
||||
herring = false;
|
||||
blackhawk = false;
|
||||
calamari = false;
|
||||
|
||||
@@ -3465,6 +3465,10 @@ namespace CalamityMod
|
||||
bool armaActive = reader.ReadBoolean();
|
||||
CalamityWorld.armageddon = armaActive;
|
||||
break;
|
||||
case CalamityModMessageType.DemonTrophyBoolSync:
|
||||
bool demonModeBoost = reader.ReadBoolean();
|
||||
CalamityWorld.demonMode = demonModeBoost;
|
||||
break;
|
||||
case CalamityModMessageType.NPCRegenerationSync:
|
||||
byte npcIndex = reader.ReadByte();
|
||||
Main.npc[npcIndex].lifeRegen = reader.ReadInt32();
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Ammo
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 11;
|
||||
item.damage = 8;
|
||||
item.ranged = true;
|
||||
item.width = 8;
|
||||
item.height = 8;
|
||||
|
||||
@@ -2032,7 +2032,7 @@ Grants immunity to fire blocks, and temporary immunity to lava";
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<BlastBarrel>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<RogueEmblem>(), 4);
|
||||
DropHelper.DropItemFromSetChance(player, 5, ItemID.CorruptionKey, ItemID.CrimsonKey);
|
||||
DropHelper.DropItem(player, ModContent.ItemType<MLGRune>()); // Demon Trophy
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<MLGRune>(), !CalamityWorld.demonMode); // Demon Trophy
|
||||
break;
|
||||
|
||||
// Destroyer
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 30;
|
||||
item.damage = 28;
|
||||
item.magic = true;
|
||||
item.mana = 7;
|
||||
item.width = 28;
|
||||
@@ -38,17 +38,16 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
if (Main.rand.Next(3) != 0)
|
||||
if (Main.rand.Next(4) != 0)
|
||||
{
|
||||
Vector2 speed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-15, 16)));
|
||||
speed.Normalize();
|
||||
speed *= 15f;
|
||||
speed.Y -= Math.Abs(speed.X) * 0.2f;
|
||||
int p = Projectile.NewProjectile(position, speed, ModContent.ProjectileType<FrostShardFriendly>(), damage, knockBack, player.whoAmI);
|
||||
Main.projectile[p].minion = false;
|
||||
Main.projectile[p].magic = true;
|
||||
Main.projectile[p].Calamity().forceMagic = true;
|
||||
}
|
||||
if (Main.rand.NextBool(3))
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Main.PlaySound(SoundID.Item1, position);
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX * 1.2f, speedY * 1.2f, ModContent.ProjectileType<Snowball>(), damage, knockBack * 2f, player.whoAmI);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
//Weapon attribute constants
|
||||
|
||||
public static readonly int BaseDamage = 5110;
|
||||
public static readonly int BaseDamage = 4991;
|
||||
|
||||
public static readonly float TrueMeleeBoost = 2.5f;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
DisplayName.SetDefault("Lunar Kunai");
|
||||
Tooltip.SetDefault("Throws out a set of three kunai that ignore gravity and slightly home in on enemies\n"
|
||||
+"After traveling enough distance, the kunai supercharge with lunar energy, homing in far more aggressively and exploding on impact\n"
|
||||
+"Stealth strikes instantly throw six supercharged Kunai");
|
||||
+"Stealth strikes instantly throw five supercharged Kunai");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
num79 *= num80;
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float num148 = num78;
|
||||
float num149 = num79;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 180;
|
||||
item.damage = 130;
|
||||
item.mana = 10;
|
||||
item.width = 42;
|
||||
item.height = 60;
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (npc.type == NPCID.WallofFlesh)
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune>(), !Main.expertMode); // Demon Trophy
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune>(), !Main.expertMode && !CalamityWorld.demonMode); // Demon Trophy
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Meowthrower>(), !Main.expertMode, 5, 1, 1);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<BlackHawkRemote>(), !Main.expertMode, 5, 1, 1);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<BlastBarrel>(), !Main.expertMode, 5, 1, 1);
|
||||
|
||||
@@ -300,11 +300,8 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
nextSlot++;
|
||||
}
|
||||
//:BearWatchingYou:
|
||||
if (npcName == "Laura")
|
||||
{
|
||||
shop.item[nextSlot].SetDefaults(ModContent.ItemType<BearEye>());
|
||||
nextSlot++;
|
||||
}
|
||||
shop.item[nextSlot].SetDefaults(ModContent.ItemType<BearEye>());
|
||||
nextSlot++;
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -67,9 +67,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27);
|
||||
|
||||
projectile.damage /= 2;
|
||||
projectile.damage /= 3;
|
||||
projectile.position = projectile.Center;
|
||||
projectile.width = projectile.height = 32;
|
||||
projectile.width = projectile.height = 24;
|
||||
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
|
||||
projectile.maxPenetrate = -1;
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 60;
|
||||
projectile.height = 64;
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 600;
|
||||
@@ -37,7 +37,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void AI()
|
||||
{
|
||||
CalamityPlayer modPlayer = Main.player[projectile.owner].Calamity();
|
||||
if(projectile.velocity.X != 0 || projectile.velocity.Y != 0){
|
||||
if(projectile.velocity.X != 0 || projectile.velocity.Y != 0)
|
||||
{
|
||||
projectile.velocity.X *= 0.99f;
|
||||
projectile.velocity.Y *= 0.99f;
|
||||
}
|
||||
|
||||
@@ -71,10 +71,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
int num988 = 15;
|
||||
bool flag54 = false;
|
||||
bool flag55 = false;
|
||||
float[] var_2_2CB4E_cp_0 = projectile.localAI;
|
||||
int var_2_2CB4E_cp_1 = 0;
|
||||
float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1];
|
||||
var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f;
|
||||
projectile.localAI[0] += 1f;
|
||||
if (projectile.localAI[0] % 30f == 0f)
|
||||
{
|
||||
flag55 = true;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
private void CreateInk()
|
||||
{
|
||||
Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 14);
|
||||
Main.PlaySound(2, (int)Main.player[projectile.owner].position.X, (int)Main.player[projectile.owner].position.Y, 14);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int projType = Main.rand.Next(0, 3);
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
inkType = ModContent.ProjectileType<InkCloud3>();
|
||||
break;
|
||||
}
|
||||
int inkID = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, 22, 7, Main.myPlayer);
|
||||
int inkID = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, 22, 7, projectile.owner);
|
||||
Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25);
|
||||
}
|
||||
projectile.Kill();
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity();
|
||||
CalamityPlayer modPlayer = Main.player[projectile.owner].Calamity();
|
||||
if(projectile.ai[0] == 0f && modPlayer.StealthStrikeAvailable())
|
||||
{
|
||||
projectile.Calamity().stealthStrike = true;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity();
|
||||
CalamityPlayer modPlayer = Main.player[projectile.owner].Calamity();
|
||||
Lighting.AddLight(projectile.Center, 0.55f, 0.25f, 0f);
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f;
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 130, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, new Color(255, 255, 255), 0.85f);
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
|
||||
@@ -287,9 +287,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override bool? CanHitNPC(NPC target)
|
||||
{
|
||||
if (HitCooldown == 0 && !target.townNPC && target.type != NPCID.DD2EterniaCrystal && !target.immortal && !target.dontTakeDamage)
|
||||
if (HitCooldown == 0)
|
||||
{
|
||||
return true;
|
||||
return null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (!modPlayer.momentumCapacitor)
|
||||
projectile.Kill();
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
//Spawns the shockwave
|
||||
Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType<SabatonBoom>(), 300, 12, projectile.owner);
|
||||
Main.PlaySound(2, projectile.position, 14);
|
||||
Player player = Main.player[Main.myPlayer];
|
||||
Player player = Main.player[projectile.owner];
|
||||
player.Calamity().gSabatonFall = 0;
|
||||
projectile.Kill();
|
||||
//Pretty things
|
||||
|
||||
@@ -183,6 +183,11 @@ namespace CalamityMod.UI
|
||||
NPCID.MoonLordHead,
|
||||
NPCID.MoonLordHand,
|
||||
NPCID.MoonLordCore,
|
||||
NPCID.WyvernLegs,
|
||||
NPCID.WyvernBody,
|
||||
NPCID.WyvernBody2,
|
||||
NPCID.WyvernBody3,
|
||||
NPCID.WyvernTail,
|
||||
ModContent.NPCType<AquaticScourgeBody>(),
|
||||
ModContent.NPCType<AquaticScourgeBodyAlt>(),
|
||||
ModContent.NPCType<AquaticScourgeTail>(),
|
||||
@@ -218,6 +223,7 @@ namespace CalamityMod.UI
|
||||
|
||||
//Hardmode
|
||||
NPCID.GoblinSummoner, //2000 HP
|
||||
NPCID.WyvernHead,
|
||||
NPCID.Paladin,
|
||||
NPCID.IceGolem,
|
||||
NPCID.SandElemental,
|
||||
|
||||
Reference in new issue
Block a user