private bool CheckForHit(Projectile proj, NPC npc) { if (!npc.active) { return(false); } if (proj.GetGlobalProjectile <ProjectileOwnerGProj>().OwnerWMI != -1) { if (proj.GetGlobalProjectile <ProjectileOwnerGProj>().OwnerWMI == EvE.EnemyA) { if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyB) { return(true); } } if (proj.GetGlobalProjectile <ProjectileOwnerGProj>().OwnerWMI == EvE.EnemyB) { if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyA) { return(true); } } } return(false); }
public override void PostAI(NPC npc) { if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyA || EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyB) { MeleeHit(npc); } }
public override void PostUpdateMiscEffects() { if (EvE.BelongsToDummy(player)) { //player.UpdateBiomes(); UpdateBiomesAlt(player); //player.ZoneJungle = true; //player.ZoneCorrupt = true; //player.ZoneCrimson = true; player.aggro -= 1000000; player.gravity = 0; player.velocity = Vector2.Zero; if (player.whoAmI == EvE.FakePlayer1 && EvE.EnemyA != -1) { if (Main.npc[EvE.EnemyA].active) { player.Center = Main.npc[EvE.EnemyA].Center; } } if (player.whoAmI == EvE.FakePlayer2 && EvE.EnemyB != -1) { if (Main.npc[EvE.EnemyB].active) { player.Center = Main.npc[EvE.EnemyB].Center; } } } }
public override bool PreHurt(bool pvp, bool quiet, ref int damage, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) { if (EvE.BelongsToDummy(player)) { return(false); } return(true); }
public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) { if (EvE.BelongsToDummy(player)) { return(false); } return(true); }
public override bool CanBeHitByProjectile(Projectile proj) { if (EvE.BelongsToDummy(player)) { return(false); } return(true); }
public override bool CanBeHitByNPC(NPC npc, ref int cooldownSlot) { if (EvE.BelongsToDummy(player)) { return(false); } return(true); }
public override void ModifyDrawLayers(List <PlayerLayer> layers) { if (EvE.BelongsToDummy(player)) //dont draw player { while (layers.Count > 0) { layers.RemoveAt(0); } } }
public override void UpdateLifeRegen(NPC npc, ref int damage) { if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyA || EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyB) { if (npc.lifeRegen < 0) { npc.lifeRegen *= EvE.config.DotMultiplier; damage = npc.lifeRegen * 60; } } }
//private bool flag = false; public override bool PreAI(NPC npc) { if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyA) { if (EvE.EnemyB != -1) { if (Main.npc[EvE.EnemyB].active && FakePlayer.Dummy2Available()) { npc.target = EvE.FakePlayer2; } else { if (npc.target == EvE.FakePlayer2) { npc.target = Main.myPlayer; } } } else { if (npc.target == EvE.FakePlayer2) { npc.target = Main.myPlayer; } } } if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyB) { if (EvE.EnemyA != -1) { if (Main.npc[EvE.EnemyA].active && FakePlayer.Dummy1Available()) { npc.target = EvE.FakePlayer1; } else { if (npc.target == EvE.FakePlayer1) { npc.target = Main.myPlayer; } } } else { if (npc.target == EvE.FakePlayer1) { npc.target = Main.myPlayer; } } } return(true); }
public override void Unload() { Instance = null; config = null; NewXXXSource = -1; NewXXXState = ""; EnemyA = -1; EnemyB = -1; FakePlayer.Initialised1 = false; FakePlayer.Initialised2 = false; Main.player[FakePlayer1] = new Player(false); Main.player[FakePlayer2] = new Player(false); }
private bool CheckForHit(NPC npc1, NPC npc2) { if (!npc1.active || !npc2.active) { return(false); } if (EvE.IsOrBelongsToNPCID(npc1) == EvE.EnemyA && EvE.IsOrBelongsToNPCID(npc2) == EvE.EnemyB) { return(true); } if (EvE.IsOrBelongsToNPCID(npc2) == EvE.EnemyA && EvE.IsOrBelongsToNPCID(npc1) == EvE.EnemyB) { return(true); } return(false); }
public override void PreUpdateBuffs() { if (EvE.BelongsToDummy(player)) { for (int i = 0; i < player.buffImmune.Length; i++) { player.buffImmune[i] = true; } for (int i = 0; i < player.buffTime.Length; i++) { if (player.buffTime[i] != 0) { player.buffTime[i] = 0; } } } }
/* * public override void AI(NPC npc) * { * if (!flag) * { * flag = true; * if (OwnerWMI != -1) * { * if (Main.npc[OwnerWMI].active) * { * Main.NewText(Lang.GetNPCNameValue(Main.npc[OwnerWMI].type) + " : " + Lang.GetNPCNameValue(npc.type)); * } * } * } * } * */ public override void PostDraw(NPC npc, SpriteBatch spriteBatch, Color drawColor) { if (npc.whoAmI == EvE.EnemyA) { Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, "A", npc.Center.X - Main.screenPosition.X, npc.Top.Y - 15 - Main.screenPosition.Y, Color.Red, Color.Black, Vector2.Zero, 1.5f); } else if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyA) { Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, "A", npc.Center.X - Main.screenPosition.X, npc.Top.Y - 10 - Main.screenPosition.Y, Color.Red, Color.Black, Vector2.Zero, 0.9f); } if (npc.whoAmI == EvE.EnemyB) { Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, "B", npc.Center.X - Main.screenPosition.X, npc.Top.Y - 15 - Main.screenPosition.Y, Color.Cyan, Color.Black, Vector2.Zero, 1.5f); } else if (EvE.IsOrBelongsToNPCID(npc) == EvE.EnemyB) { Utils.DrawBorderStringFourWay(Main.spriteBatch, Main.fontMouseText, "B", npc.Center.X - Main.screenPosition.X, npc.Top.Y - 10 - Main.screenPosition.Y, Color.Cyan, Color.Black, Vector2.Zero, 0.9f); } }
public override void PostAI(NPC npc) { EvE.UpdateOwner(npc); }
private void AddBuffToTheEnemy(NPC attacker, NPC target) { switch (attacker.type) { case 141: if (Main.rand.Next(2) == 0) { target.AddBuff(BuffID.Poisoned, 600); } break; case NPCID.QueenBee: if (Main.expertMode) { target.AddBuff(BuffID.Poisoned, 120 + Main.rand.Next(360)); } break; case NPCID.Bee: case NPCID.BeeSmall: if (Main.expertMode) { target.AddBuff(BuffID.Poisoned, 120 + Main.rand.Next(240)); } break; case NPCID.BrainofCthulhu: if (Main.rand.Next(243) <= 11 && Main.expertMode) { target.AddBuff(BuffID.Poisoned, 160 + Main.rand.Next(155)); } if (Main.rand.Next(243) < 2 && Main.expertMode) { target.AddBuff(BuffID.Confused, 45 + Main.rand.Next(45)); } break; case NPCID.Creeper: if (Main.rand.Next(81) <= 11 && Main.expertMode) { target.AddBuff(BuffID.Poisoned, 160 + Main.rand.Next(155)); } if (Main.rand.Next(81) <= 2 && Main.expertMode) { target.AddBuff(BuffID.Confused, 45 + Main.rand.Next(45)); } break; case NPCID.Clown: case NPCID.GiantBat: case NPCID.LightMummy: if (Main.rand.Next(14) == 0) { target.AddBuff(BuffID.Confused, 300); } break; case 527: target.AddBuff(BuffID.Confused, 840); break; case 525: target.AddBuff(BuffID.CursedInferno, 420); break; case 526: case NPCID.IchorSticker: target.AddBuff(BuffID.Ichor, 800); break; case NPCID.BlackRecluse: case NPCID.BlackRecluseWall: case 236: case 237: if (Main.rand.Next(10) == 0) { target.AddBuff(BuffID.Venom, 480); } break; case 530: case 531: target.AddBuff(BuffID.Venom, 240 + Main.rand.Next(240)); break; case NPCID.MeteorHead: if (Main.rand.Next(3) == 0) { target.AddBuff(BuffID.OnFire, 420); } break; case NPCID.HellArmoredBones: case NPCID.HellArmoredBonesMace: case NPCID.HellArmoredBonesSpikeShield: case NPCID.HellArmoredBonesSword: if (Main.rand.Next(2) == 0) { target.AddBuff(BuffID.OnFire, 600); } break; case 15: if (Main.rand.Next(3) == 0) { target.AddBuff(BuffID.OnFire, 420); } break; } if (EvE.IsOrBelongsToNPCID(attacker) == EvE.EnemyA) { NPCLoader.OnHitPlayer(attacker, Main.player[EvE.FakePlayer2], 1, false); } else if (EvE.IsOrBelongsToNPCID(attacker) == EvE.EnemyB) { NPCLoader.OnHitPlayer(attacker, Main.player[EvE.FakePlayer1], 1, false); } }
public override void PostAI(Projectile projectile) { EvE.UpdateOwner(projectile); }
public EvE() { Instance = this; }