This commit is contained in:
Andrew Marheine committed 2020-05-09 23:12:25 -05:00
commit e6b3909e38
5 files changed
+106 -82

No files matched your search

+65 -59
View File
@@ -5627,25 +5627,28 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By Proj
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
{
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>()
&& proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
for (int j = 0; j < 3; j++)
{
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
damage = 0;
}
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x))
{
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>()
&& proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
for (int j = 0; j < 3; j++)
{
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
damage = 0;
}
}
int bossRushDamage = (Main.expertMode ? 125 : 150) + (CalamityWorld.bossRushStage / 2);
if (CalamityWorld.bossRushActive)
{
@@ -5829,46 +5832,49 @@ namespace CalamityMod.CalPlayer
//1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning
}
}
if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20))
{
player.statLife += damage;
player.HealEffect(damage);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2))
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X * 2f;
proj.velocity.Y = -proj.velocity.Y * 2f;
proj.damage *= 10;
projRefRareLifeRegenCounter = 120;
projTypeJustHitBy = proj.type;
}
if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0)
{
if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet)
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
proj.damage *= 8;
}
}
if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3))
{
int healAmt = damage / 5;
player.statLife += healAmt;
player.HealEffect(healAmt);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => projectile.type != x))
{
if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20))
{
player.statLife += damage;
player.HealEffect(damage);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2))
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X * 2f;
proj.velocity.Y = -proj.velocity.Y * 2f;
proj.damage *= 10;
projRefRareLifeRegenCounter = 120;
projTypeJustHitBy = proj.type;
}
if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0)
{
if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet)
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
proj.damage *= 8;
}
}
if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3))
{
int healAmt = damage / 5;
player.statLife += healAmt;
player.HealEffect(healAmt);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
}
}
#endregion
+4
View File
@@ -272,6 +272,10 @@ namespace CalamityMod.CalPlayer
{
modPlayer.alcoholPoisonLevel++;
}
if (modPlayer.fabsolVodka)
{
modPlayer.alcoholPoisonLevel++;
}
if (modPlayer.fireball)
{
modPlayer.alcoholPoisonLevel++;
+10 -1
View File
@@ -654,7 +654,16 @@ namespace CalamityMod
ModContent.ProjectileType<FlakKrakenProj>(),
ModContent.ProjectileType<SylvanSlashAttack>(),
ModContent.ProjectileType<InfernadoFriendly>()
ModContent.ProjectileType<InfernadoFriendly>(),
//Some hostile boss projectiles
ModContent.ProjectileType<BrimstoneMonster>(),
ModContent.ProjectileType<InfernadoRevenge>(),
ModContent.ProjectileType<OverlyDramaticDukeSummoner>(),
ModContent.ProjectileType<ProvidenceHolyRay>(),
ModContent.ProjectileType<OldDukeVortex>(),
ModContent.ProjectileType<BrimstoneRay>(),
ModContent.ProjectileType<BrimstoneTargetRay>()
};
projectileMinionList = new List<int>()
+1 -1
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gael's Greatsword");
Tooltip.SetDefault("Give me that thing, your dark soul\n" +
Tooltip.SetDefault("Hand it over, that thing. Your dark soul.\n" +
"First swing fires homing skulls\n" +
"Second swing fires a giant, powerful skull\n" +
"Third swing deals massive damage\n" +
+26 -21
View File
@@ -714,7 +714,7 @@ namespace CalamityMod.World
#endregion
#region Generating Chests
public const int CheckCutoffDistance = 35;
public const int CheckCutoffDistance = 15;
public static void PlaceRustyChests()
{
// Ambiguity bullshit.
@@ -759,40 +759,45 @@ namespace CalamityMod.World
#endregion
#region Misc Functions
public static List<int> YStartBlacklist = new List<int>()
public static List<int> YStartWhitelist = new List<int>()
{
TileID.Cloud,
TileID.RainCloud,
TileID.SnowCloud,
TileID.Sunplate,
TileID.Tables,
TileID.Chairs,
TileID.ClosedDoor,
TileID.OpenDoor,
TileID.Banners,
TileID.Crimtane,
TileID.Demonite,
TileID.Containers
TileID.Sand,
TileID.Ebonsand,
TileID.Crimsand,
TileID.Grass,
TileID.CorruptGrass,
TileID.FleshGrass,
TileID.ClayBlock,
TileID.Mud,
TileID.Copper,
TileID.Tin,
TileID.Iron,
TileID.Lead,
TileID.Silver,
TileID.Tungsten,
TileID.Crimstone,
TileID.Ebonstone,
TileID.JungleGrass // Yes, this can happen on rare occasion
};
public static void DetermineYStart()
{
int maxHeight = int.MaxValue;
for (int i = 0; i < 15; i++)
int maxHeight = 0;
for (int i = 0; i < BiomeWidth; i++)
{
int xCheck = CalamityWorld.abyssSide ?
BiomeWidth - i :
Main.maxTilesX - BiomeWidth + i;
int YStart = 1;
while (!Main.tile[xCheck, YStart].active() || YStartBlacklist.Contains(Main.tile[xCheck, YStart].type))
int YStart = (int)WorldGen.worldSurfaceLow - 20; // 30 tiles below the absolute lowest a floating island can spawn
while (!Main.tile[xCheck, YStart].active() || !YStartWhitelist.Contains(Main.tile[xCheck, YStart].type) ||
Main.tile[xCheck, YStart].type == TileID.LivingWood || Main.tile[xCheck, YStart].type == TileID.LeafBlock)
{
YStart++;
if (YStart > Main.rockLayer - 40)
break;
}
if (maxHeight > YStart)
maxHeight = YStart;
maxHeight += YStart;
}
YStart = maxHeight;
YStart = maxHeight / BiomeWidth;
}
public static void GrowSaplingImmediately(int i, int j)
{