mirror of
https://github.com/YouHaveTrouble/YHTMod.git
synced 2026-05-12 05:56:56 +00:00
hive mind effect
This commit is contained in:
@@ -17,6 +17,7 @@ public class SummonerOnHitEffects : GlobalProjectile {
|
|||||||
HandleDeerclopsEffect(modPlayer, target, projectile);
|
HandleDeerclopsEffect(modPlayer, target, projectile);
|
||||||
HandleQueenBeeEffect(modPlayer, target);
|
HandleQueenBeeEffect(modPlayer, target);
|
||||||
HandlePerforatorsEffect(modPlayer, target, projectile);
|
HandlePerforatorsEffect(modPlayer, target, projectile);
|
||||||
|
HandleHiveMindEffect(modPlayer, target, projectile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,4 +89,26 @@ public class SummonerOnHitEffects : GlobalProjectile {
|
|||||||
blob.DamageType = DamageClass.Summon;
|
blob.DamageType = DamageClass.Summon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void HandleHiveMindEffect(YhtPlayer modPlayer, NPC target, Projectile projectile) {
|
||||||
|
if (!ModLoader.HasMod("CalamityMod")) return;
|
||||||
|
if (!modPlayer.SummonerAmbitions.Contains("hive_mind")) return;
|
||||||
|
if (modPlayer.SummonerAmbitionHiveMindCooldown != 0) return;
|
||||||
|
if (!Main.rand.NextBool(10)) return;
|
||||||
|
modPlayer.SummonerAmbitionHiveMindCooldown = 3 * 60;
|
||||||
|
int projectileType = ModContent.ProjectileType<CalamityMod.Projectiles.Boss.ShadeNimbusHostile>();
|
||||||
|
int projectileId = Projectile.NewProjectile(
|
||||||
|
modPlayer.Player.GetSource_OnHit(target),
|
||||||
|
target.Center,
|
||||||
|
new Vector2(0, 1f),
|
||||||
|
projectileType,
|
||||||
|
(int) (projectile.damage * 0.75f),
|
||||||
|
0f,
|
||||||
|
projectile.owner
|
||||||
|
);
|
||||||
|
Projectile blob = Main.projectile[projectileId];
|
||||||
|
blob.friendly = true;
|
||||||
|
blob.hostile = false;
|
||||||
|
blob.DamageType = DamageClass.Summon;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public class YhtPlayer : ModPlayer {
|
|||||||
public int KatanaTeleportCooldown = 0;
|
public int KatanaTeleportCooldown = 0;
|
||||||
public int SummonerAmbitionDeerclopsCooldown = 0;
|
public int SummonerAmbitionDeerclopsCooldown = 0;
|
||||||
public int SummonerAmbitionPerforatorsCooldown = 0;
|
public int SummonerAmbitionPerforatorsCooldown = 0;
|
||||||
|
public int SummonerAmbitionHiveMindCooldown = 0;
|
||||||
|
|
||||||
|
|
||||||
public bool SummonerAmbition = false;
|
public bool SummonerAmbition = false;
|
||||||
@@ -24,6 +25,7 @@ public class YhtPlayer : ModPlayer {
|
|||||||
KatanaTeleportCooldown = Math.Max(KatanaTeleportCooldown - 1, 0);
|
KatanaTeleportCooldown = Math.Max(KatanaTeleportCooldown - 1, 0);
|
||||||
SummonerAmbitionDeerclopsCooldown = Math.Max(SummonerAmbitionDeerclopsCooldown - 1, 0);
|
SummonerAmbitionDeerclopsCooldown = Math.Max(SummonerAmbitionDeerclopsCooldown - 1, 0);
|
||||||
SummonerAmbitionPerforatorsCooldown = Math.Max(SummonerAmbitionPerforatorsCooldown - 1, 0);
|
SummonerAmbitionPerforatorsCooldown = Math.Max(SummonerAmbitionPerforatorsCooldown - 1, 0);
|
||||||
|
SummonerAmbitionHiveMindCooldown = Math.Max(SummonerAmbitionHiveMindCooldown - 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PostUpdateEquips() {
|
public override void PostUpdateEquips() {
|
||||||
|
|||||||
Reference in New Issue
Block a user