Пример #1
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.minionDamage += .1f;
            player.maxMinions   += 2;

            InvokerPlayer InvokerPlayer = InvokerPlayer.ModPlayer(player);

            //InvokerPlayer.BanishProjClear = true;  //This need change.
            InvokerPlayer.Thebookoflaw = true;
        }
Пример #2
0
        public override void Update(NPC npc, ref int buffIndex)
        {
            npc.GetGlobalNPC <InvokedGlobalNPC>().Banished = true;

            InvokerPlayer InvokerPlayer = Main.player[Main.myPlayer].GetModPlayer <InvokerPlayer>();

            if ((InvokerPlayer.banishing && npc.active && (InvokerPlayer.BanishDamage * InvokerPlayer.BanishDamageMult * InvokerPlayer.BanishLimit > npc.life)) || npc.GetGlobalNPC <InvokedGlobalNPC>().IsBeingBanished)
            {
                npc.GetGlobalNPC <InvokedGlobalNPC>().IsBeingBanished = true;
            }
        }
Пример #3
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.minionDamage += .3f;
            player.maxMinions   += 2;
            player.minionKB     += 2f;

            player.lifeRegen     += 26;
            player.lifeRegenTime += 2;

            player.maxTurrets++;


            InvokerPlayer InvokerPlayer = InvokerPlayer.ModPlayer(player);

            //InvokerPlayer.BanishProjClear = true;  //This need change.
            InvokerPlayer.Thebookoflaw  = true;
            InvokerPlayer.SpringInvoker = true;
            if (!hideVisual)
            {
                InvokerPlayer.InvokerShow = true;
            }
            InvokerPlayer.BanishDamageMult += 4.5f;
            InvokerPlayer.BanishLimit      += 5;
        }
Пример #4
0
        public override void UpdateLifeRegen(NPC npc, ref int damage)
        {
            int InvokedCount = 0;

            for (int i = 0; i < 1000; i++)
            {
                Projectile p    = Main.projectile[i];
                int        num9 = (int)p.ai[1];
                if (p.active && p.type == ModContent.ProjectileType <InvokerStaffproj>() && p.ai[0] == 1f && npc == Main.npc[num9])
                {
                    InvokedCount++;
                    npc.lifeRegen -= 10 * InvokedCount;
                }
            }

            InvokerPlayer InvokerPlayer = Main.player[Main.myPlayer].GetModPlayer <InvokerPlayer>();

            if (npc.boss)
            {
                if (!InvokerPlayer.nohit)
                {
                    InvokerPlayer.nohit = false;
                }
                bool flag = (Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == mod.ItemType("InvokerStaff") || Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem].type == ItemID.RodofDiscord) && Main.player[Main.myPlayer].GetModPlayer <InvokerPlayer>().SpringInvoker&& Main.player[Main.myPlayer].GetModPlayer <InvokerPlayer>().Thebookoflaw;
                if (npc.life / npc.lifeMax > 0.95)
                {
                    CaligulaSoulFight = true;
                }
                else if (InvokerPlayer.CaligulaSoul.Contains(npc.type))
                {
                    CaligulaSoulFight = false;
                }
                else if (!flag)
                {
                    CaligulaSoulFight = false;
                }
                else if (!InvokerPlayer.nohit)
                {
                    CaligulaSoulFight = false;
                }
            }


            if (!npc.townNPC && (npc.life < InvokerPlayer.BanishDamage * InvokerPlayer.BanishDamageMult * InvokedCount) && InvokerPlayer.banishing && (npc.active || npc.life > 0))
            {
                npc.GetGlobalNPC <InvokedGlobalNPC>().IsBeingBanished = true;
            }
            if ((IsBeingBanished && !npc.townNPC && (npc.active || npc.life > 0)) || (!npc.townNPC && (npc.life < InvokerPlayer.BanishDamage) && InvokerPlayer.banishing && (npc.active || npc.life > 0)))
            {
                IsBeingBanished = true;
                BanishCount++;
                if (BanishCount == 1)
                {
                    Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("InvokedRune"), 0, 0f, Main.player[Main.myPlayer].whoAmI, 1f, npc.whoAmI);

                    if (npc.type == NPCID.MoonLordHead || npc.type == NPCID.MoonLordHand)
                    {
                        for (int i = 0; i < 200; i++)
                        {
                            if (Main.npc[i].type == NPCID.MoonLordCore || Main.npc[i].type == NPCID.MoonLordHead || Main.npc[i].type == NPCID.MoonLordHand)
                            {
                                Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("InvokedRune"), 0, 0f, Main.player[Main.myPlayer].whoAmI, 1f, npc.whoAmI);
                            }
                        }
                    }
                }
                BanishAction(npc);
            }
            return;
        }
Пример #5
0
 public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
 {
     mult *= InvokerPlayer.ModPlayer(player).BanishDamageMult;
 }