public override bool ChooseWaterStyle() { Mod mod = ModLoader.GetMod("Tremor"); TremorPlayer modPlayer = Main.player[Main.myPlayer].GetModPlayer <TremorPlayer>(mod); return(modPlayer.ZoneIce); }
public override void UpdateArmorSet(Player player) { player.setBonus = "Allows to see hazards\nSummons abyss magic to attack nearby enemies\nYour Shadow Arms has 33% chance to inflict Shadowflame on enemies"; TremorPlayer modPlayer = player.GetModPlayer <TremorPlayer>(mod); modPlayer.shadowArmSF = true; player.dangerSense = false; if (--TimeToShoot <= 0) { TimeToShoot = ShootRate; int Target = GetTarget(); if (Target != -1) { Shoot(Target, GetDamage()); } } if (Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y) > 1f && !player.rocketFrame) // Makes sure the player is actually moving { for (int k = 0; k < 2; k++) { int index = Dust.NewDust(new Vector2(player.position.X - player.velocity.X * 2f, player.position.Y - 2f - player.velocity.Y * 2f), player.width, player.height, 65, 0f, 0f, 100, default(Color), 2f); Main.dust[index].noGravity = true; Main.dust[index].noLight = true; Dust dust = Main.dust[index]; dust.velocity.X = dust.velocity.X - player.velocity.X * 0.5f; dust.velocity.Y = dust.velocity.Y - player.velocity.Y * 0.5f; } } }
public override void UpdateEquip(Player player) { TremorPlayer modPlayer = player.GetModPlayer <TremorPlayer>(mod); modPlayer.zellariumBody = true; player.lavaImmune = true; player.ignoreWater = true; player.GetModPlayer <MPlayer>(mod).alchemistDamage += 0.3f; player.buffImmune[BuffID.CursedInferno] = true; if (player.statLife <= player.statLifeMax2) { player.GetModPlayer <MPlayer>(mod).alchemistDamage += 0.3f; } if (player.statLife <= 400) { player.GetModPlayer <MPlayer>(mod).alchemistDamage += 0.4f; } if (player.statLife <= 300) { player.GetModPlayer <MPlayer>(mod).alchemistDamage += 0.5f; } if (player.statLife <= 200) { player.GetModPlayer <MPlayer>(mod).alchemistDamage += 0.6f; } }
public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.emeraldy = true; bool petProjectileNotSpawned = true; if (player.ownedProjectileCounts[mod.ProjectileType("Emeraldy")] > 0) { petProjectileNotSpawned = false; } if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, mod.ProjectileType("Emeraldy"), 0, 0f, player.whoAmI, 0f, 0f); } if ((player.controlDown && player.releaseDown)) { //if (player.doubleTapCardinalTimer[0] > 0 && player.doubleTapCardinalTimer[0] != 15) //{ for (int j = 0; j < 1000; j++) { if (Main.projectile[j].active && Main.projectile[j].type == mod.ProjectileType("Emeraldy") && Main.projectile[j].owner == player.whoAmI) { Projectile lightpet = Main.projectile[j]; Vector2 vectorToMouse = player.Center - lightpet.Center; lightpet.velocity += 5f * Vector2.Normalize(vectorToMouse); } } //} } }
public override void NearbyEffects(int i, int j, bool closer) { if (Main.tile[i, j].frameY >= 56) { TremorPlayer modPlayer = Main.LocalPlayer.GetModPlayer <TremorPlayer>(mod); modPlayer.NovaMonolith = true; } }
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { TremorPlayer modPlayer = Main.player[projectile.owner].GetModPlayer <TremorPlayer>(mod); if (modPlayer.shadowArmSF && Main.rand.NextBool(3)) { target.AddBuff(153, 180, false); } }
public override void AI() { Player player = Main.player[projectile.owner]; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.dead) { modPlayer.gurdPet = false; } if (modPlayer.gurdPet) { projectile.timeLeft = 2; } }
public override void CheckActive() { Player player = Main.player[projectile.owner]; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.dead) { modPlayer.ancientPredator = false; } if (modPlayer.ancientPredator) { projectile.timeLeft = 2; } }
public override void CheckActive() { Player player = Main.player[projectile.owner]; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.dead) { modPlayer.meteorMinion = false; } if (modPlayer.meteorMinion) { projectile.timeLeft = 2; } }
public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.nebulaJellyfish = true; bool petProjectileNotSpawned = true; if (player.ownedProjectileCounts[mod.ProjectileType("NebulaJellyfish")] > 0) { petProjectileNotSpawned = false; } if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, mod.ProjectileType("NebulaJellyfish"), 0, 0f, player.whoAmI, 0f, 0f); } }
public override void Update(Player player, ref int buffIndex) { TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.ownedProjectileCounts[mod.ProjectileType("WhiteSakuraPro")] > 0) { modPlayer.whiteSakura = true; } if (!modPlayer.whiteSakura) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
public override void Update(Player player, ref int buffIndex) { TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.ownedProjectileCounts[mod.ProjectileType("JellyfishStaffPro")] > 0) { modPlayer.jellyfishMinion = true; } if (!modPlayer.jellyfishMinion) { player.DelBuff(buffIndex); buffIndex--; } else { player.buffTime[buffIndex] = 18000; } }
public override void Update(Player player, ref int buffIndex) { player.GetModPlayer <MPlayer>(mod).alchemicalCrit += 20; player.buffTime[buffIndex] = 18000; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.gurdPet = true; bool petProjectileNotSpawned = true; if (player.ownedProjectileCounts[mod.ProjectileType("GurdPet")] > 0) { petProjectileNotSpawned = false; } if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { Projectile.NewProjectile(player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, mod.ProjectileType("GurdPet"), 0, 0f, player.whoAmI, 0f, 0f); } }
public override void Update(Player player, ref int buffIndex) { player.minionDamage += 0.1f; player.buffTime[buffIndex] = 18000; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.hauntpet = true; bool petProjectileNotSpawned = true; if (player.ownedProjectileCounts[mod.ProjectileType("TheHauntPro")] > 0) { petProjectileNotSpawned = false; } if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { Projectile.NewProjectile(player.position.X + player.width / 2, player.position.Y + player.height / 2, 0f, 0f, mod.ProjectileType("TheHauntPro"), 0, 0f, player.whoAmI, 0f, 0f); } }
public override void AI() { if (Main.rand.NextBool(5)) { Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 61, projectile.velocity.X * 0.1f, projectile.velocity.Y * 0.1f, 0, default(Color), 1f); } Player player = Main.player[projectile.owner]; TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); if (player.dead) { modPlayer.emeraldy = false; } if (modPlayer.emeraldy) { projectile.timeLeft = 2; } Lighting.AddLight(projectile.position, 0.0f, 1.27f, 0.64f); }
public override bool ChooseWaterStyle() { TremorPlayer modPlayer = Main.player[Main.myPlayer].GetModPlayer <TremorPlayer>(); return(modPlayer.ZoneIce); }
public override bool CanUseItem(Player player) { TremorPlayer modPlayer = player.GetModPlayer <TremorPlayer>(mod); return(modPlayer.ruinAltar && !NPC.AnyNPCs(mod.NPCType("Dragon_HeadB"))); }
public override void Update(Player player, ref int buffIndex) { TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.ruinAltar = true; }
public override void UpdateAccessory(Player player, bool hideVisual) { TremorPlayer modPlayer = (TremorPlayer)player.GetModPlayer(mod, "TremorPlayer"); modPlayer.heartAmulet = true; }