1 - Mushy buff now displays duration.
2 - Fungal Symbiote rework. 3 - Buffed Mushy to increase life regen by 2 instead of 1 and defense by 6 instead of 5. 4 - Smoking Comet damage hitbox is the actual size of the yoyo. 5 - Crimson and Mushroom Shrine schematics. 6 - Removed buggy and unnecessary MoR lab and Thorium blood chamber tile detection code.
This commit is contained in:
1 parent
ff74f6c907
commit
22943437d8
13 files changed
+139
-56
No files matched your search
@@ -9,7 +9,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
DisplayName.SetDefault("Mushy");
|
||||
Description.SetDefault("Increased defense and life regen");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
|
||||
@@ -221,7 +221,6 @@ namespace CalamityMod.CalPlayer
|
||||
public int auralisAuroraCounter = 0;
|
||||
public int auralisAuroraCooldown = 0;
|
||||
public int auralisAurora = 0;
|
||||
public int fungalSymbioteTimer = 0;
|
||||
public int aBulwarkRareTimer = 0;
|
||||
public int spiritOriginBullseyeShootCountdown = 0;
|
||||
public int spiritOriginConvertedCrit = 0;
|
||||
@@ -2129,7 +2128,6 @@ namespace CalamityMod.CalPlayer
|
||||
auralisAuroraCounter = 0;
|
||||
auralisAuroraCooldown = 0;
|
||||
auralisAurora = 0;
|
||||
fungalSymbioteTimer = 0;
|
||||
aBulwarkRareTimer = 0;
|
||||
RustyMedallionCooldown = 0;
|
||||
SulphWaterPoisoningLevel = 0f;
|
||||
@@ -4044,7 +4042,10 @@ namespace CalamityMod.CalPlayer
|
||||
public override void ModifyWeaponDamage(Item item, ref StatModifier damage)
|
||||
{
|
||||
if (flamethrowerBoost && item.CountsAsClass<RangedDamageClass>() && (item.useAmmo == AmmoID.Gel || CalamityLists.flamethrowerList.Contains(item.type)))
|
||||
damage += (hoverboardBoost ? 0.35f : 0.25f);
|
||||
damage += hoverboardBoost ? 0.35f : 0.25f;
|
||||
|
||||
if (fungalSymbiote && CalamityLists.MushroomWeaponIDs.Contains(item.type))
|
||||
damage += 0.1f;
|
||||
|
||||
if (item.CountsAsClass<RangedDamageClass>())
|
||||
acidRoundMultiplier = item.useTime / 20D;
|
||||
@@ -4139,7 +4140,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (item.CountsAsClass<MeleeDamageClass>())
|
||||
{
|
||||
var source = Player.GetSource_ItemUse(item);
|
||||
if (fungalSymbiote && Player.whoAmI == Main.myPlayer && fungalSymbioteTimer == 0)
|
||||
if (fungalSymbiote && CalamityLists.MushroomWeaponIDs.Contains(item.type) && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (Player.itemAnimation == (int)(Player.itemAnimationMax * 0.1) ||
|
||||
Player.itemAnimation == (int)(Player.itemAnimationMax * 0.3) ||
|
||||
@@ -4147,7 +4148,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.itemAnimation == (int)(Player.itemAnimationMax * 0.7) ||
|
||||
Player.itemAnimation == (int)(Player.itemAnimationMax * 0.9))
|
||||
{
|
||||
fungalSymbioteTimer = 3;
|
||||
float yVel = 0f;
|
||||
float xVel = 0f;
|
||||
float yOffset = 0f;
|
||||
@@ -4203,8 +4203,7 @@ namespace CalamityMod.CalPlayer
|
||||
xVel *= 1.5f;
|
||||
xOffset *= (float)Player.direction;
|
||||
yOffset *= Player.gravDir;
|
||||
int damage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(item.damage * 0.15f);
|
||||
Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + xOffset, (float)(hitbox.Y + hitbox.Height / 2) + yOffset, (float)Player.direction * xVel, yVel * Player.gravDir, ProjectileID.Mushroom, damage, 0f, Player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + xOffset, (float)(hitbox.Y + hitbox.Height / 2) + yOffset, (float)Player.direction * xVel, yVel * Player.gravDir, ProjectileID.Mushroom, 0, 0f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (aWeapon)
|
||||
|
||||
@@ -612,7 +612,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += 5;
|
||||
|
||||
if (mushy)
|
||||
Player.lifeRegen += 1;
|
||||
Player.lifeRegen += 2;
|
||||
|
||||
if (permafrostsConcoction)
|
||||
{
|
||||
|
||||
@@ -1133,8 +1133,6 @@ namespace CalamityMod.CalPlayer
|
||||
dogTextCooldown--;
|
||||
if (titanCooldown > 0)
|
||||
titanCooldown--;
|
||||
if (fungalSymbioteTimer > 0)
|
||||
fungalSymbioteTimer--;
|
||||
if (aBulwarkRareTimer > 0)
|
||||
aBulwarkRareTimer--;
|
||||
if (hellbornBoost > 0)
|
||||
@@ -2642,7 +2640,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (mushy)
|
||||
Player.statDefense += 5;
|
||||
Player.statDefense += 6;
|
||||
|
||||
if (omniscience)
|
||||
{
|
||||
|
||||
@@ -117,6 +117,8 @@ namespace CalamityMod
|
||||
public static List<int> livingFireBlockList;
|
||||
public static List<int> amalgamBuffList;
|
||||
public static List<int> persistentBuffList;
|
||||
public static List<int> MushroomWeaponIDs;
|
||||
public static List<int> MushroomProjectileIDs;
|
||||
|
||||
public static List<int> zombieList;
|
||||
public static List<int> demonEyeList;
|
||||
@@ -1540,6 +1542,34 @@ namespace CalamityMod
|
||||
BuffID.WeaponImbuePoison
|
||||
};
|
||||
|
||||
MushroomWeaponIDs = new List<int>()
|
||||
{
|
||||
ItemType<Mycoroot>(),
|
||||
ItemType<InfestedClawmerang>(),
|
||||
ItemType<PuffShroom>(),
|
||||
ItemType<HyphaeRod>(),
|
||||
ItemType<Fungicide>(),
|
||||
ItemType<MycelialClaws>(),
|
||||
ItemType<Shroomer>(),
|
||||
ItemID.Hammush,
|
||||
ItemID.MushroomSpear,
|
||||
ItemID.Shroomerang
|
||||
};
|
||||
|
||||
MushroomProjectileIDs = new List<int>()
|
||||
{
|
||||
ProjectileType<MycorootProj>(),
|
||||
ProjectileType<ShroomerangSpore>(),
|
||||
ProjectileType<InfestedClawmerangProj>(),
|
||||
ProjectileType<PuffCloud>(),
|
||||
ProjectileType<FungiOrb2>(),
|
||||
ProjectileType<FungiOrb>(),
|
||||
ProjectileType<Shroom>(),
|
||||
ProjectileID.TruffleSpore,
|
||||
ProjectileID.MushroomSpear,
|
||||
ProjectileID.Shroomerang
|
||||
};
|
||||
|
||||
zombieList = new List<int>()
|
||||
{
|
||||
NPCID.Zombie,
|
||||
@@ -2550,6 +2580,8 @@ namespace CalamityMod
|
||||
livingFireBlockList = null;
|
||||
amalgamBuffList = null;
|
||||
persistentBuffList = null;
|
||||
MushroomWeaponIDs = null;
|
||||
MushroomProjectileIDs = null;
|
||||
|
||||
zombieList = null;
|
||||
demonEyeList = null;
|
||||
|
||||
@@ -225,7 +225,6 @@ namespace CalamityMod
|
||||
BossRushEvent.Load();
|
||||
// TODO -- As ModBossBarStyle is a ModType, its Load function does not need to be called directly here.
|
||||
BossHealthBarManager.Load(this);
|
||||
DraedonStructures.Load();
|
||||
EnchantmentManager.LoadAllEnchantments();
|
||||
VanillaArmorChangeManager.Load();
|
||||
SetupVanillaDR();
|
||||
@@ -383,7 +382,6 @@ namespace CalamityMod
|
||||
BossRushEvent.Unload();
|
||||
SchematicManager.Unload();
|
||||
CustomLavaManagement.Unload();
|
||||
DraedonStructures.Unload();
|
||||
CooldownRegistry.Unload();
|
||||
PlayerDashManager.Unload();
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
SacrificeTotal = 1;
|
||||
DisplayName.SetDefault("Fungal Symbiote");
|
||||
Tooltip.SetDefault("Various melee weapons emit mushrooms in true melee range\n" +
|
||||
"15% increased true melee damage");
|
||||
Tooltip.SetDefault("You grow mushrooms on the grass beneath you\n" +
|
||||
"Consuming mushrooms provides the Mushy buff, increasing defense by 6 and life regen by 2\n" +
|
||||
"All mushroom-based weapons deal 10% more damage and emit non-damaging mushrooms");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -26,9 +27,92 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.GetDamage<TrueMeleeDamageClass>() += 0.15f;
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.fungalSymbiote = true;
|
||||
|
||||
// Mushroom growing effects.
|
||||
int x = (int)player.Center.X / 16;
|
||||
int y = (int)(player.Bottom.Y - 1f) / 16;
|
||||
Tile groundTile = CalamityUtils.ParanoidTileRetrieval(x, y + 1);
|
||||
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
|
||||
{
|
||||
Tile walkTile = CalamityUtils.ParanoidTileRetrieval(x, y);
|
||||
if (!walkTile.HasTile && walkTile.LiquidAmount == 0 && groundTile != null && WorldGen.SolidTile(groundTile))
|
||||
{
|
||||
walkTile.TileFrameY = 0;
|
||||
walkTile.Get<TileWallWireStateData>().Slope = SlopeType.Solid;
|
||||
walkTile.Get<TileWallWireStateData>().IsHalfBlock = false;
|
||||
|
||||
// On dirt, grow teal and green mushrooms.
|
||||
if (groundTile.TileType == TileID.Dirt)
|
||||
{
|
||||
if (Main.rand.NextBool(1000))
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.DyePlants;
|
||||
walkTile.TileFrameX = (short)(Main.rand.NextBool() ? 0 : 34);
|
||||
}
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
|
||||
// On grass, grow mushrooms.
|
||||
else if (groundTile.TileType == TileID.Grass)
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.Plants;
|
||||
walkTile.TileFrameX = 144;
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
|
||||
// On hallowed grass, grow mushrooms.
|
||||
else if (groundTile.TileType == TileID.HallowedGrass)
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.HallowedPlants;
|
||||
walkTile.TileFrameX = 144;
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
|
||||
// On corrupt grass, grow vile mushrooms.
|
||||
else if (groundTile.TileType == TileID.CorruptGrass)
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.CorruptPlants;
|
||||
walkTile.TileFrameX = 144;
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
|
||||
// On crimson grass, grow vicious mushrooms.
|
||||
else if (groundTile.TileType == TileID.CrimsonGrass)
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.CrimsonPlants;
|
||||
walkTile.TileFrameX = 270;
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
|
||||
// On glowing mushroom grass, grow glowing mushrooms.
|
||||
else if (groundTile.TileType == TileID.MushroomGrass)
|
||||
{
|
||||
walkTile.Get<TileWallWireStateData>().HasTile = true;
|
||||
walkTile.TileType = TileID.MushroomPlants;
|
||||
walkTile.TileFrameX = (short)(Main.rand.Next(5) * 18);
|
||||
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient)
|
||||
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.Items.Accessories;
|
||||
@@ -619,6 +620,10 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.BottledHoney)
|
||||
player.AddBuff(BuffID.Honey, 7200);
|
||||
|
||||
// Give 1 minute of Mushy buff when consuming Mushrooms with Fungal Symbiote equipped.
|
||||
if (item.type == ItemID.Mushroom && player.Calamity().fungalSymbiote)
|
||||
player.AddBuff(ModContent.BuffType<Mushy>(), 3600);
|
||||
|
||||
// Moon Lord instantly spawns when Celestial Sigil is used.
|
||||
if (item.type == ItemID.CelestialSigil)
|
||||
{
|
||||
|
||||
@@ -2087,7 +2087,7 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
if (!projectile.npcProj && !projectile.trap && projectile.friendly && projectile.damage > 0)
|
||||
{
|
||||
if (modPlayer.fungalSymbiote && projectile.IsTrueMelee())
|
||||
if (modPlayer.fungalSymbiote && CalamityLists.MushroomProjectileIDs.Contains(projectile.type))
|
||||
{
|
||||
if (Main.player[projectile.owner].miscCounter % 6 == 0 && projectile.FinalExtraUpdate())
|
||||
{
|
||||
@@ -2108,11 +2108,11 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
vector24 -= new Vector2(player.bodyFrame.Width - player.width, player.bodyFrame.Height - 42) / 2f;
|
||||
Vector2 newCenter = player.RotatedRelativePoint(player.position + vector24, true) + projectile.velocity;
|
||||
Projectile.NewProjectile(projectile.GetSource_FromThis(), newCenter, Vector2.Zero, ProjectileID.Mushroom, (int)(projectile.damage * 0.15), 0f, projectile.owner);
|
||||
Projectile.NewProjectile(projectile.GetSource_FromThis(), newCenter, Vector2.Zero, ProjectileID.Mushroom, 0, 0f, projectile.owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileID.Mushroom, (int)(projectile.damage * 0.15), 0f, projectile.owner);
|
||||
Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileID.Mushroom, 0, 0f, projectile.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
|
||||
Gore.NewGore(Projectile.GetSource_FromAI(), new Vector2(Projectile.position.X, Projectile.position.Y), default(Vector2), Main.rand.Next(16, 18));
|
||||
}
|
||||
|
||||
// Hitbox is larger than normal while trying to hit NPCs
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 25f, targetHitbox);
|
||||
|
||||
// Draw the new string
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -18,35 +18,8 @@ namespace CalamityMod.World
|
||||
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
|
||||
public static class DraedonStructures
|
||||
{
|
||||
private static int[] otherModTilesToAvoid;
|
||||
public const int HellVerticalAvoidance = 100;
|
||||
|
||||
internal static void Load()
|
||||
{
|
||||
IList<int> avoid = new List<int>(16);
|
||||
|
||||
// Mod of Redemption's labs use modded blocks, but must still be avoided.
|
||||
Mod mor = CalamityMod.Instance.redemption;
|
||||
if (mor != null)
|
||||
{
|
||||
// Thanks to Hallam to providing these tile names.
|
||||
string[] redemptionAvoidTiles = new string[]
|
||||
{
|
||||
"LabTileUnsafe",
|
||||
"OvergrownLabTile"
|
||||
};
|
||||
foreach (string tileName in redemptionAvoidTiles)
|
||||
avoid.Add(mor.Find<ModTile>(tileName).Type);
|
||||
}
|
||||
|
||||
otherModTilesToAvoid = avoid.ToArray();
|
||||
}
|
||||
|
||||
internal static void Unload()
|
||||
{
|
||||
otherModTilesToAvoid = null;
|
||||
}
|
||||
|
||||
public static bool ShouldAvoidLocation(Point placementPoint, bool careAboutLava = true)
|
||||
{
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(placementPoint.X, placementPoint.Y);
|
||||
@@ -71,15 +44,7 @@ namespace CalamityMod.World
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Below this line: Avoiding other mod worldgen.
|
||||
//
|
||||
|
||||
// Avoid Thorium's Blood Chamber (where you summon Viscount). This is done separately because it uses vanilla tiles.
|
||||
if (tile.TileType == TileID.StoneSlab || tile.WallType == WallID.StoneSlab)
|
||||
return true;
|
||||
// Avoid all other registered modded tiles to avoid.
|
||||
return otherModTilesToAvoid.Any(id => tile.TileType == id);
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Workshop
|
||||
|
||||
Reference in new issue
Block a user