public override void UpdateLifeRegen(NPC npc, ref int damage)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         if (npc.realLife > 0 && Main.npc[npc.realLife].GetGlobalNPC <CalamityGlobalNPC>().CalamityDR < 1f)
         {
             CalamityDR = Main.npc[npc.realLife].GetGlobalNPC <CalamityGlobalNPC>().CalamityDR;
         }
     }
 }
 public override void ModifyHitByItem(NPC npc, Player player, Item item, ref int damage, ref float knockback, ref bool crit)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         if (npc.type > 580 && npc.modNPC.mod == ModLoader.GetMod("AAModEXAI"))
         {
             if (item.type > 3930 && item.modItem.mod == ModLoader.GetMod("CalamityMod"))
             {
                 damage = (int)(damage * CalamityDR * (NPC.downedPlantBoss? 0.8f : 1f) * (NPC.downedMoonlord? 0.7f : 1f));
             }
         }
     }
 }
 public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         if (npc.type > 580 && npc.modNPC.mod == ModLoader.GetMod("AAModEXAI"))
         {
             Player player = Main.player[projectile.owner];
             if ((projectile.type > 714 && projectile.modProjectile.mod == ModLoader.GetMod("CalamityMod")) || (player.inventory[player.selectedItem].type > 3930 && player.inventory[player.selectedItem].modItem.mod == ModLoader.GetMod("CalamityMod")))
             {
                 damage = (int)(damage * CalamityDR * (NPC.downedPlantBoss? 0.8f : 1f) * (NPC.downedMoonlord? 0.7f : 1f));
             }
         }
     }
 }
 public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         if (projectile.hostile && !projectile.friendly && projectile.type > 714 && projectile.modProjectile.mod == AAModEXAI.instance)
         {
             bool revenge = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "revenge", false, true);
             bool Death   = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "death", false, true);
             if (!NPC.downedMoonlord)
             {
                 damage = (int)(damage * (1.1f + (revenge? 0.2f:0f) + (Death? 0.3f:0f)));
             }
             else
             {
                 damage = (int)(damage * (1.2f + (revenge? 0.4f:0f) + (Death? 0.6f:0f)));
             }
         }
     }
 }
 public override void ModifyHitPlayer(NPC npc, Player target, ref int damage, ref bool crit)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         if (npc.type > 580 && npc.modNPC.mod == ModLoader.GetMod("AAModEXAI") && npc.boss)
         {
             bool revenge = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "revenge", false, true);
             bool Death   = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "death", false, true);
             if (!NPC.downedMoonlord)
             {
                 damage = (int)(damage * (1.1f + (revenge? 0.2f:0f) + (Death? 0.3f:0f)));
             }
             else
             {
                 damage = (int)(damage * (1.2f + (revenge? 0.4f:0f) + (Death? 0.6f:0f)));
             }
         }
     }
 }
        public override void SetDefaults(NPC npc)
        {
            if (ModSupport.GetMod("CalamityMod") != null)
            {
                if (npc.type == mod.NPCType("Athena"))
                {
                    CalamityDR = 0.8f;
                }
                if (npc.type == mod.NPCType("OlympianDragon"))
                {
                    CalamityDR = 0.8f;
                }

                if (npc.type == mod.NPCType("Greed"))
                {
                    CalamityDR = 0.8f;
                }

                if (npc.type == mod.NPCType("ForsakenAnubis"))
                {
                    CalamityDR = 0.55f;
                }
                if (npc.type == mod.NPCType("CurseCircle"))
                {
                    CalamityDR = 0.55f;
                }
                if (npc.type == mod.NPCType("CursedScarab"))
                {
                    CalamityDR = 0.55f;
                }
                if (npc.type == mod.NPCType("CursedLocust"))
                {
                    CalamityDR = 0.55f;
                }
                if (npc.type == mod.NPCType("Naddaha"))
                {
                    CalamityDR = 0.55f;
                }
                if (npc.type == mod.NPCType("HorusSentry"))
                {
                    CalamityDR = 0.55f;
                }

                if (npc.type == mod.NPCType("Ashe"))
                {
                    CalamityDR = 0.3f;
                }
                if (npc.type == mod.NPCType("AsheDragon"))
                {
                    CalamityDR = 0.3f;
                }
                if (npc.type == mod.NPCType("AsheOrbiter"))
                {
                    CalamityDR = 0.4f;
                }

                if (npc.type == mod.NPCType("Haruka"))
                {
                    CalamityDR = 0.3f;
                }

                if (npc.type == mod.NPCType("AkumaA"))
                {
                    CalamityDR = 0.05f;
                }
                if (npc.type == mod.NPCType("Akuma"))
                {
                    CalamityDR = 0.1f;
                }
                if (npc.type == mod.NPCType("AwakenedLung"))
                {
                    CalamityDR = 0.07f;
                }
                if (npc.type == mod.NPCType("AncientLung"))
                {
                    CalamityDR = 0.1f;
                }
                if (npc.type == mod.NPCType("AsheA"))
                {
                    CalamityDR = 0.04f;
                }

                if (npc.type == mod.NPCType("AthenaA"))
                {
                    CalamityDR = 0.5f;
                }
                if (npc.type == mod.NPCType("Seraph"))
                {
                    CalamityDR = 0.5f;
                }
                if (npc.type == mod.NPCType("SeraphA"))
                {
                    CalamityDR = 0.5f;
                }

                if (npc.type == mod.NPCType("DaybringerHead"))
                {
                    CalamityDR = 0.4f;
                }
                if (npc.type == mod.NPCType("NightcrawlerHead"))
                {
                    CalamityDR = 0.4f;
                }
                if (npc.type == mod.NPCType("NCCloud"))
                {
                    CalamityDR = 0.6f;
                }

                if (npc.type == mod.NPCType("GreedA"))
                {
                    CalamityDR = 0.4f;
                }
                if (npc.type == mod.NPCType("GreedMinion"))
                {
                    CalamityDR = 0.5f;
                }

                if (npc.type == mod.NPCType("SupremeRajah"))
                {
                    CalamityDR = 0.05f;
                }

                if (npc.type == mod.NPCType("AbyssGrip"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("BlazeGrip"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("FuryAshe"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("WrathHaruka"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("Shen"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("ShenA"))
                {
                    CalamityDR = 0.015f;
                }
                if (npc.type == mod.NPCType("FuryAsheOrbiter"))
                {
                    CalamityDR = 0.05f;
                }
                if (npc.type == mod.NPCType("Shenling"))
                {
                    CalamityDR = 0.02f;
                }

                if (npc.type == mod.NPCType("YamataA"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("YamataAHead"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("YamataAHeadF"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("YamataAHeadF1"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("YamataAHeadF2"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("Yamata"))
                {
                    CalamityDR = 0.08f;
                }
                if (npc.type == mod.NPCType("YamataHead"))
                {
                    CalamityDR = 0.08f;
                }
                if (npc.type == mod.NPCType("YamataHeadF"))
                {
                    CalamityDR = 0.08f;
                }
                if (npc.type == mod.NPCType("YamataHeadF1"))
                {
                    CalamityDR = 0.08f;
                }
                if (npc.type == mod.NPCType("YamataHeadF2"))
                {
                    CalamityDR = 0.08f;
                }
                if (npc.type == mod.NPCType("HarukaY"))
                {
                    CalamityDR = 0.04f;
                }

                if (npc.type == mod.NPCType("ZeroEcho"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("ZeroMini"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("ZeroProtocol"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("GenocideCannon"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("Neutralizer"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("NovaFocus"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("OmegaVolley"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("RealityCannon"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("RiftShredder"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("SearcherZero"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("Taser"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("TeslaHand"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("VoidStar"))
                {
                    CalamityDR = 0.04f;
                }
                if (npc.type == mod.NPCType("Zero"))
                {
                    CalamityDR = 0.04f;
                }
            }
        }
예제 #7
0
        public override void PostUpdate()
        {
            AccessoryEffects();

            if (player.endurance >= 1f)
            {
                player.endurance = .8f;
            }

            for (int i = 0; i < 200; i++)
            {
                if (!Main.npc[i].boss || !Main.npc[i].active)
                {
                    continue;
                }
                if (Main.npc[i].type == ModContent.NPCType <Bosses.Akuma.AkumaTransition>())
                {
                    NPC akuma = Main.npc[i];

                    if (akuma.ai[0] >= 660)
                    {
                        player.AddBuff(ModContent.BuffType <Buffs.BlazingPain>(), 2);
                    }
                }
                else if (Main.npc[i].type == ModContent.NPCType <Bosses.Akuma.Awakened.AkumaA>())
                {
                    player.AddBuff(ModContent.BuffType <Buffs.BlazingPain>(), 2);
                }
                else if (Main.npc[i].type == ModContent.NPCType <Bosses.Yamata.Yamata>())
                {
                    player.AddBuff(ModContent.BuffType <Buffs.YamataGravity>(), 10);
                }
                else if (Main.npc[i].type == ModContent.NPCType <Bosses.Yamata.Awakened.YamataA>())
                {
                    player.AddBuff(ModContent.BuffType <Buffs.YamataAGravity>(), 10);
                }
                else if (Main.npc[i].type == ModContent.NPCType <Bosses.Shen.ShenA>())
                {
                    NPC shen = Main.npc[i];

                    if (((ShenA)shen.modNPC).halfLifeAIChange)
                    {
                        player.AddBuff(ModContent.BuffType <Buffs.YamataAGravity>(), 10, true);
                        player.AddBuff(ModContent.BuffType <Buffs.BlazingPain>(), 10, true);
                    }
                }

                if (ModSupport.GetMod("CalamityMod") != null)
                {
                    bool revenge = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "revenge", false, true);
                    bool Death   = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "death", false, true);

                    if (revenge && (Main.npc[i].type == ModContent.NPCType <Bosses.Shen.Shen>() || Main.npc[i].type == ModContent.NPCType <Bosses.Shen.ShenA>()))
                    {
                        player.AddBuff(ModContent.BuffType <Buffs.YamataAGravity>(), 10, true);
                        player.AddBuff(ModContent.BuffType <Buffs.BlazingPain>(), 10, true);
                    }
                }
            }

            /*
             * if (NPC.AnyNPCs(mod.NPCType("AkumaTransition")))
             * {
             *  int n = BaseAI.GetNPC(player.Center, mod.NPCType("AkumaTransition"), -1);
             *  NPC akuma = Main.npc[n];
             *
             *  if (akuma.ai[0] >= 660)
             *  {
             *      player.AddBuff(mod.BuffType("BlazingPain"), 2);
             *  }
             * }
             * else if (NPC.AnyNPCs(mod.NPCType("AkumaA")))
             * {
             *  player.AddBuff(mod.BuffType("BlazingPain"), 2);
             * }
             *
             * if (NPC.AnyNPCs(mod.NPCType("Yamata")))
             * {
             *  player.AddBuff(mod.BuffType("YamataGravity"), 10);
             * }
             *
             * if (NPC.AnyNPCs(mod.NPCType("YamataA")))
             * {
             *  player.AddBuff(mod.BuffType("YamataAGravity"), 10);
             * }
             *
             * if (NPC.AnyNPCs(mod.NPCType("ShenA")))
             * {
             *  int n = BaseAI.GetNPC(player.Center, mod.NPCType("ShenA"), -1);
             *  NPC shen = Main.npc[n];
             *
             *  if (((ShenA)shen.modNPC).halfLifeAIChange)
             *  {
             *      player.AddBuff(mod.BuffType("YamataAGravity"), 10);
             *      player.AddBuff(mod.BuffType("BlazingPain"), 10);
             *  }
             * }
             *
             *
             * if (ModSupport.GetMod("CalamityMod") != null)
             * {
             *  bool revenge = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "revenge", false, true);
             *  bool Death = (bool)ModSupport.GetModWorldConditions("CalamityMod", "CalamityWorld", "death", false, true);
             *
             *  if (revenge && (NPC.AnyNPCs(ModContent.NPCType<Shen>()) || NPC.AnyNPCs(ModContent.NPCType<ShenA>())))
             *  {
             *      player.AddBuff(mod.BuffType("YamataAGravity"), 10);
             *      player.AddBuff(mod.BuffType("BlazingPain"), 10);
             *  }
             * }
             */
        }