public override void UpdateAccessory(Player player, bool hideVisual) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.aItems = true; if (!player.buffType.Contains(ModContent.BuffType <Recharge>())) { if (AntiarisMod.adventurerKey.JustPressed) { player.TeleportationPotion(); AntiarisHelper.CreateDust(player, 64, 20); SoundEngine.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Items/AdventurerItem"), player.position); for (int l = 3; l < 8 + player.extraAccessorySlots; l++) { if (player.armor[l].type == ModContent.ItemType <CelestialManual>()) { int newLife = Main.rand.Next(35, 55); player.statLife += newLife; player.HealEffect(newLife); } } player.AddBuff(ModContent.BuffType <Recharge>(), 2000); } } }
public override void AI() { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; bool flag = projectile.type == ModContent.ProjectileType <Snowflake>(); AntiarisPlayer modPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (flag) { if (player.dead) { modPlayer.snowflake = false; } if (modPlayer.snowflake) { projectile.timeLeft = 2; } } if (Main.rand.Next(3) == 0) { int i = Dust.NewDust(projectile.position, projectile.width, projectile.height, 67, projectile.velocity.X, projectile.velocity.Y); Main.dust[i].noGravity = true; } }
public override void UpdateAccessory(Player player, bool hideVisual) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.honeyBadger = true; player.noKnockback = true; }
public override void UpdateAccessory(Player player, bool hideVisual) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.aItems = true; if (!player.buffType.Contains(ModContent.BuffType <Recharge>())) { if (player.showLastDeath) { if (AntiarisMod.adventurerKey.JustPressed) { Microsoft.Xna.Framework.Vector2 teleport = player.lastDeathPostion; player.Teleport(teleport, -69); player.Center = teleport; AntiarisHelper.CreateDust(player, 64, 20); SoundEngine.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Items/AdventurerItem"), player.position); for (int l = 3; l < 8 + player.extraAccessorySlots; l++) { if (player.armor[l].type == ModContent.ItemType <CelestialManual>()) { int newLife = Main.rand.Next(35, 55); player.statLife += newLife; player.HealEffect(newLife); } } player.AddBuff(ModContent.BuffType <Recharge>(), 2000); NetMessage.SendData(MessageID.Teleport, -1, -1, null, 0, player.whoAmI, teleport.X, teleport.Y, 1, 0, 0); } } } }
public override bool UseItem(Player player) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.handheldDevice = !aPlayer.handheldDevice; return(true); }
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (projectile.owner == Main.myPlayer && aPlayer.boilingPoint) { target.AddBuff(BuffID.OnFire, 120, false); } if (projectile.owner == Main.myPlayer && aPlayer.cherryBlossom) { target.AddBuff(BuffID.Poisoned, 120, false); } if (projectile.owner == Main.myPlayer && aPlayer.despairingFlames) { target.AddBuff(ModContent.BuffType <DespairingFlames>(), 120, false); } if (projectile.owner == Main.myPlayer && aPlayer.thoriumBlunderbuss) { projectile.penetrate++; } }
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.necromancerSet && target.life <= 0) { int newLife = player.statLifeMax / 20; if (newLife > 0) { player.statLife += newLife; player.HealEffect(newLife); NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, projectile.owner, newLife); } } if (aPlayer.shadowflameCharm && Main.rand.Next(3) == 0) { target.AddBuff(BuffID.ShadowFlame, 120); } }
public override void Update(Player player, ref int buffIndex) { string TimeStop2 = Language.GetTextValue("Mods.Antiaris.TimeStop2", player.name); AntiarisPlayer aPlayer = Main.LocalPlayer.GetModPlayer <AntiarisPlayer>(); if (player != Main.LocalPlayer) { Main.LocalPlayer.AddBuff(ModContent.BuffType <FrozenTime2>(), 20); } if (player.buffTime[buffIndex] > 550) { aPlayer.inversion = true; } else { aPlayer.inversion = false; } if (player.buffTime[buffIndex] == 0) { ModContent.GetInstance <AntiarisWorld>().frozenTime = false; Main.NewText(TimeStop2, 255, 255, 255); SoundEngine.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Items/TimeParadoxCrystal2"), player.position); if (player.name != "zadum4ivii") { player.AddBuff(ModContent.BuffType <CrystalRecharge>(), 18000); } } else { ModContent.GetInstance <AntiarisWorld>().frozenTime = true; } }
public override void AI() { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; bool flag = projectile.type == ModContent.ProjectileType <SnowOwl>(); AntiarisPlayer modPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (flag) { if (player.dead) { modPlayer.snowOwl = false; } if (modPlayer.snowOwl) { projectile.timeLeft = 2; } } }
public override void Kill(Projectile projectile, int timeLeft) { if (projectile.type == 134 || projectile.type == 137 || projectile.type == 140 || projectile.type == 143) { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (projectile.owner == Main.myPlayer && aPlayer.Bonebardier) { int num220 = 3; for (int num221 = 0; num221 < num220; num221++) { Vector2 value17 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); value17.Normalize(); value17 *= Main.rand.Next(10, 201) * 0.01f; Projectile.NewProjectile(projectile.position.X, projectile.position.Y, value17.X, value17.Y, ProjectileID.BoneGloveProj, projectile.damage, 1f, projectile.owner, 0f, Main.rand.Next(-45, 1)); } } } }
public override void UpdateVanity(Player player, EquipType type) { player.yoraiz0rDarkness = true; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.bizzare = true; }
public override bool UseItem(Player player) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.OpenWindow3 = !aPlayer.OpenWindow3; return(true); }
public override void UpdateAccessory(Player player, bool hideVisual) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.shadowflameCharm = true; player.minionDamage += 0.1f; player.maxMinions += 1; }
public override void UpdateAccessory(Player player, bool hideVisual) { player.accDivingHelm = true; player.accFlipper = true; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.scuba = true; Lighting.AddLight(player.Top, Color.Blue.ToVector3() * 0.7f); }
public override void UpdateArmorSet(Player player) { player.boneArmor = true; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.necromancerSet = true; string NecromancerSetBonus = Language.GetTextValue("Mods.Antiaris.NecromancerSetBonus"); player.setBonus = NecromancerSetBonus; }
public override void KillWall(int i, int j, int type, ref bool fail) { Player player = Main.LocalPlayer; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.mirrorZone && (type == 5 || type == 174 || type == 33)) { fail = true; } }
public override void UpdateArmorSet(Player player) { player.statManaMax2 += 20; string DiscipleSetBonus = Language.GetTextValue("Mods.Antiaris.DiscipleSetBonus"); player.setBonus = DiscipleSetBonus; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.discipleSet = true; }
public static void _drawMapIcon(Mod mod, ref string text) { Player player = Main.LocalPlayer; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(ModLoader.GetMod("Antiaris")); if (aPlayer.foundChest) { _foundChests(player); _drawIcons(mod, Main.spriteBatch); } }
public override bool CanExplode(int i, int j, int type) { Player player = Main.LocalPlayer; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.mirrorZone && (type == TileID.GrayBrick || type == TileID.DemoniteBrick || type == TileID.CrimtaneBrick)) { return(false); } return(base.CanExplode(i, j, type)); }
public override void UpdateArmorSet(Player player) { player.manaCost -= 0.17f; player.statManaMax2 += 20; string EnchantedSetBonus = Language.GetTextValue("Mods.Antiaris.EnchantedSetBonus"); player.setBonus = EnchantedSetBonus; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.enchantedSet = true; }
public override bool CanExplode(int i, int j, int type) { Player player = Main.LocalPlayer; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.mirrorZone && (type == 5 || type == 174 || type == 33)) { return(false); } return(base.CanExplode(i, j, type)); }
public override bool CanEquipAccessory(Player player, int slot) { for (int i = 0; i < player.armor.Length; i++) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.aItems) { return(false); } } return(true); }
public override void UpdateAccessory(Player player, bool hideVisual) { AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.mirrorShield = true; if (!player.dead) { if (player.ownedProjectileCounts[ModContent.ProjectileType <Shield>()] < 1) { Projectile.NewProjectile(player.position, Vector2.Zero, ModContent.ProjectileType <Shield>(), 0, 0, player.whoAmI); } } }
public override void AI() { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; bool flag = projectile.type == ModContent.ProjectileType <ParrotJunior>(); AntiarisPlayer modPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (flag) { if (player.dead) { modPlayer.parrot = false; } if (modPlayer.parrot) { projectile.timeLeft = 2; } } projectile.rotation = projectile.velocity.X * 0.05f; if (Math.Abs(projectile.velocity.X) > 0.2) { projectile.spriteDirection = -projectile.direction; } projectile.frameCounter++; if (projectile.frameCounter > 12) { projectile.frame++; projectile.frameCounter = 0; } if (projectile.frame > 3) { projectile.frame = 0; } for (int k = 0; k < Main.rand.Next(1, 2); k++) { int dust = Dust.NewDust(new Vector2(projectile.position.X + 10f * -projectile.direction, projectile.position.Y), projectile.width, projectile.height, 59, projectile.velocity.X * 0.4f, projectile.velocity.Y * 0.4f, 100, Color.White, 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity.X += 1.2f * -projectile.direction; } }
public override bool Drop(int i, int j, int type, ref int dropType) { Player player = Main.LocalPlayer; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.mirrorZone && (type == 5 || type == 174 || type == 33)) { dropType = 0; return(false); } else { return(base.Drop(i, j, type, ref dropType)); } }
public override void UpdateArmorSet(Player player) { string AntlionSetBonus = Language.GetTextValue("Mods.Antiaris.AntlionSetBonus"); player.setBonus = AntlionSetBonus; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); aPlayer.swarmerS = true; aPlayer.antlionSet = true; if (player.ownedProjectileCounts[ModContent.ProjectileType <AntlionSummon>()] > 0) { player.minionDamage += 0.1f * player.ownedProjectileCounts[ModContent.ProjectileType <AntlionSummon>()]; player.statDefense += 2 * player.ownedProjectileCounts[ModContent.ProjectileType <AntlionSummon>()]; player.endurance += 0.05f * player.ownedProjectileCounts[ModContent.ProjectileType <AntlionSummon>()]; } }
public override void Update(Player player, ref int buffIndex) { AntiarisPlayer modPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (player.ownedProjectileCounts[ModContent.ProjectileType <ParrotJunior>()] > 0) { modPlayer.parrot = true; } if (!modPlayer.parrot) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
public override void Update(Player player, ref int buffIndex) { AntiarisPlayer modPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (player.ownedProjectileCounts[mod.ProjectileType("ForestGuardianJunior")] > 0) { modPlayer.forestGuardianJunior = true; } if (!modPlayer.forestGuardianJunior) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
public override void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit) { Player owner = null; if (projectile.owner != -1) { owner = Main.player[projectile.owner]; } else if (projectile.owner == 255) { owner = Main.LocalPlayer; } Player player = owner; AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (projectile.minion || (projectile.type == 408 && player.sharknadoMinion) || (projectile.type == 389 && player.twinsMinion) || (projectile.type == 376 && player.impMinion) || (projectile.type == 374 && player.hornetMinion) || (projectile.type == 195 && player.pygmy) || (projectile.type == 433 && player.UFOMinion)) { if (aPlayer.necromancerSet && target.life <= 0) { int newLife = player.statLifeMax / 20; if (newLife > 0) { player.statLife += newLife; player.HealEffect(newLife); NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, projectile.owner, newLife); } } if (aPlayer.shadowflameCharm && Main.rand.Next(3) == 0) { target.AddBuff(BuffID.ShadowFlame, 120); } } if (projectile.aiStyle == 88 && (projectile.knockBack >= .2f && projectile.knockBack <= .5f)) { target.immune[projectile.owner] = 6; } }
public override bool UseItem(Player player) { string TimeStop1 = Language.GetTextValue("Mods.Antiaris.TimeStop1", player.name); Main.NewText(TimeStop1, 255, 255, 255); AntiarisPlayer aPlayer = player.GetModPlayer <AntiarisPlayer>(mod); if (aPlayer.bizzare) { SoundEngine.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Items/TimeParadoxCrystal3"), Main.LocalPlayer.position); } else { SoundEngine.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Items/TimeParadoxCrystal"), Main.LocalPlayer.position); } Projectile.NewProjectile(player.Center.X, player.Center.Y, 0, 0, ModContent.ProjectileType <TimeWave>(), 0, 0f, player.whoAmI, 0.0f, 0.0f); player.AddBuff(ModContent.BuffType <FrozenTime>(), 600); return(true); }