public override bool OnPickup(Player player) { SoundUtil.PlayVanillaSound(SoundID.NPCDeath7, player); MyPlayer.ModPlayer(player).AddKi(MyPlayer.ModPlayer(player).OrbHealAmount, false, false); CombatText.NewText(new Rectangle((int)player.position.X, (int)player.position.Y, player.width, player.height), new Color(51, 204, 255), 50, false, false); return(false); }
private void TrySelectingSSJS(UIMouseEvent evt, UIElement listeningelement) { Player player = Main.LocalPlayer; if (player.name == "Nuova") { MenuSelection = MenuSelectionID.Spectrum; SoundUtil.PlayVanillaSound(SoundID.MenuTick); } }
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); }
private void TrySelectingSSJG(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.SSJGAchieved && !player.IsPlayerLegendary()) { MenuSelection = MenuSelectionID.SSJG; SoundUtil.PlayVanillaSound(SoundID.MenuTick); } else if (!player.LSSJAchieved) { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("The godlike power of the lunar star could awaken something beyond mortal comprehension."); } }
private void TrySelectingLSSJ2(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.LSSJ2Achieved) { MenuSelection = MenuSelectionID.LSSJ2; SoundUtil.PlayVanillaSound(SoundID.MenuTick); } else if (!player.LSSJ2Achieved) { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("A legendary saiyan sometimes may lose complete control upon being pushed into a critical state."); } }
private void TrySelectingLSSJ(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.LSSJAchieved) { MenuSelection = MenuSelectionID.LSSJ1; SoundUtil.PlayVanillaSound(SoundID.MenuTick); } else if (!player.SSJ2Achieved) { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("The rarest saiyans may be able to achieve a form beyond anything a normal saiyan could obtain."); } }
private void TrySelectingSSJ3(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.SSJ3Achieved && !player.IsPlayerLegendary()) { MenuSelection = MenuSelectionID.SSJ3; SoundUtil.PlayVanillaSound(SoundID.MenuTick); Main.NewText(string.Format("Super Saiyan 3 Mastery: {0}%", Math.Round(100f * player.MasteryLevel3, 2))); } else if (!player.LSSJAchieved) { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("The power of an ancient foe may be the key to unlocking greater power."); } }
private void TrySelectingSSJ2(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.SSJ2Achieved && !player.IsPlayerLegendary()) { MenuSelection = MenuSelectionID.SSJ2; SoundUtil.PlayVanillaSound(SoundID.MenuTick); Main.NewText(string.Format("Super Saiyan 2 Mastery: {0}%", Math.Round(100f * player.MasteryLevel2, 2))); } else if (!player.LSSJAchieved) { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("One may awaken their true power through extreme pressure while ascended."); } }
/* * Menu Selection ID's * 1 = SSJ1 * 2 = SSJ2 * 3 = SSJ3 * 4 = LSSJ1 * 5 = SSJG * 6 = LSSJ2 * 7 = SSJB/SSJBE * 8 = LSSJG * 9 = UI/MUI */ private void TrySelectingSSJ1(UIMouseEvent evt, UIElement listeningelement) { MyPlayer player = Main.LocalPlayer.GetModPlayer <MyPlayer>(); if (player.SSJ1Achieved) { MenuSelection = MenuSelectionID.SSJ1; SoundUtil.PlayVanillaSound(SoundID.MenuTick); Main.NewText(string.Format("Super Saiyan Mastery: {0}%", Math.Round(100f * player.MasteryLevel1, 2))); } else { SoundUtil.PlayVanillaSound(SoundID.MenuClose); Main.NewText("Only through failure with a powerful foe will true power awaken."); } }
/*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); } } }
public override void Kill(int timeLeft) { SoundUtil.PlayVanillaSound(2, projectile.position, 122); int num251 = 1; if (projectile.owner == Main.myPlayer) { for (int num252 = 0; num252 < num251; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) { value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("HellzoneGrenadeProjectile2"), (int)((double)projectile.damage), 0f, projectile.owner, 0f, 0f); } } }
public override void Kill(int timeLeft) { if (!projectile.active) { return; } projectile.tileCollide = false; projectile.ai[1] = 0f; projectile.alpha = 255; projectile.position.X = projectile.position.X + (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); projectile.width = 22; projectile.height = 22; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); projectile.knockBack = 8f; projectile.Damage(); Main.projectileIdentity[projectile.owner, projectile.identity] = -1; int num = projectile.timeLeft; projectile.timeLeft = 0; SoundUtil.PlayVanillaSound(2, projectile.position, 14); projectile.position.X = projectile.position.X + (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); projectile.width = 22; projectile.height = 22; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); for (int num615 = 0; num615 < 30; num615++) { int num616 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 1.5f); Main.dust[num616].velocity *= 1.4f; } for (int num617 = 0; num617 < 20; num617++) { int num618 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 3.5f); Main.dust[num618].noGravity = true; Main.dust[num618].velocity *= 7f; num618 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 1.5f); Main.dust[num618].velocity *= 3f; } for (int num619 = 0; num619 < 2; num619++) { float scaleFactor9 = 3f; if (num619 == 1) { scaleFactor9 = 3f; } int num620 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[num620].velocity *= scaleFactor9; Gore gore97 = Main.gore[num620]; gore97.velocity.X = gore97.velocity.X + 1f; Gore gore98 = Main.gore[num620]; gore98.velocity.Y = gore98.velocity.Y + 1f; num620 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[num620].velocity *= scaleFactor9; Gore gore99 = Main.gore[num620]; gore99.velocity.X = gore99.velocity.X - 1f; Gore gore100 = Main.gore[num620]; gore100.velocity.Y = gore100.velocity.Y + 1f; num620 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[num620].velocity *= scaleFactor9; Gore gore101 = Main.gore[num620]; gore101.velocity.X = gore101.velocity.X + 1f; Gore gore102 = Main.gore[num620]; gore102.velocity.Y = gore102.velocity.Y - 1f; num620 = Gore.NewGore(new Vector2(projectile.position.X, projectile.position.Y), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[num620].velocity *= scaleFactor9; Gore gore103 = Main.gore[num620]; gore103.velocity.X = gore103.velocity.X - 1f; Gore gore104 = Main.gore[num620]; gore104.velocity.Y = gore104.velocity.Y - 1f; } projectile.active = false; }