Ejemplo n.º 1
0
 public override bool OnPickup(Player player)
 {
     SoundUtil.PlayVanillaSound(SoundID.NPCDeath7, player);
     Transformations.EndTransformations(player, true, false);
     MyPlayer.ModPlayer(player).SSJGTransformation();
     MyPlayer.ModPlayer(player).IsTransforming = true;
     MyPlayer.ModPlayer(player).SSJGAchieved   = true;
     Main.NewText("You feel enveloped in a divine energy.");
     return(false);
 }
Ejemplo n.º 2
0
        /*public override void SetDefaults(NPC npc)
         * {
         *  Mod thoriummod = ModLoader.GetMod("ThoriumMod");
         *  Mod calamitymod = ModLoader.GetMod("CalamityMod");
         *
         *  if (MyPlayer.RealismMode)
         *  {
         *      if (npc.type == NPCID.EyeofCthulhu)
         *      {
         *          npc.lifeMax = npc.lifeMax * 2;
         *      }
         *      else if (npc.type == NPCID.EaterofWorldsHead)
         *      {
         *          npc.lifeMax = npc.lifeMax * 3;
         *      }
         *      else if (npc.type == NPCID.EaterofWorldsBody)
         *      {
         *          npc.lifeMax = npc.lifeMax * 3;
         *      }
         *      else if (npc.type == NPCID.EaterofWorldsTail)
         *      {
         *          npc.lifeMax = npc.lifeMax * 3;
         *      }
         *      else if (npc.type == NPCID.BrainofCthulhu)
         *      {
         *          npc.lifeMax = npc.lifeMax * 3;
         *      }
         *      else if (npc.type == NPCID.QueenBee)
         *      {
         *          npc.lifeMax = npc.lifeMax * 4;
         *      }
         *      else if (npc.type == NPCID.SkeletronHead)
         *      {
         *          npc.lifeMax = npc.lifeMax * 5;
         *      }
         *      else if (npc.type == NPCID.SkeletronHand)
         *      {
         *          npc.lifeMax = npc.lifeMax * 5;
         *      }
         *      else if (npc.type == NPCID.WallofFlesh)
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == NPCID.WallofFleshEye)
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == NPCID.Spazmatism)
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == NPCID.Retinazer)
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == NPCID.SkeletronPrime)
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == NPCID.TheDestroyer)
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == NPCID.Plantera)
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == NPCID.Golem)
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == NPCID.GolemHead)
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == NPCID.GolemFistLeft)
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == NPCID.GolemFistRight)
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == NPCID.DukeFishron)
         *      {
         *          npc.lifeMax = npc.lifeMax * 10;
         *      }
         *      else if (npc.type == NPCID.CultistBoss)
         *      {
         *          npc.lifeMax = npc.lifeMax * 11;
         *      }
         *      else if (npc.type == NPCID.MoonLordCore)
         *      {
         *          npc.lifeMax = npc.lifeMax * 12;
         *      }
         *      else if (npc.type == NPCID.MoonLordHand)
         *      {
         *          npc.lifeMax = npc.lifeMax * 12;
         *      }
         *      else if (npc.type == NPCID.MoonLordHead)
         *      {
         *          npc.lifeMax = npc.lifeMax * 12;
         *      }
         *      else if (npc.type == thoriummod.NPCType("TheGrandThunderBirdv2"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 2;
         *      }
         *      else if (npc.type == thoriummod.NPCType("QueenJelly"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 3;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Viscount"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 4;
         *      }
         *      else if (npc.type == thoriummod.NPCType("TheBuriedWarrior"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 5;
         *      }
         *      else if (npc.type == thoriummod.NPCType("GraniteEnergyStorm"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 5;
         *      }
         *      else if (npc.type == thoriummod.NPCType("ThePrimeScouter"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 6;
         *      }
         *      else if (npc.type == thoriummod.NPCType("BoreanStrider"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == thoriummod.NPCType("BoreanStriderPopped"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == thoriummod.NPCType("FallenDeathBeholder"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == thoriummod.NPCType("FallenDeathBeholder2"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 7;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Lich"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == thoriummod.NPCType("LichHeadless"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 8;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Abyssion"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == thoriummod.NPCType("AbyssionCracked"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == thoriummod.NPCType("AbyssionReleased"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 9;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Aquaius"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 13;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Aquaius2"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 13;
         *      }
         *      else if (npc.type == thoriummod.NPCType("Omnicide"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 13;
         *      }
         *      else if (npc.type == thoriummod.NPCType("SlagFury"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 13;
         *      }
         *      else if (npc.type == thoriummod.NPCType("RealityBreaker"))
         *      {
         *          npc.lifeMax = npc.lifeMax * 13;
         *      }
         *  }
         *  base.SetDefaults(npc);
         * }*/

        public override void OnChatButtonClicked(NPC npc, bool firstButton)
        {
            if (npc.type == NPCID.Nurse)
            {
                if (firstButton)
                {
                    Player   player    = Main.LocalPlayer;
                    MyPlayer modPlayer = MyPlayer.ModPlayer(player);
                    modPlayer.KaiokenLevel = 0;
                    Transformations.EndTransformations(player, true, false);
                    float kihealvalue = modPlayer.OverallKiMax() - modPlayer.GetKi();
                    modPlayer.AddKi(modPlayer.OverallKiMax(), false, false);
                    CombatText.NewText(new Rectangle((int)player.position.X, (int)player.position.Y, player.width, player.height), new Color(51, 204, 255), (int)Math.Round(kihealvalue, 0), false, false);
                    SoundUtil.PlayVanillaSound(SoundID.MaxMana, player);
                }
            }
        }
Ejemplo n.º 3
0
        public override void Update(Player player, ref int buffIndex)
        {
            MyPlayer modPlayer = MyPlayer.ModPlayer(player);

            KiDrainAdd(player);
            if (Transformations.IsAnyKaioken(player) || Transformations.IsSSJG(player))
            {
                Lighting.AddLight(player.Center + player.velocity * 8f, 0.2f, 0f, 0f);
            }
            else if (Transformations.IsLSSJ1(player) || Transformations.IsLSSJ2(player))
            {
                Lighting.AddLight(player.Center + player.velocity * 8f, 0f, 0.2f, 0f);
            }
            else if (Transformations.IsSSJ1(player) || Transformations.IsSSJ2(player) || Transformations.IsSSJ2(player) || Transformations.IsASSJ(player) || Transformations.IsUSSJ(player))
            {
                Lighting.AddLight(player.Center + player.velocity * 8f, 0.2f, 0.2f, 0f);
            }
            else if (Transformations.IsSpectrum(player))
            {
                var rainbow = Main.DiscoColor;
                Lighting.AddLight(player.Center + player.velocity * 8f, rainbow.R / 512f, rainbow.G / 512f, rainbow.B / 512f);
            }

            //give bonus base defense
            player.statDefense += BaseDefenceBonus;

            // if the player is in any ki-draining state, handles ki drain and power down when ki is depleted
            if (Transformations.IsAnythingOtherThanKaioken(player))
            {
                // player ran out of ki, so make sure they fall out of any forms they might be in.
                if (modPlayer.IsKiDepleted())
                {
                    if (Transformations.IsSuperKaioken(player))
                    {
                        modPlayer.KaiokenLevel = 0;
                    }
                    Transformations.EndTransformations(player, true, false);
                }
                else
                {
                    modPlayer.AddKi((KiDrainRate + modPlayer.KiDrainAddition) * -1, false, true);
                    KiDrainAddTimer++;
                    if (KiDrainAddTimer > 600)
                    {
                        modPlayer.KiDrainAddition += 1;
                        KiDrainAddTimer            = 0;
                    }
                    Lighting.AddLight(player.Center, 1f, 1f, 0f);
                }
            }
            else
            {
                // the player isn't in a ki draining state anymore, reset KiDrainAddition
                modPlayer.KiDrainAddition = 0;
            }

            player.moveSpeed       *= GetModifiedSpeedMultiplier(modPlayer);
            player.maxRunSpeed     *= GetModifiedSpeedMultiplier(modPlayer);
            player.runAcceleration *= GetModifiedSpeedMultiplier(modPlayer);
            if (player.jumpSpeedBoost < 1f)
            {
                player.jumpSpeedBoost = 1f;
            }
            player.jumpSpeedBoost *= GetModifiedSpeedMultiplier(modPlayer);

            // set player damage  mults
            player.meleeDamage  *= GetHalvedDamageBonus();
            player.rangedDamage *= GetHalvedDamageBonus();
            player.magicDamage  *= GetHalvedDamageBonus();
            player.minionDamage *= GetHalvedDamageBonus();
            player.thrownDamage *= GetHalvedDamageBonus();
            modPlayer.KiDamage  *= DamageMulti;

            // cross mod support stuff
            if (DBZMOD.instance.thoriumLoaded)
            {
                ThoriumEffects(player);
            }
            if (DBZMOD.instance.tremorLoaded)
            {
                TremorEffects(player);
            }
            if (DBZMOD.instance.enigmaLoaded)
            {
                EnigmaEffects(player);
            }
            if (DBZMOD.instance.battlerodsLoaded)
            {
                BattleRodEffects(player);
            }
            if (DBZMOD.instance.expandedSentriesLoaded)
            {
                ExpandedSentriesEffects(player);
            }
        }