public override void AI() { Player player = Main.player[projectile.owner]; FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } int num1038 = 30; bool flag67 = false; Vector2 value67 = Vector2.Zero; Vector2 arg_2D865_0 = Vector2.Zero; float num1052 = 0f; if (projectile.ai[1] == 1f) { projectile.ai[1] = 0f; projectile.netUpdate = true; } int byUUID = FargoSoulsUtil.GetByUUIDReal(projectile.owner, (int)projectile.ai[0], projectile.type, ModContent.ProjectileType <DestroyerHead>()); if (byUUID >= 0 && Main.projectile[byUUID].active) { flag67 = true; value67 = Main.projectile[byUUID].Center; Vector2 arg_2D957_0 = Main.projectile[byUUID].velocity; num1052 = Main.projectile[byUUID].rotation; float num1053 = MathHelper.Clamp(Main.projectile[byUUID].scale, 0f, 50f); int arg_2D9AD_0 = Main.projectile[byUUID].alpha; Main.projectile[byUUID].localAI[0] = projectile.localAI[0] + 1f; if (Main.projectile[byUUID].type != mod.ProjectileType("DestroyerHead")) { Main.projectile[byUUID].localAI[1] = projectile.identity; } } if (!flag67) { return; } projectile.alpha -= 42; if (projectile.alpha < 0) { projectile.alpha = 0; } projectile.velocity = Vector2.Zero; Vector2 vector134 = value67 - projectile.Center; if (num1052 != projectile.rotation) { float num1056 = MathHelper.WrapAngle(num1052 - projectile.rotation); vector134 = vector134.RotatedBy(num1056 * 0.1f, default(Vector2)); } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; projectile.width = projectile.height = (int)(num1038 * projectile.scale); projectile.Center = projectile.position; if (vector134 != Vector2.Zero) { projectile.Center = value67 - Vector2.Normalize(vector134) * 36; } projectile.spriteDirection = vector134.X > 0f ? 1 : -1; if (--attackTimer <= 0) { attackTimer = Main.rand.Next(150) + 150; } if (attackTimer == 1) { if (projectile.owner == Main.myPlayer) { int selectedTarget = -1; //pick target const float maxRange = 750f; for (int i = 0; i < Main.maxNPCs; i++) { if (Main.npc[i].CanBeChasedBy(projectile) && Collision.CanHit(projectile.Center, 0, 0, Main.npc[i].Center, 0, 0)) { if (projectile.Distance(Main.npc[i].Center) <= maxRange && Main.rand.NextBool()) //random because destroyer { selectedTarget = i; } } } if (selectedTarget != -1) //shoot { Projectile.NewProjectile(projectile.Center, 10f * projectile.DirectionTo(Main.npc[selectedTarget].Center), ProjectileID.MiniRetinaLaser, projectile.damage, projectile.knockBack, projectile.owner); Main.PlaySound(SoundID.Item12, projectile.Center); } } } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); //concentrated rainbow matter player.buffImmune[mod.BuffType("FlamesoftheUniverse")] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.RainbowSlime)) { player.AddBuff(mod.BuffType("RainbowSlime"), 2); } //dragon fang player.buffImmune[mod.BuffType("ClippedWings")] = true; player.buffImmune[mod.BuffType("Crippled")] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.DragonFang)) { fargoPlayer.DragonFang = true; } //frigid gemstone player.buffImmune[BuffID.Frostburn] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.FrigidGemstone)) { fargoPlayer.FrigidGemstone = true; if (fargoPlayer.FrigidGemstoneCD > 0) { fargoPlayer.FrigidGemstoneCD--; } } //wretched pouch player.buffImmune[BuffID.ShadowFlame] = true; player.buffImmune[mod.BuffType("Shadowflame")] = true; player.GetModPlayer <FargoPlayer>().WretchedPouch = true; //sands of time player.buffImmune[BuffID.WindPushed] = true; fargoPlayer.SandsofTime = true; //squeaky toy player.buffImmune[mod.BuffType("SqueakyToy")] = true; player.buffImmune[mod.BuffType("Guilty")] = true; fargoPlayer.SqueakyAcc = true; //tribal charm player.buffImmune[BuffID.Webbed] = true; player.buffImmune[mod.BuffType("Purified")] = true; fargoPlayer.TribalCharm = true; //mystic skull player.buffImmune[BuffID.Suffocation] = true; player.manaFlower = true; //security wallet player.buffImmune[mod.BuffType("Midas")] = true; fargoPlayer.SecurityWallet = true; //carrot player.nightVision = true; //nymph's perfume player.buffImmune[BuffID.Lovestruck] = true; player.buffImmune[mod.BuffType("Lovestruck")] = true; player.buffImmune[mod.BuffType("Hexed")] = true; player.buffImmune[BuffID.Stinky] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.NymphPerfume)) { fargoPlayer.NymphsPerfume = true; if (fargoPlayer.NymphsPerfumeCD > 0) { fargoPlayer.NymphsPerfumeCD--; } } //tim's concoction if (SoulConfig.Instance.GetValue(SoulConfig.Instance.TimsConcoction)) { player.GetModPlayer <FargoPlayer>().TimsConcoction = true; } }
public override bool CanUseItem(Item item, Player player) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); if (modPlayer.IronGuard) { //Main.NewText($"iron {modPlayer.ironShieldCD}, {modPlayer.ironShieldTimer}"); modPlayer.IronGuard = false; modPlayer.wasHoldingShield = false; player.shield_parry_cooldown = 0; //prevent that annoying tick sound //check is necessary so if player does a real parry then switches to right click weapon, using it won't reset cooldowns if (modPlayer.ironShieldCD == 40 && modPlayer.ironShieldTimer == 20) { modPlayer.ironShieldCD = 0; modPlayer.ironShieldTimer = 0; } } //dont use hotkeys in stasis if (player.HasBuff(ModContent.BuffType <GoldenStasis>())) { if (item.type == ItemID.RodofDiscord) { player.ClearBuff(ModContent.BuffType <Buffs.Souls.GoldenStasis>()); } else { return(false); } } if (FargoSoulsWorld.MasochistMode) { if (item.type == ItemID.RodofDiscord && (modPlayer.LihzahrdCurse || (Framing.GetTileSafely(Main.MouseWorld).wall == WallID.LihzahrdBrickUnsafe && !player.buffImmune[ModContent.BuffType <Buffs.Masomode.LihzahrdCurse>()]))) { return(false); } if (modPlayer.LihzahrdCurse && (item.type == ItemID.WireKite || item.type == ItemID.WireCutter)) { return(false); } } if (item.magic && player.GetModPlayer <FargoPlayer>().ReverseManaFlow) { int damage = (int)(item.mana / (1f - player.endurance) + player.statDefense); player.Hurt(PlayerDeathReason.ByCustomReason(player.name + " was destroyed by their own magic."), damage, 0); player.immune = false; player.immuneTime = 0; } if (modPlayer.BuilderMode && (item.createTile != -1 || item.createWall != -1) && item.type != ItemID.PlatinumCoin && item.type != ItemID.GoldCoin) { item.useTime = 1; item.useAnimation = 1; } if (modPlayer.AdditionalAttacks && modPlayer.AdditionalAttacksTimer <= 0 && //non weapons and weapons with no ammo begone item.damage > 0 && player.HasAmmo(item, true) && !(item.mana > 0 && player.statMana < item.mana) && item.type != ItemID.ExplosiveBunny && item.type != ItemID.Cannonball && item.useTime > 0 && item.createTile == -1 && item.createWall == -1 && item.ammo == AmmoID.None && item.hammer == 0 && item.pick == 0 && item.axe == 0) { modPlayer.AdditionalAttacksTimer = 60; Vector2 position = player.Center; Vector2 velocity = Vector2.Normalize(Main.MouseWorld - position); if (modPlayer.BorealEnchant && player.GetToggleValue("Boreal") && player.whoAmI == Main.myPlayer) { Vector2 vel = Vector2.Normalize(Main.MouseWorld - player.Center) * 17f; int p = Projectile.NewProjectile(player.Center, vel, ProjectileID.SnowBallFriendly, (int)(item.damage * .5f), 1, Main.myPlayer); int numSnowballs = 3; if (modPlayer.WoodForce || modPlayer.WizardEnchant) { numSnowballs = 5; } if (p != 1000) { FargoGlobalProjectile.SplitProj(Main.projectile[p], numSnowballs, MathHelper.Pi / 10, 1); } } if (modPlayer.CelestialRune && player.GetToggleValue("MasoCelest")) { if (item.melee && item.pick == 0 && item.axe == 0 && item.hammer == 0) //fireball { Main.PlaySound(SoundID.Item34, position); for (int i = 0; i < 3; i++) { Projectile.NewProjectile(position, velocity.RotatedByRandom(Math.PI / 6) * Main.rand.NextFloat(6f, 10f), ModContent.ProjectileType <CelestialRuneFireball>(), (int)(50f * player.meleeDamage), 9f, player.whoAmI); } } if (item.ranged) //lightning { float ai1 = Main.rand.Next(100); Vector2 vel = Vector2.Normalize(velocity.RotatedByRandom(Math.PI / 4)) * 7f; Projectile.NewProjectile(position, vel, ModContent.ProjectileType <CelestialRuneLightningArc>(), (int)(50f * player.rangedDamage), 1f, player.whoAmI, velocity.ToRotation(), ai1); } if (item.magic) //ice mist { Projectile.NewProjectile(position, velocity * 4.25f, ModContent.ProjectileType <CelestialRuneIceMist>(), (int)(50f * player.magicDamage), 4f, player.whoAmI); } if (item.thrown) //ancient vision { Projectile.NewProjectile(position, velocity * 16f, ModContent.ProjectileType <CelestialRuneAncientVision>(), (int)(50f * player.magicDamage), 0, player.whoAmI); } } if (modPlayer.PumpkingsCape && player.GetToggleValue("MasoPump")) { if (item.melee && item.pick == 0 && item.axe == 0 && item.hammer == 0) //flaming jack { float distance = 2000f; int target = -1; for (int i = 0; i < 200; i++) { if (Main.npc[i].active && Main.npc[i].CanBeChasedBy()) { float newDist = Main.npc[i].Distance(player.Center); if (newDist < distance) { distance = newDist; target = i; } } } if (target != -1) { Projectile.NewProjectile(position, velocity * 8f, ProjectileID.FlamingJack, (int)(75f * player.meleeDamage), 7.5f, player.whoAmI, target, 0f); } } if (item.ranged) //jack o lantern { Projectile.NewProjectile(position, velocity * 11f, ProjectileID.JackOLantern, (int)(95f * player.rangedDamage), 8f, player.whoAmI); } if (item.magic) //bat scepter { for (int i = 0; i < 3; i++) { Vector2 newVel = velocity * 10f; newVel.X += Main.rand.Next(-35, 36) * 0.02f; newVel.Y += Main.rand.Next(-35, 36) * 0.02f; Projectile.NewProjectile(position, newVel, ProjectileID.Bat, (int)(45f * player.magicDamage), 3f, player.whoAmI); } } } } //critter attack timer if (modPlayer.WoodEnchant && player.altFunctionUse == ItemAlternativeFunctionID.ActivatedAndUsed && item.makeNPC > 0) { if (modPlayer.CritterAttackTimer == 0) { Vector2 vel = Vector2.Normalize(Main.MouseWorld - player.Center); float damageMultiplier = player.minionDamage; int type = -1; int damage = 0; int attackCooldown = 0; switch (item.type) { //case ItemID.Bunny: // type = ProjectileID.ExplosiveBunny; // damage = 10; // attackCooldown = 10; // break; case ItemID.Bird: type = ModContent.ProjectileType <BirdProj>(); damage = 15; attackCooldown = 15; break; case ItemID.BlueJay: type = ModContent.ProjectileType <BlueJayProj>(); damage = 10; attackCooldown = 10; break; case ItemID.Cardinal: type = ModContent.ProjectileType <CardinalProj>(); damage = 20; attackCooldown = 20; break; } if (type != -1) { Projectile.NewProjectile(player.Center, vel * 2f, type, damage, 2, player.whoAmI); modPlayer.CritterAttackTimer = attackCooldown; } } return(false); } if (item.type == ItemID.RodofDiscord) { if (FargoSoulsWorld.MasochistMode && EModeGlobalNPC.AnyBossAlive()) { player.AddBuff(ModContent.BuffType <Buffs.Masomode.ChaosLife>(), 30); modPlayer.MaxLifeReduction += 100; player.chaosState = true; /*player.statLife -= player.statLifeMax2 / 5; * PlayerDeathReason damageSource = PlayerDeathReason.ByOther(13); * if (Main.rand.Next(2) == 0) * damageSource = PlayerDeathReason.ByOther(player.Male ? 14 : 15); * if (player.statLife <= 0 && !player.chaosState) //since chaos state will check and kill anyway, avoid doublekill * player.KillMe(damageSource, 1, 0); * player.lifeRegenCount = 0; * player.lifeRegenTime = 0;*/ } } return(true); }
public override void UpdateAccessory(Player player, bool hideVisual) { if (!Fargowiltas.Instance.ThoriumLoaded) { return; } FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(); //folv modPlayer.MalignantEnchant = true; modPlayer.FolvEnchant = true; if (SoulConfig.Instance.GetValue("Folv's Aura")) { thoriumPlayer.folvSet = true; Lighting.AddLight(player.position, 0.03f, 0.3f, 0.5f); thoriumPlayer.folvBonus2 = true; } if (SoulConfig.Instance.GetValue("Mana-Charged Rocketeers")) { //mana charge rockets thorium.GetItem("ManaChargedRocketeers").UpdateAccessory(player, hideVisual); } //white dwarf modPlayer.WhiteDwarfEnchant = true; if (SoulConfig.Instance.GetValue("Celestial Aura")) { //celestial thoriumPlayer.celestialSet = true; } if (modPlayer.ThoriumSoul) { return; } if (SoulConfig.Instance.GetValue("Ascension Statuette")) { //ascension statue thoriumPlayer.ascension = true; } /*//balladeer meme hell * if (thoriumPlayer.empowerDamage > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerAttackSpeed > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerCriticalStrike > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerMovementSpeed > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerInspirationRegen > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerDamageReduction > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerManaRegen > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerMaxMana > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerLifeRegen > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerMaxLife > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerDefense > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * } * if (thoriumPlayer.empowerAmmoConsumption > 0) * { * modPlayer.AllDamageUp(.08f); * player.moveSpeed += 0.03f; * }*/ }
public override void UpdateAccessory(Player player, bool hideVisual) { if (!Fargowiltas.Instance.ThoriumLoaded) { return; } FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //includes malignant debuff, folv bolts, white dwarf flares modPlayer.VanaheimForce = true; if (Soulcheck.GetValue("Folv's Aura")) { //folv thoriumPlayer.folvSet = true; Lighting.AddLight(player.position, 0.03f, 0.3f, 0.5f); thoriumPlayer.folvBonus2 = true; } if (Soulcheck.GetValue("Mana-Charged Rocketeers")) { //mana charge rockets player.manaRegen++; player.manaRegenDelay -= 2; if (player.statMana > 0) { player.rocketBoots = 1; if (player.rocketFrame) { if (Main.rand.Next(2) == 0) { player.statMana -= 2; Dust.NewDust(new Vector2(player.position.X, player.position.Y + 20f), player.width, player.height, 15, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 100, default(Color), 1.5f); } player.rocketTime = 1; } } } if (Soulcheck.GetValue("Celestial Aura")) { //celestial thoriumPlayer.celestialSet = true; } if (Soulcheck.GetValue("Ascension Statuette")) { //ascension statue thoriumPlayer.ascension = true; } //balladeer meme hell if (thoriumPlayer.empowerDamage > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerAttackSpeed > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerCriticalStrike > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerMovementSpeed > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerInspirationRegen > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerDamageReduction > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerManaRegen > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerMaxMana > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerLifeRegen > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerMaxLife > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerDefense > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } if (thoriumPlayer.empowerAmmoConsumption > 0) { modPlayer.AllDamageUp(.08f); player.moveSpeed += 0.03f; } }
public override void UpdateAccessory(Player player, bool hideVisual) { if (!Fargowiltas.Instance.ThoriumLoaded) { return; } FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //includes illumite rocket and jester bell modPlayer.MidgardForce = true; //lodestone mod.GetItem("LodestoneEnchant").UpdateAccessory(player, hideVisual); //valadium //set bonus player.gravControl = true; if (player.gravDir == -1f) { modPlayer.AllDamageUp(.12f); } if (Soulcheck.GetValue("Eye of the Beholder")) { //eye of beholder thorium.GetItem("EyeofBeholder").UpdateAccessory(player, hideVisual); } //illumite //slime pet modPlayer.AddPet("Pink Slime Pet", hideVisual, thorium.BuffType("PinkSlimeBuff"), thorium.ProjectileType("PinkSlime")); modPlayer.IllumiteEnchant = true; if (Soulcheck.GetValue("Terrarium Spirits")) { //terrarium set bonus timer++; if (timer > 60) { Projectile.NewProjectile(player.Center.X + 14f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraRed"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X + 9f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraOrange"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X + 4f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraYellow"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraGreen"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 4f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraBlue"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 9f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraIndigo"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 14f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraPurple"), 50, 0f, Main.myPlayer, 0f, 0f); timer = 0; } } //terrarium woofer thoriumPlayer.bardRangeBoost += 450; for (int i = 0; i < 255; i++) { Player player2 = Main.player[i]; if (player2.active && !player2.dead && Vector2.Distance(player2.Center, player.Center) < 450f) { thoriumPlayer.empowerTerrarium = true; } } if (Soulcheck.GetValue("Crietz")) { //crietz thoriumPlayer.crietzAcc = true; } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); fargoPlayer.MasochistSoul = true; player.AddBuff(mod.BuffType("SouloftheMasochist"), 2); //stat modifiers fargoPlayer.AllDamageUp(.5f); player.endurance += 0.1f; player.maxMinions += 10; player.maxTurrets += 10; player.armorPenetration += 50; player.statLifeMax2 += player.statLifeMax; player.lifeRegen += 7; player.lifeRegenTime += 7; player.lifeRegenCount += 7; fargoPlayer.wingTimeModifier += 2f; player.moveSpeed += 0.2f; //slimy shield player.buffImmune[BuffID.Slimed] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SlimyShield)) { player.maxFallSpeed *= 2f; fargoPlayer.SlimyShield = true; } //agitating lens fargoPlayer.AgitatingLens = true; //queen stinger player.honey = true; player.npcTypeNoAggro[210] = true; player.npcTypeNoAggro[211] = true; player.npcTypeNoAggro[42] = true; player.npcTypeNoAggro[176] = true; player.npcTypeNoAggro[231] = true; player.npcTypeNoAggro[232] = true; player.npcTypeNoAggro[233] = true; player.npcTypeNoAggro[234] = true; player.npcTypeNoAggro[235] = true; fargoPlayer.QueenStinger = true; //necromantic brew fargoPlayer.NecromanticBrew = true; //supreme deathbringer fairy fargoPlayer.SupremeDeathbringerFairy = true; //pure heart fargoPlayer.PureHeart = true; //corrupt heart fargoPlayer.CorruptHeart = true; if (fargoPlayer.CorruptHeartCD > 0) { fargoPlayer.CorruptHeartCD -= 2; } //gutted heart fargoPlayer.GuttedHeart = true; fargoPlayer.GuttedHeartCD -= 2; //faster spawns //mutant antibodies player.buffImmune[BuffID.Wet] = true; player.buffImmune[BuffID.Rabies] = true; fargoPlayer.MutantAntibodies = true; //lump of flesh player.buffImmune[BuffID.Blackout] = true; player.buffImmune[BuffID.Obstructed] = true; player.buffImmune[BuffID.Dazed] = true; fargoPlayer.SkullCharm = true; if (!player.ZoneDungeon) { player.npcTypeNoAggro[NPCID.SkeletonSniper] = true; player.npcTypeNoAggro[NPCID.SkeletonCommando] = true; player.npcTypeNoAggro[NPCID.TacticalSkeleton] = true; player.npcTypeNoAggro[NPCID.DiabolistRed] = true; player.npcTypeNoAggro[NPCID.DiabolistWhite] = true; player.npcTypeNoAggro[NPCID.Necromancer] = true; player.npcTypeNoAggro[NPCID.NecromancerArmored] = true; player.npcTypeNoAggro[NPCID.RaggedCaster] = true; player.npcTypeNoAggro[NPCID.RaggedCasterOpenCoat] = true; } //sinister icon if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SinisterIcon)) { fargoPlayer.SinisterIcon = true; } if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SinisterIconDrops)) { fargoPlayer.SinisterIconDrops = true; } //sparkling adoration if (SoulConfig.Instance.GetValue(SoulConfig.Instance.Graze)) { player.GetModPlayer <FargoPlayer>().Graze = true; } if (SoulConfig.Instance.GetValue(SoulConfig.Instance.DevianttHearts)) { player.GetModPlayer <FargoPlayer>().DevianttHearts = true; } //dragon fang if (SoulConfig.Instance.GetValue(SoulConfig.Instance.DragonFang)) { fargoPlayer.DragonFang = true; } //frigid gemstone player.buffImmune[BuffID.Frostburn] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.FrigidGemstone)) { fargoPlayer.FrigidGemstone = true; if (fargoPlayer.FrigidGemstoneCD > 0) { fargoPlayer.FrigidGemstoneCD -= 5; } } //wretched pouch player.buffImmune[BuffID.ShadowFlame] = true; player.GetModPlayer <FargoPlayer>().WretchedPouch = true; //sands of time player.buffImmune[BuffID.WindPushed] = true; fargoPlayer.SandsofTime = true; //mystic skull player.buffImmune[BuffID.Suffocation] = true; player.manaFlower = true; //security wallet fargoPlayer.SecurityWallet = true; //carrot player.nightVision = true; //squeaky toy fargoPlayer.SqueakyAcc = true; //tribal charm player.buffImmune[BuffID.Webbed] = true; fargoPlayer.TribalCharm = true; //nymph's perfume player.buffImmune[BuffID.Lovestruck] = true; player.buffImmune[BuffID.Stinky] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.NymphPerfume)) { fargoPlayer.NymphsPerfume = true; if (fargoPlayer.NymphsPerfumeCD > 0) { fargoPlayer.NymphsPerfumeCD -= 10; } } //tim's concoction if (SoulConfig.Instance.GetValue(SoulConfig.Instance.TimsConcoction)) { player.GetModPlayer <FargoPlayer>().TimsConcoction = true; } //dubious circuitry player.buffImmune[BuffID.CursedInferno] = true; player.buffImmune[BuffID.Ichor] = true; fargoPlayer.FusedLens = true; fargoPlayer.GroundStick = true; player.noKnockback = true; //magical bulb player.buffImmune[BuffID.Venom] = true; //ice queen's crown player.buffImmune[BuffID.Frozen] = true; //lihzahrd treasure player.buffImmune[BuffID.Burning] = true; fargoPlayer.LihzahrdTreasureBox = true; //saucer control console player.buffImmune[BuffID.Electrified] = true; //betsy's heart player.buffImmune[BuffID.OgreSpit] = true; player.buffImmune[BuffID.WitheredWeapon] = true; player.buffImmune[BuffID.WitheredArmor] = true; fargoPlayer.BetsysHeart = true; //celestial rune/pumpking's cape fargoPlayer.CelestialRune = true; fargoPlayer.PumpkingsCape = true; fargoPlayer.AdditionalAttacks = true; if (fargoPlayer.AdditionalAttacksTimer > 0) { fargoPlayer.AdditionalAttacksTimer -= 2; } //chalice fargoPlayer.MoonChalice = true; //galactic globe player.buffImmune[BuffID.VortexDebuff] = true; //player.buffImmune[BuffID.ChaosState] = true; fargoPlayer.GravityGlobeEX = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.GravityControl)) { player.gravControl = true; } //heart of maso fargoPlayer.MasochistHeart = true; player.buffImmune[BuffID.MoonLeech] = true; //cyclonic fin /*fargoPlayer.CyclonicFin = true; * if (fargoPlayer.CyclonicFinCD > 0) * fargoPlayer.CyclonicFinCD -= 2;*/ /*if (player.mount.Active && player.mount.Type == MountID.CuteFishron) * { * if (player.ownedProjectileCounts[mod.ProjectileType("CuteFishronRitual")] < 1 && player.whoAmI == Main.myPlayer) * Projectile.NewProjectile(player.MountedCenter, Vector2.Zero, mod.ProjectileType("CuteFishronRitual"), 0, 0f, Main.myPlayer); * player.MountFishronSpecialCounter = 300; * player.meleeDamage += 0.15f; * player.rangedDamage += 0.15f; * player.magicDamage += 0.15f; * player.minionDamage += 0.15f; * player.thrownDamage += 0.15f; * player.meleeCrit += 30; * player.rangedCrit += 30; * player.magicCrit += 30; * player.thrownCrit += 30; * player.statDefense += 30; * player.lifeRegen += 3; * player.lifeRegenCount += 3; * player.lifeRegenTime += 3; * if (player.controlLeft == player.controlRight) * { * if (player.velocity.X != 0) * player.velocity.X -= player.mount.Acceleration * Math.Sign(player.velocity.X); * if (player.velocity.X != 0) * player.velocity.X -= player.mount.Acceleration * Math.Sign(player.velocity.X); * } * else if (player.controlLeft) * { * player.velocity.X -= player.mount.Acceleration * 4f; * if (player.velocity.X < -16f) * player.velocity.X = -16f; * if (!player.controlUseItem) * player.direction = -1; * } * else if (player.controlRight) * { * player.velocity.X += player.mount.Acceleration * 4f; * if (player.velocity.X > 16f) * player.velocity.X = 16f; * if (!player.controlUseItem) * player.direction = 1; * } * if (player.controlUp == player.controlDown) * { * if (player.velocity.Y != 0) * player.velocity.Y -= player.mount.Acceleration * Math.Sign(player.velocity.Y); * if (player.velocity.Y != 0) * player.velocity.Y -= player.mount.Acceleration * Math.Sign(player.velocity.Y); * } * else if (player.controlUp) * { * player.velocity.Y -= player.mount.Acceleration * 4f; * if (player.velocity.Y < -16f) * player.velocity.Y = -16f; * } * else if (player.controlDown) * { * player.velocity.Y += player.mount.Acceleration * 4f; * if (player.velocity.Y > 16f) * player.velocity.Y = 16f; * } * }*/ //sadism player.buffImmune[mod.BuffType("Antisocial")] = true; player.buffImmune[mod.BuffType("Atrophied")] = true; player.buffImmune[mod.BuffType("Berserked")] = true; player.buffImmune[mod.BuffType("Bloodthirsty")] = true; player.buffImmune[mod.BuffType("ClippedWings")] = true; player.buffImmune[mod.BuffType("Crippled")] = true; player.buffImmune[mod.BuffType("CurseoftheMoon")] = true; player.buffImmune[mod.BuffType("Defenseless")] = true; player.buffImmune[mod.BuffType("FlamesoftheUniverse")] = true; player.buffImmune[mod.BuffType("Flipped")] = true; player.buffImmune[mod.BuffType("FlippedHallow")] = true; player.buffImmune[mod.BuffType("Fused")] = true; player.buffImmune[mod.BuffType("Guilty")] = true; player.buffImmune[mod.BuffType("Hexed")] = true; player.buffImmune[mod.BuffType("Infested")] = true; player.buffImmune[mod.BuffType("IvyVenom")] = true; player.buffImmune[mod.BuffType("Jammed")] = true; player.buffImmune[mod.BuffType("Lethargic")] = true; player.buffImmune[mod.BuffType("LightningRod")] = true; player.buffImmune[mod.BuffType("LivingWasteland")] = true; player.buffImmune[mod.BuffType("Lovestruck")] = true; player.buffImmune[mod.BuffType("LowGround")] = true; player.buffImmune[mod.BuffType("MarkedforDeath")] = true; player.buffImmune[mod.BuffType("Midas")] = true; player.buffImmune[mod.BuffType("MutantNibble")] = true; player.buffImmune[mod.BuffType("NullificationCurse")] = true; player.buffImmune[mod.BuffType("Oiled")] = true; player.buffImmune[mod.BuffType("OceanicMaul")] = true; player.buffImmune[mod.BuffType("Purified")] = true; player.buffImmune[mod.BuffType("ReverseManaFlow")] = true; player.buffImmune[mod.BuffType("Rotting")] = true; player.buffImmune[mod.BuffType("Shadowflame")] = true; player.buffImmune[mod.BuffType("SqueakyToy")] = true; player.buffImmune[mod.BuffType("Swarming")] = true; player.buffImmune[mod.BuffType("Stunned")] = true; player.buffImmune[mod.BuffType("Unstable")] = true; }
private void Thorium(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //NATURE thoriumPlayer.orbital = true; thoriumPlayer.orbitalRotation3 = Utils.RotatedBy(thoriumPlayer.orbitalRotation3, -0.075000002980232239, default(Vector2)); //making divers code less of a meme :scuseme: if (player.statLife > player.statLifeMax * 0.75) { thoriumPlayer.berserkStage = 1; } else if (player.statLife > player.statLifeMax * 0.5) { modPlayer.AttackSpeed *= 1.05f; thoriumPlayer.berserkStage = 2; } else if (player.statLife > player.statLifeMax * 0.25) { modPlayer.AttackSpeed *= 1.1f; thoriumPlayer.berserkStage = 3; } else { modPlayer.AttackSpeed *= 1.15f; thoriumPlayer.berserkStage = 4; } //spring steps player.extraFall += 10; if (player.velocity.Y < 0f && allowJump) { allowJump = false; thoriumPlayer.jumps++; } if (player.velocity.Y > 0f || player.sliding || player.justJumped) { allowJump = true; } if (thoriumPlayer.jumps == 0) { player.jumpSpeedBoost += 5f; } if (thoriumPlayer.jumps == 1) { player.jumpSpeedBoost += 1f; } if (thoriumPlayer.jumps == 2) { player.jumpSpeedBoost += 1.75f; } if (thoriumPlayer.jumps >= 3) { float num = 16f; int num2 = 0; while (num2 < num) { Vector2 vector = Vector2.UnitX * 0f; vector += -Utils.RotatedBy(Vector2.UnitY, (num2 * (6.28318548f / num)), default(Vector2)) * new Vector2(5f, 20f); vector = Utils.RotatedBy(vector, Utils.ToRotation(player.velocity), default(Vector2)); int num3 = Dust.NewDust(player.Center, 0, 0, 127, 0f, 0f, 0, default(Color), 1f); Main.dust[num3].scale = 1.35f; Main.dust[num3].noGravity = true; Main.dust[num3].position = player.Center + vector; Dust dust = Main.dust[num3]; dust.position.Y = dust.position.Y + 12f; Main.dust[num3].velocity = player.velocity * 0f + Utils.SafeNormalize(vector, Vector2.UnitY) * 1f; int num4 = num2; num2 = num4 + 1; } Main.PlaySound(SoundID.Item74, player.position); thoriumPlayer.jumps = 0; } //slag stompers timer++; if (timer > 20) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0.1f * Main.rand.Next(-25, 25), 2f, thorium.ProjectileType("SlagPro"), 20, 1f, Main.myPlayer, 0f, 0f); timer = 0; } //WILL if (Soulcheck.GetValue("Proof of Avarice")) { //proof of avarice thoriumPlayer.avarice2 = true; } modPlayer.AddPet("Coin Bag Pet", hideVisual, thorium.BuffType("DrachmaBuff"), thorium.ProjectileType("DrachmaBag")); modPlayer.AddPet("Glitter Pet", hideVisual, thorium.BuffType("ShineDust"), thorium.ProjectileType("ShinyPet")); //COSMOS }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.AllDamageUp(.66f); modPlayer.AllCritUp(25); //use speed, velocity, debuffs, crit dmg, mana up, double knockback modPlayer.UniverseEffect = true; if (player.GetToggleValue("Universe")) { modPlayer.AttackSpeed += .5f; } player.maxMinions += 8; player.maxTurrets += 4; //accessorys if (player.GetToggleValue("YoyoBag")) { player.counterWeight = 556 + Main.rand.Next(6); player.yoyoGlove = true; player.yoyoString = true; } //celestial shell player.accMerman = true; player.wolfAcc = true; if (hideVisual) { player.hideMerman = true; player.hideWolf = true; } player.lifeRegen += 2; player.statDefense += 4; if (player.GetToggleValue("Sniper")) { player.scope = true; } player.manaFlower = true; player.manaMagnet = true; player.magicCuffs = true; if (ModLoader.GetMod("FargowiltasSoulsDLC") != null) { Mod fargoDLC = ModLoader.GetMod("FargowiltasSoulsDLC"); if (ModLoader.GetMod("ThoriumMod") != null) { fargoDLC.GetItem("GuardianAngelsSoul").UpdateAccessory(player, hideVisual); fargoDLC.GetItem("BardSoul").UpdateAccessory(player, hideVisual); } if (ModLoader.GetMod("CalamityMod") != null) { fargoDLC.GetItem("RogueSoul").UpdateAccessory(player, hideVisual); } if (ModLoader.GetMod("DBZMOD") != null) { fargoDLC.GetItem("KiSoul").UpdateAccessory(player, hideVisual); } } }
private void Thorium(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //phylactery if (!thoriumPlayer.lichPrevent) { player.AddBuff(thorium.BuffType("LichActive"), 60, true); } //crystal scorpion if (Soulcheck.GetValue("Crystal Scorpion")) { thoriumPlayer.crystalScorpion = true; } //yumas pendant if (Soulcheck.GetValue("Yuma's Pendant")) { thoriumPlayer.yuma = true; } //THROWING thoriumPlayer.throwGuide2 = true; //dead mans patch thoriumPlayer.deadEyeBool = true; //mermaid canteen thoriumPlayer.canteenEffect += 750; thoriumPlayer.canteenCadet = true; //HEALER thoriumPlayer.radiantBoost += 0.4f; thoriumPlayer.radiantSpeed -= 0.25f; thoriumPlayer.healingSpeed += 0.25f; thoriumPlayer.radiantCrit += 20; //support stash thoriumPlayer.supportSash = true; thoriumPlayer.quickBelt = true; //saving grace thoriumPlayer.crossHeal = true; thoriumPlayer.healBloom = true; //soul guard thoriumPlayer.graveGoods = true; for (int i = 0; i < 255; i++) { Player player2 = Main.player[i]; if (player2.active && player2 != player && Vector2.Distance(player2.Center, player.Center) < 400f) { player2.AddBuff(thorium.BuffType("AegisAura"), 30, false); } } //archdemon's curse thoriumPlayer.darkAura = true; //archangels heart thoriumPlayer.healBonus += 5; //medical bag thoriumPlayer.medicalAcc = true; //head mirror arrow if (Soulcheck.GetValue("Head Mirror")) { float num = 0f; int num2 = player.whoAmI; for (int i = 0; i < 255; i++) { if (Main.player[i].active && Main.player[i] != player && !Main.player[i].dead && (Main.player[i].statLifeMax2 - Main.player[i].statLife) > num) { num = (Main.player[i].statLifeMax2 - Main.player[i].statLife); num2 = i; } } if (player.ownedProjectileCounts[thorium.ProjectileType("HealerSymbol")] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, thorium.ProjectileType("HealerSymbol"), 0, 0f, player.whoAmI, 0f, 0f); } for (int j = 0; j < 1000; j++) { Projectile projectile = Main.projectile[j]; if (projectile.active && projectile.owner == player.whoAmI && projectile.type == thorium.ProjectileType("HealerSymbol")) { projectile.timeLeft = 2; projectile.ai[1] = num2; } } } //BARD thoriumPlayer.symphonicDamage += 0.3f; thoriumPlayer.symphonicSpeed += .2f; thoriumPlayer.symphonicCrit += 15; thoriumPlayer.bardResourceMax2 = 20; //the max allowed in thorium //epic mouthpiece thoriumPlayer.bardHomingBool = true; thoriumPlayer.bardHomingBonus = 5f; //straight mute thoriumPlayer.bardMute2 = true; //digital tuner thoriumPlayer.tuner2 = true; //guitar pick claw thoriumPlayer.bardBounceBonus = 5; //COLOSSUS //terrarium defender if (player.statLife < player.statLifeMax * 0.2f) { player.AddBuff(thorium.BuffType("TerrariumRegen"), 10, true); player.lifeRegen += 20; } if (player.statLife < player.statLifeMax * 0.25f) { player.AddBuff(thorium.BuffType("TerrariumDefense"), 10, true); player.statDefense += 20; } //blast shield thoriumPlayer.blastHurt = true; //cape of the survivor if (player.FindBuffIndex(thorium.BuffType("Corporeal")) < 0) { thoriumPlayer.spiritBand2 = true; } //sweet vengeance thoriumPlayer.sweetVengeance = true; //oceans retaliation thoriumPlayer.turtleShield2 = true; thoriumPlayer.SpinyShield = true; //TRAWLER MagmaBoundFishingLineMP magmaPlayer = player.GetModPlayer <MagmaBoundFishingLineMP>(); magmaPlayer.magmaLine = true; //SUPERSONIC //terrarium particle sprinters dust if (Collision.SolidCollision(player.position, player.width, player.height + 4) && Math.Abs(player.velocity.X) >= 2) { for (int i = 0; i < 1; i++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 57, 0f, 0f, 100, default(Color), 1.4f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust1 = Main.dust[dust]; dust1.velocity *= 0f; } for (int j = 0; j < 1; j++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 61, 0f, 0f, 100, default(Color), 1.35f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust2 = Main.dust[dust]; dust2.velocity *= 0f; } for (int k = 0; k < 1; k++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 229, 0f, 0f, 100, default(Color), 1.15f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust3 = Main.dust[dust]; dust3.velocity *= 0f; } for (int l = 0; l < 1; l++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 60, 0f, 0f, 100, default(Color), 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust4 = Main.dust[dust]; dust4.velocity *= 0f; } for (int m = 0; m < 1; m++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 127, 0f, 0f, 100, default(Color), 1.75f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust5 = Main.dust[dust]; dust5.velocity *= 0f; } for (int n = 0; n < 1; n++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 59, 0f, 0f, 100, default(Color), 1.4f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust6 = Main.dust[dust]; dust6.velocity *= 0f; } for (int num7 = 0; num7 < 1; num7++) { int dust = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 62, 0f, 0f, 100, default(Color), 1.35f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Dust dust7 = Main.dust[dust]; dust7.velocity *= 0f; } } //air walkers if (Soulcheck.GetValue("Air Walkers")) { if (player.controlDown) { jumped = true; } else { jumped = false; } if (!Collision.SolidCollision(player.position, player.width, player.height + 4)) { hoverTimer++; } else { hoverTimer = 0; } if (hoverTimer >= 1000) { canHover = false; } else { canHover = true; } if (canHover && !jumped && !Collision.SolidCollision(player.position, player.width, player.height + 4)) { player.maxFallSpeed = 0f; player.fallStart = (int)(player.position.Y / 16f); int dust1 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 229, 0f, 0f, 100, default(Color), 1.25f); Main.dust[dust1].noGravity = true; Main.dust[dust1].noLight = true; Dust dust = Main.dust[dust1]; dust.velocity *= 0f; } } //survivalist boots if (Math.Abs(player.velocity.X) > 2f) { player.lifeRegen += 2; player.lifeRegenTime++; player.manaRegenBonus += 2; player.manaRegenDelayBonus++; thoriumPlayer.bardResourceRecharge += 2; } //weighted winglets if (player.controlDown && !player.controlUp) { player.maxFallSpeed *= (player.wet ? 2.4f : 1.6f); } if (player.controlUp && !player.controlDown) { player.maxFallSpeed *= 0.4f; player.fallStart = (int)(player.position.Y / 16f); } //WORLD SHAPER //pets modPlayer.AddPet("Inspiring Lantern Pet", hideVisual, thorium.BuffType("SupportLanternBuff"), thorium.ProjectileType("SupportLantern")); modPlayer.AddPet("Lock Box Pet", hideVisual, thorium.BuffType("LockBoxBuff"), thorium.ProjectileType("LockBoxPet")); //THORIUM SOUL mod.GetItem("ThoriumSoul").UpdateAccessory(player, hideVisual); }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); //includes revive, both spectres, adamantite, and star heal modPlayer.TerrariaSoul = true; //WOOD modPlayer.WoodForce = true; //wood modPlayer.WoodEnchant = true; //boreal modPlayer.BorealEnchant = true; //mahogany modPlayer.MahoganyEnchant = true; //ebon modPlayer.EbonEffect(); //shade modPlayer.ShadeEnchant = true; //palm modPlayer.PalmEffect(); //pearl modPlayer.PearlEffect(); //TERRA modPlayer.TerraForce = true; //crit effect improved if (!Fargowiltas.Instance.ThoriumLoaded) { modPlayer.CopperEnchant = true; //lightning player.dash = 2; if (Soulcheck.GetValue("Iron Shield")) { modPlayer.IronEffect(); } if (Soulcheck.GetValue("Iron Magnet")) { modPlayer.IronEnchant = true; } } modPlayer.TinEffect(); //crits //tungsten modPlayer.TungstenEnchant = true; //obsidian player.fireWalk = true; player.lavaImmune = true; //EARTH modPlayer.CobaltEnchant = true; //shards modPlayer.PalladiumEffect(); //regen on hit, heals modPlayer.OrichalcumEffect(); //fireballs and petals modPlayer.AdamantiteEnchant = true; //split if (!Fargowiltas.Instance.ThoriumLoaded) { modPlayer.TitaniumEffect(); //shadow dodge, full hp resistance } //NATURE modPlayer.NatureForce = true; if (!Fargowiltas.Instance.ThoriumLoaded) { modPlayer.CrimsonEffect(hideVisual); //regen, pets } modPlayer.MoltenEffect(25); //inferno and explode modPlayer.FrostEffect(75, hideVisual); //icicles, pets modPlayer.JungleEffect(); //spores modPlayer.ChloroEffect(hideVisual, 100); //crystal and pet modPlayer.ShroomiteEffect(hideVisual); //pet //LIFE modPlayer.LifeForce = true; modPlayer.BeeEffect(hideVisual); //bees ignore defense, super bees, pet modPlayer.SpiderEffect(hideVisual); //pet modPlayer.BeetleEffect(); //defense beetle bois modPlayer.PumpkinEffect(50, hideVisual); //flame trail, pie heal, pet modPlayer.TurtleEffect(hideVisual); //thorns, pets player.thorns = 1f; player.turtleThorns = true; modPlayer.CactusEffect(); //needle spray //SPIRIT modPlayer.SpiritForce = true; //spectre works for all, spirit trapper works for all modPlayer.FossilEffect(40, hideVisual); //revive, bone zone, pet modPlayer.ForbiddenEffect(); //storm modPlayer.HallowEffect(hideVisual, 100); //sword, shield, pet modPlayer.TikiEffect(hideVisual); //pet modPlayer.SpectreEffect(hideVisual); //pet //SHADOW modPlayer.ShadowForce = true; modPlayer.DarkArtistEffect(hideVisual); //shoot from where you were meme, pet modPlayer.NecroEffect(hideVisual); //DG meme, pet modPlayer.ShadowEffect(hideVisual); //pets player.blackBelt = true; player.spikedBoots = 2; player.dash = 1; modPlayer.ShinobiEffect(hideVisual); //tele thru walls, pet modPlayer.NinjaEffect(hideVisual); //smoke bomb nonsense, pet modPlayer.SpookyEffect(hideVisual); //scythe doom, pets //WILL modPlayer.WillForce = true; //knockback remove for all modPlayer.GoldEffect(hideVisual); //midas, greedy ring, pet, zhonyas modPlayer.PlatinumEnchant = true; //loot multiply modPlayer.GladiatorEffect(hideVisual); //javelins, pet modPlayer.RedRidingEffect(hideVisual); //pet player.accMerman = true; player.wolfAcc = true; if (hideVisual) { player.hideMerman = true; player.hideWolf = true; } modPlayer.ValhallaEffect(hideVisual); //knockback remove player.shinyStone = true; //COSMOS modPlayer.CosmoForce = true; if (!Fargowiltas.Instance.ThoriumLoaded) { //meteor shower modPlayer.MeteorEffect(75); } modPlayer.SolarEffect(); //solar shields modPlayer.VortexEffect(hideVisual); //stealth, voids, pet modPlayer.NebulaEffect(); //boosters modPlayer.StardustEffect(); //guardian and time freeze modPlayer.AddPet("Suspicious Eye Pet", hideVisual, BuffID.SuspiciousTentacle, ProjectileID.SuspiciousTentacle); if (Fargowiltas.Instance.ThoriumLoaded) { if (Fargowiltas.Instance.CalamityLoaded) { mod.GetItem("CalamityForce").UpdateAccessory(player, hideVisual); } } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); //auto use, debuffs, mana up modPlayer.Eternity = true; //UNIVERSE modPlayer.UniverseEffect = true; modPlayer.AllDamageUp(2f); if (Soulcheck.GetValue("Universe Attack Speed")) { modPlayer.AttackSpeed *= 2; } player.maxMinions += 20; player.maxTurrets += 10; //accessorys player.counterWeight = 556 + Main.rand.Next(6); player.yoyoGlove = true; player.yoyoString = true; if (Soulcheck.GetValue("Universe Scope")) { player.scope = true; } player.manaFlower = true; player.manaMagnet = true; player.magicCuffs = true; //DIMENSIONS //COLOSSUS player.statLifeMax2 *= 5; player.endurance += 0.4f; player.lifeRegen += 15; //hand warmer, pocket mirror, ankh shield player.buffImmune[BuffID.Chilled] = true; player.buffImmune[BuffID.Frozen] = true; player.buffImmune[BuffID.Stoned] = true; player.buffImmune[BuffID.Weak] = true; player.buffImmune[BuffID.BrokenArmor] = true; player.buffImmune[BuffID.Bleeding] = true; player.buffImmune[BuffID.Poisoned] = true; player.buffImmune[BuffID.Slow] = true; player.buffImmune[BuffID.Confused] = true; player.buffImmune[BuffID.Silenced] = true; player.buffImmune[BuffID.Cursed] = true; player.buffImmune[BuffID.Darkness] = true; player.buffImmune[BuffID.ChaosState] = true; player.noKnockback = true; player.fireWalk = true; //brain of confusion player.brainOfConfusion = true; //charm of myths player.pStone = true; //bee cloak, sweet heart necklace, star veil if (Soulcheck.GetValue("Stars On Hit")) { player.starCloak = true; } if (Soulcheck.GetValue("Bees On Hit")) { player.bee = true; } player.panic = true; player.longInvince = true; //spore sac if (Soulcheck.GetValue("Spore Sac")) { player.SporeSac(); player.sporeSac = true; } //flesh knuckles player.aggro += 400; //frozen turtle shell if (player.statLife <= player.statLifeMax2 * 0.5) { player.AddBuff(BuffID.IceBarrier, 5, true); } //paladins shield if (player.statLife > player.statLifeMax2 * .25) { player.hasPaladinShield = true; for (int k = 0; k < 255; k++) { Player target = Main.player[k]; if (target.active && player != target && Vector2.Distance(target.Center, player.Center) < 400) { target.AddBuff(BuffID.PaladinsShield, 30); } } } //SUPERSONIC //frost spark plus super speed if (Soulcheck.GetValue("Supersonic Speed Boosts") && !player.GetModPlayer <FargoPlayer>().noSupersonic) { player.maxRunSpeed += 15f; player.runAcceleration += .25f; player.autoJump = true; player.jumpSpeedBoost += 2.4f; player.jumpBoost = true; player.maxFallSpeed += 5f; } /*else * { * player.maxRunSpeed += 5f; * player.runAcceleration += .1f; * }*/ player.moveSpeed += 0.5f; player.accRunSpeed = 12f; player.rocketBoots = 3; player.iceSkate = true; //arctic diving gear player.arcticDivingGear = true; player.accFlipper = true; player.accDivingHelm = true; //lava waders player.waterWalk = true; player.fireWalk = true; player.lavaImmune = true; //magic carpet player.carpet = true; //frog legs player.autoJump = true; player.jumpSpeedBoost += 2.4f; player.jumpBoost = true; //bundle if (player.wingTime == 0) { player.doubleJumpCloud = true; player.doubleJumpSandstorm = true; player.doubleJumpBlizzard = true; player.doubleJumpFart = true; } //FLIGHT MASTERY player.wingTimeMax = 999999; player.ignoreWater = true; player.wingTime = player.wingTimeMax; //TRAWLER //extra lures modPlayer.FishSoul2 = true; //modPlayer.AddPet("Zephyr Fish Pet", hideVisual, BuffID.ZephyrFish, ProjectileID.ZephyrFish); player.sonarPotion = true; player.fishingSkill += 100; player.cratePotion = true; player.accFishingLine = true; player.accTackleBox = true; player.accFishFinder = true; //WORLD SHAPER //placing speed up player.tileSpeed += 0.5f; player.wallSpeed += 0.5f; //toolbox Player.tileRangeX += 50; Player.tileRangeY += 50; //gizmo pack player.autoPaint = true; //pick speed player.pickSpeed -= 0.90f; //mining helmet if (Soulcheck.GetValue("Shine Buff")) { Lighting.AddLight(player.Center, 0.8f, 0.8f, 0f); } //presserator player.autoActuator = true; //builder mode if (Soulcheck.GetValue("Builder Mode")) { modPlayer.BuilderMode = true; } //cell phone player.accWatch = 3; player.accDepthMeter = 1; player.accCompass = 1; player.accFishFinder = true; player.accDreamCatcher = true; player.accOreFinder = true; player.accStopwatch = true; player.accCritterGuide = true; player.accJarOfSouls = true; player.accThirdEye = true; player.accCalendar = true; player.accWeatherRadio = true; //TERRARIA mod.GetItem("TerrariaSoul").UpdateAccessory(player, hideVisual); //M*******T mod.GetItem("MasochistSoul").UpdateAccessory(player, hideVisual); if (Fargowiltas.Instance.ThoriumLoaded) { Thorium(player, hideVisual); } if (Fargowiltas.Instance.CalamityLoaded) { Calamity(player, hideVisual); } if (Fargowiltas.Instance.DBTLoaded) { DBT(player); } }
private void Thorium(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(); //COLOSSUS //terrarium defender if (player.statLife < player.statLifeMax * 0.2f) { player.AddBuff(thorium.BuffType("TerrariumRegen"), 10, true); player.lifeRegen += 20; } if (player.statLife < player.statLifeMax * 0.25f) { player.AddBuff(thorium.BuffType("TerrariumDefense"), 10, true); player.statDefense += 20; } //blast shield thoriumPlayer.blastHurt = true; //cape of the survivor if (player.FindBuffIndex(thorium.BuffType("Corporeal")) < 0) { thoriumPlayer.spiritBand2 = true; } //sweet vengeance thoriumPlayer.sweetVengeance = true; //oceans retaliation thoriumPlayer.turtleShield2 = true; thoriumPlayer.SpinyShield = true; //TRAWLER MagmaBoundFishingLineMP magmaPlayer = player.GetModPlayer <MagmaBoundFishingLineMP>(); magmaPlayer.magmaLine = true; //SUPERSONIC //terrarium particle sprinters dust if (Collision.SolidCollision(player.position, player.width, player.height + 4) && Math.Abs(player.velocity.X) >= 2) { for (int i = 0; i < 1; i++) { int num = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 57, 0f, 0f, 100, default(Color), 1.4f); Main.dust[num].noGravity = true; Main.dust[num].noLight = true; Dust dust = Main.dust[num]; dust.velocity *= 0f; } for (int j = 0; j < 1; j++) { int num2 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 61, 0f, 0f, 100, default(Color), 1.35f); Main.dust[num2].noGravity = true; Main.dust[num2].noLight = true; Dust dust2 = Main.dust[num2]; dust2.velocity *= 0f; } for (int k = 0; k < 1; k++) { int num3 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 229, 0f, 0f, 100, default(Color), 1.15f); Main.dust[num3].noGravity = true; Main.dust[num3].noLight = true; Dust dust3 = Main.dust[num3]; dust3.velocity *= 0f; } for (int l = 0; l < 1; l++) { int num4 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 60, 0f, 0f, 100, default(Color), 1.5f); Main.dust[num4].noGravity = true; Main.dust[num4].noLight = true; Dust dust4 = Main.dust[num4]; dust4.velocity *= 0f; } for (int m = 0; m < 1; m++) { int num5 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 127, 0f, 0f, 100, default(Color), 1.75f); Main.dust[num5].noGravity = true; Main.dust[num5].noLight = true; Dust dust5 = Main.dust[num5]; dust5.velocity *= 0f; } for (int n = 0; n < 1; n++) { int num6 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 59, 0f, 0f, 100, default(Color), 1.4f); Main.dust[num6].noGravity = true; Main.dust[num6].noLight = true; Dust dust6 = Main.dust[num6]; dust6.velocity *= 0f; } for (int num7 = 0; num7 < 1; num7++) { int num8 = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 62, 0f, 0f, 100, default(Color), 1.35f); Main.dust[num8].noGravity = true; Main.dust[num8].noLight = true; Dust dust7 = Main.dust[num8]; dust7.velocity *= 0f; } } //air walkers if (Soulcheck.GetValue("Air Walkers")) { if (player.controlDown) { jumped = true; } else { jumped = false; } if (!Collision.SolidCollision(player.position, player.width, player.height + 4)) { hoverTimer++; } else { hoverTimer = 0; } if (hoverTimer >= 500) { canHover = false; } else { canHover = true; } if (canHover && !jumped && !Collision.SolidCollision(player.position, player.width, player.height + 4)) { player.maxFallSpeed = 0f; player.fallStart = (int)(player.position.Y / 16f); int num = Dust.NewDust(new Vector2(player.position.X - 2f, player.position.Y + (float)player.height - 2f), player.width + 4, 4, 229, 0f, 0f, 100, default(Color), 1.25f); Main.dust[num].noGravity = true; Main.dust[num].noLight = true; Dust dust = Main.dust[num]; dust.velocity *= 0f; } } //survivalist boots if (Math.Abs(player.velocity.X) > 2f) { player.lifeRegen += 2; player.lifeRegenTime++; player.manaRegenBonus += 2; player.manaRegenDelayBonus++; thoriumPlayer.bardResourceRecharge += 2; } //weighted winglets if (player.controlDown && !player.controlUp) { player.maxFallSpeed *= (player.wet ? 2.4f : 1.6f); } if (player.controlUp && !player.controlDown) { player.maxFallSpeed *= 0.4f; player.fallStart = (int)(player.position.Y / 16f); } //WORLD SHAPER //pets modPlayer.AddPet("Inspiring Lantern Pet", hideVisual, thorium.BuffType("SupportLanternBuff"), thorium.ProjectileType("SupportLantern")); modPlayer.AddPet("Lock Box Pet", hideVisual, thorium.BuffType("LockBoxBuff"), thorium.ProjectileType("LockBoxPet")); }
public override void UpdateArmorSet(Player player) { player.setBonus = @"The blessing of Eridanus empowers your attacks The empowered class changes every 10 seconds Eridanus fights alongside you when you use the empowered class 75% increased damage, 30% increased attack speed, and 20% increased critical strike chance for the empowered class"; FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); fargoPlayer.EridanusEmpower = true; if (fargoPlayer.EridanusTimer % (60 * 10) == 1) //make dust whenever changing classes { Main.PlaySound(SoundID.Item4, player.Center); int type; switch (fargoPlayer.EridanusTimer / (60 * 10)) { case 0: type = 127; break; //solar case 1: type = 229; break; //vortex case 2: type = 242; break; //nebula default: type = 135; break; //stardust } const int max = 100; //make some indicator dusts for (int i = 0; i < max; i++) { Vector2 vector6 = Vector2.UnitY * 20f; vector6 = vector6.RotatedBy((i - (max / 2 - 1)) * 6.28318548f / max) + player.Center; Vector2 vector7 = vector6 - player.Center; int d = Dust.NewDust(vector6 + vector7, 0, 0, type, 0f, 0f, 0, default(Color), 3f); Main.dust[d].noGravity = true; Main.dust[d].velocity = vector7; } for (int i = 0; i < 50; i++) //make some indicator dusts { int d = Dust.NewDust(player.position, player.width, player.height, type, 0f, 0f, 0, default(Color), 2.5f); Main.dust[d].noGravity = true; Main.dust[d].noLight = true; Main.dust[d].velocity *= 24f; } if (Main.myPlayer == player.whoAmI) { for (int i = 0; i < Main.maxProjectiles; i++) //clear minions { if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type != ModContent.ProjectileType <Projectiles.Minions.EridanusMinion>() && Main.projectile[i].minionSlots > 0) { Main.projectile[i].Kill(); } } } } if (++fargoPlayer.EridanusTimer > 60 * 10 * 4) //handle loop { fargoPlayer.EridanusTimer = 0; } switch (fargoPlayer.EridanusTimer / (60 * 10)) //damage boost according to current class { case 0: player.meleeDamage += 0.75f; player.meleeCrit += 20; if (player.HeldItem.melee) { fargoPlayer.AttackSpeed += .3f; } break; case 1: player.rangedDamage += 0.75f; player.rangedCrit += 20; if (player.HeldItem.ranged) { fargoPlayer.AttackSpeed += .3f; } break; case 2: player.magicDamage += 0.75f; player.magicCrit += 20; if (player.HeldItem.magic) { fargoPlayer.AttackSpeed += .3f; } break; default: player.minionDamage += 0.75f; fargoPlayer.SpiderEnchant = true; if (player.HeldItem.summon) { fargoPlayer.AttackSpeed += .3f; } break; } if (player.whoAmI == Main.myPlayer) { if (player.ownedProjectileCounts[ModContent.ProjectileType <Projectiles.Minions.EridanusMinion>()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType <Projectiles.Minions.EridanusMinion>(), 300, 12f, player.whoAmI, -1); } if (player.ownedProjectileCounts[ModContent.ProjectileType <Projectiles.Minions.EridanusRitual>()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType <Projectiles.Minions.EridanusRitual>(), 0, 0f, player.whoAmI); } } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.GoldEffect(hideVisual); }
private void Thorium(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //subwoofer thoriumPlayer.bardRangeBoost += 450; for (int i = 0; i < 255; i++) { Player player2 = Main.player[i]; if (player2.active && !player2.dead && Vector2.Distance(player2.Center, player.Center) < 450f) { thoriumPlayer.empowerPoison = true; thoriumPlayer.empowerFrost = true; } } //bulb modPlayer.BulbEnchant = true; //night shade petal thoriumPlayer.nightshadeBoost = true; thoriumPlayer.orbital = true; thoriumPlayer.orbitalRotation3 = Utils.RotatedBy(thoriumPlayer.orbitalRotation3, -0.075000002980232239, default(Vector2)); //making divers code less of a meme :scuseme: if (player.statLife > player.statLifeMax * 0.75) { thoriumPlayer.berserkStage = 1; } else if (player.statLife > player.statLifeMax * 0.5) { modPlayer.AttackSpeed *= 1.05f; thoriumPlayer.berserkStage = 2; } else if (player.statLife > player.statLifeMax * 0.25) { modPlayer.AttackSpeed *= 1.1f; thoriumPlayer.berserkStage = 3; } else { modPlayer.AttackSpeed *= 1.15f; thoriumPlayer.berserkStage = 4; } //magma thoriumPlayer.magmaSet = true; //spring steps player.extraFall += 10; if (player.velocity.Y < 0f && allowJump) { allowJump = false; thoriumPlayer.jumps++; } if (player.velocity.Y > 0f || player.sliding || player.justJumped) { allowJump = true; } if (thoriumPlayer.jumps == 0) { player.jumpSpeedBoost += 5f; } if (thoriumPlayer.jumps == 1) { player.jumpSpeedBoost += 1f; } if (thoriumPlayer.jumps == 2) { player.jumpSpeedBoost += 1.75f; } if (thoriumPlayer.jumps >= 3) { float num = 16f; int num2 = 0; while (num2 < num) { Vector2 vector = Vector2.UnitX * 0f; vector += -Utils.RotatedBy(Vector2.UnitY, (num2 * (6.28318548f / num)), default(Vector2)) * new Vector2(5f, 20f); vector = Utils.RotatedBy(vector, Utils.ToRotation(player.velocity), default(Vector2)); int num3 = Dust.NewDust(player.Center, 0, 0, 127, 0f, 0f, 0, default(Color), 1f); Main.dust[num3].scale = 1.35f; Main.dust[num3].noGravity = true; Main.dust[num3].position = player.Center + vector; Dust dust = Main.dust[num3]; dust.position.Y = dust.position.Y + 12f; Main.dust[num3].velocity = player.velocity * 0f + Utils.SafeNormalize(vector, Vector2.UnitY) * 1f; int num4 = num2; num2 = num4 + 1; } Main.PlaySound(SoundID.Item74, player.position); thoriumPlayer.jumps = 0; } if (Soulcheck.GetValue("Slag Stompers")) { //slag stompers timer++; if (timer > 20) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0.1f * Main.rand.Next(-25, 25), 2f, thorium.ProjectileType("SlagPro"), 20, 1f, Main.myPlayer, 0f, 0f); timer = 0; } } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); //mining speed, spelunker, dangersense, light, hunter, pet modPlayer.MinerEffect(hideVisual, .66f); //placing speed up player.tileSpeed += 0.5f; player.wallSpeed += 0.5f; //toolbox Player.tileRangeX += 50; Player.tileRangeY += 50; //gizmo pack player.autoPaint = true; //presserator player.autoActuator = true; //royal gel player.npcTypeNoAggro[1] = true; player.npcTypeNoAggro[16] = true; player.npcTypeNoAggro[59] = true; player.npcTypeNoAggro[71] = true; player.npcTypeNoAggro[81] = true; player.npcTypeNoAggro[138] = true; player.npcTypeNoAggro[121] = true; player.npcTypeNoAggro[122] = true; player.npcTypeNoAggro[141] = true; player.npcTypeNoAggro[147] = true; player.npcTypeNoAggro[183] = true; player.npcTypeNoAggro[184] = true; player.npcTypeNoAggro[204] = true; player.npcTypeNoAggro[225] = true; player.npcTypeNoAggro[244] = true; player.npcTypeNoAggro[302] = true; player.npcTypeNoAggro[333] = true; player.npcTypeNoAggro[335] = true; player.npcTypeNoAggro[334] = true; player.npcTypeNoAggro[336] = true; player.npcTypeNoAggro[537] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.BuilderMode)) { modPlayer.BuilderMode = true; } //cell phone player.accWatch = 3; player.accDepthMeter = 1; player.accCompass = 1; player.accFishFinder = true; player.accDreamCatcher = true; player.accOreFinder = true; player.accStopwatch = true; player.accCritterGuide = true; player.accJarOfSouls = true; player.accThirdEye = true; player.accCalendar = true; player.accWeatherRadio = true; if (!Fargowiltas.Instance.ThoriumLoaded) { return; } //pets modPlayer.AddPet(SoulConfig.Instance.thoriumToggles.BoxPet, hideVisual, thorium.BuffType("LockBoxBuff"), thorium.ProjectileType("LockBoxPet")); }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.PlatinumEnchant = true; }
public override void UpdateAccessory(Player player, bool hideVisual) { if (!Fargowiltas.Instance.ThoriumLoaded) { return; } FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(); //spirit trapper modPlayer.SpiritTrapperEnchant = true; thoriumPlayer.spiritTrapper = true; //inner flame thoriumPlayer.spiritFlame = true; if (SoulConfig.Instance.GetValue("Dread Speed")) { //dread player.moveSpeed += 0.8f; player.maxRunSpeed += 10f; player.runAcceleration += 0.05f; if (player.velocity.X > 0f || player.velocity.X < 0f) { modPlayer.AllDamageUp(.25f); modPlayer.AllCritUp(20); for (int i = 0; i < 2; i++) { int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y) - player.velocity * 0.5f, player.width, player.height, 65, 0f, 0f, 0, default(Color), 1.75f); int num2 = Dust.NewDust(new Vector2(player.position.X, player.position.Y) - player.velocity * 0.5f, player.width, player.height, 75, 0f, 0f, 0, default(Color), 1f); Main.dust[num].noGravity = true; Main.dust[num2].noGravity = true; Main.dust[num].noLight = true; Main.dust[num2].noLight = true; } } } //crash boots thorium.GetItem("CrashBoots").UpdateAccessory(player, hideVisual); player.moveSpeed -= 0.15f; player.maxRunSpeed -= 1f; if (SoulConfig.Instance.GetValue("Dragon Flames")) { //dragon thoriumPlayer.dragonSet = true; } //wyvern pet modPlayer.AddPet("Wyvern Pet", hideVisual, thorium.BuffType("WyvernPetBuff"), thorium.ProjectileType("WyvernPet")); modPlayer.DragonEnchant = true; //demon blood effect modPlayer.DemonBloodEnchant = true; //demon blood badge thoriumPlayer.CrimsonBadge = true; if (SoulConfig.Instance.GetValue("Flesh Drops")) { //flesh set bonus thoriumPlayer.Symbiotic = true; } if (SoulConfig.Instance.GetValue("Vampire Gland")) { //vampire gland thoriumPlayer.vampireGland = true; } //blister pet modPlayer.AddPet("Blister Pet", hideVisual, thorium.BuffType("BlisterBuff"), thorium.ProjectileType("BlisterPet")); modPlayer.FleshEnchant = true; //pet modPlayer.AddPet("Moogle Pet", hideVisual, thorium.BuffType("LilMogBuff"), thorium.ProjectileType("LilMog")); modPlayer.KnightEnchant = true; //lich gaze thoriumPlayer.lichGaze = true; modPlayer.PlagueAcc = true; if (modPlayer.ThoriumSoul) { return; } /*//woofers * thoriumPlayer.bardRangeBoost += 450; * for (int i = 0; i < 255; i++) * { * Player player2 = Main.player[i]; * if (player2.active && !player2.dead && Vector2.Distance(player2.Center, player.Center) < 450f) * { * thoriumPlayer.empowerCursed = true; * thoriumPlayer.empowerIchor = true; * } * }*/ //dragon tooth necklace player.armorPenetration += 15; if (SoulConfig.Instance.GetValue("Harbinger Overcharge")) { //harbinger if (player.statLife > (int)(player.statLifeMax2 * 0.75)) { thoriumPlayer.overCharge = true; modPlayer.AllDamageUp(.5f); } } //shade band thoriumPlayer.shadeBand = true; //lich set bonus modPlayer.LichEnchant = true; //plague doctor thoriumPlayer.plagueSet = true; }
public override void Update(Player player, ref int buffIndex) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); player.endurance = .9f; modPlayer.ShellHide = true; float distance = 3f * 16; if (player.ownedProjectileCounts[ModContent.ProjectileType <TurtleShield>()] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType <TurtleShield>(), 0, 0, player.whoAmI); } Main.projectile.Where(x => x.active && x.hostile && x.damage > 0).ToList().ForEach(x => { if (Vector2.Distance(x.Center, player.Center) <= distance && !x.GetGlobalProjectile <FargoGlobalProjectile>().ImmuneToGuttedHeart&& !x.GetGlobalProjectile <FargoGlobalProjectile>().ImmuneToMutantBomb) { int dustId = Dust.NewDust(new Vector2(x.position.X, x.position.Y + 2f), x.width, x.height + 5, DustID.GoldFlame, x.velocity.X * 0.2f, x.velocity.Y * 0.2f, 100, default(Color), 2f); Main.dust[dustId].noGravity = true; int dustId3 = Dust.NewDust(new Vector2(x.position.X, x.position.Y + 2f), x.width, x.height + 5, DustID.GoldFlame, x.velocity.X * 0.2f, x.velocity.Y * 0.2f, 100, default(Color), 2f); Main.dust[dustId3].noGravity = true; // Turn around x.velocity *= -1f; // Flip sprite if (x.Center.X > player.Center.X) { x.direction = 1; x.spriteDirection = 1; } else { x.direction = -1; x.spriteDirection = -1; } modPlayer.TurtleShellHP--; if (modPlayer.TurtleShellHP == 0) { player.AddBuff(ModContent.BuffType <BrokenShell>(), 3600); modPlayer.TurtleShellHP = 10; //some funny dust const int max = 30; for (int i = 0; i < max; i++) { Vector2 vector6 = Vector2.UnitY * 5f; vector6 = vector6.RotatedBy((i - (max / 2 - 1)) * 6.28318548f / max) + Main.LocalPlayer.Center; Vector2 vector7 = vector6 - Main.LocalPlayer.Center; int d = Dust.NewDust(vector6 + vector7, 0, 0, DustID.GreenBlood, 0f, 0f, 0, default(Color), 2f); Main.dust[d].noGravity = true; Main.dust[d].velocity = vector7; } } } }); }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.FlightMasterySoul(); }
public override void UpdateAccessory(Player player, bool hideVisual) { if (!Fargowiltas.Instance.ThoriumLoaded) { return; } FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); ThoriumPlayer thoriumPlayer = player.GetModPlayer <ThoriumPlayer>(thorium); //warlock wisps, mix tape modPlayer.ThoriumSoul = true; //MUSPELHEIM //life bloom heals modPlayer.MuspelheimForce = true; //chrysalis thoriumPlayer.cocoonAcc = true; //living wood set bonus thoriumPlayer.livingWood = true; //free boi modPlayer.LivingWoodEnchant = true; modPlayer.AddMinion("Sapling Minion", thorium.ProjectileType("MinionSapling"), 25, 2f); //vine rope thing player.cordage = true; //JOTUNHEIM //tide hunter foam, yew crits, cryo duplicate modPlayer.JotunheimForce = true; modPlayer.DepthEnchant = true; modPlayer.AddPet("Jellyfish Pet", hideVisual, thorium.BuffType("JellyPet"), thorium.ProjectileType("JellyfishPet")); //tide hunter //angler bowl if (!hideVisual) { if (player.direction > 0 && Main.rand.Next(2) == 0) { Projectile.NewProjectile(player.Center.X + 56f, player.Center.Y - 10f, 0f, 0f, thorium.ProjectileType("AnglerLight"), 0, 0f, Main.myPlayer, 0f, 0f); } if (player.direction < 0 && Main.rand.Next(2) == 0) { Projectile.NewProjectile(player.Center.X - 56f, player.Center.Y - 10f, 0f, 0f, thorium.ProjectileType("AnglerLight"), 0, 0f, Main.myPlayer, 0f, 0f); } } //strider hide thoriumPlayer.frostBonusDamage = true; //pets modPlayer.IcyEnchant = true; modPlayer.AddPet("Penguin Pet", hideVisual, BuffID.BabyPenguin, ProjectileID.Penguin); modPlayer.AddPet("Owl Pet", hideVisual, thorium.BuffType("SnowyOwlBuff"), thorium.ProjectileType("SnowyOwlPet")); if (Soulcheck.GetValue("Icy Barrier")) { //icy set bonus thoriumPlayer.icySet = true; if (player.ownedProjectileCounts[thorium.ProjectileType("IcyAura")] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, thorium.ProjectileType("IcyAura"), 0, 0f, player.whoAmI, 0f, 0f); } } if (Soulcheck.GetValue("Whispering Tentacles")) { //whispering thoriumPlayer.whisperingSet = true; if (player.ownedProjectileCounts[thorium.ProjectileType("WhisperingTentacle")] + player.ownedProjectileCounts[thorium.ProjectileType("WhisperingTentacle2")] < 6 && player.ownedProjectileCounts[thorium.ProjectileType("WhisperingTentacleSpawn")] < 1) { whisperingTimer++; if (whisperingTimer > 30) { Projectile.NewProjectile(player.Center.X + (float)Main.rand.Next(-300, 300), player.Center.Y, 0f, 0f, thorium.ProjectileType("WhisperingTentacleSpawn"), 50, 0f, player.whoAmI, 0f, 0f); whisperingTimer = 0; } } } //ALFHEIM //lil cherub modPlayer.SacredEnchant = true; modPlayer.AddMinion("Li'l Cherub Minion", thorium.ProjectileType("Angel"), 0, 0f); //twinkle pet modPlayer.AddPet("Life Spirit Pet", hideVisual, thorium.BuffType("LifeSpiritBuff"), thorium.ProjectileType("LifeSpirit")); //lil devil modPlayer.WarlockEnchant = true; modPlayer.AddMinion("Li'l Devil Minion", thorium.ProjectileType("Devil"), 20, 2f); //biotech mod.GetItem("BiotechEnchant").UpdateAccessory(player, hideVisual); //warlock thoriumPlayer.warlockSet = true; //goat pet modPlayer.BinderEnchant = true; modPlayer.AddPet("Holy Goat Pet", hideVisual, thorium.BuffType("HolyGoatBuff"), thorium.ProjectileType("HolyGoat")); thoriumPlayer.goatPet = true; //NIFLHEIM //conductor thoriumPlayer.conductorSet = true; //SVARTALFHEIM //includes bronze lightning modPlayer.SvartalfheimForce = true; if (Soulcheck.GetValue("Eye of the Storm")) { //eye of the storm thorium.GetItem("EyeoftheStorm").UpdateAccessory(player, hideVisual); } //rebuttal thoriumPlayer.championShield = true; if (Soulcheck.GetValue("Incandescent Spark")) { thorium.GetItem("IncandescentSpark").UpdateAccessory(player, hideVisual); } if (Soulcheck.GetValue("Greedy Magnet")) { //greedy magnet for (int i = 0; i < 400; i++) { if (Main.item[i].active && Main.item[i].noGrabDelay == 0 && Vector2.Distance(player.Center, Main.item[i].position) < 700f) { Main.item[i].beingGrabbed = true; float num = 10f; Vector2 vector = new Vector2(Main.item[i].position.X + (Main.item[i].width / 2), Main.item[i].position.Y + (Main.item[i].height / 2)); float num2 = player.Center.X - vector.X; float num3 = player.Center.Y - vector.Y; float num4 = (float)Math.Sqrt((num2 * num2 + num3 * num3)); num4 = num / num4; num2 *= num4; num3 *= num4; int num5 = 5; Main.item[i].velocity.X = (Main.item[i].velocity.X * (num5 - 1) + num2) / num5; Main.item[i].velocity.Y = (Main.item[i].velocity.Y * (num5 - 1) + num3) / num5; } } } //EoC Shield player.dash = 2; if (Soulcheck.GetValue("Iron Shield")) { //iron shield raise modPlayer.IronEffect(); } //abyssal shell thoriumPlayer.AbyssalShell = true; if (Soulcheck.GetValue("Conduit Shield")) { //conduit set bonus thoriumPlayer.conduitSet = true; thoriumPlayer.orbital = true; thoriumPlayer.orbitalRotation1 = Utils.RotatedBy(thoriumPlayer.orbitalRotation1, -0.10000000149011612, default(Vector2)); Lighting.AddLight(player.position, 0.2f, 0.35f, 0.7f); if ((player.velocity.X > 0f || player.velocity.X < 0f) && thoriumPlayer.circuitStage < 6) { thoriumPlayer.circuitCharge++; for (int i = 0; i < 1; i++) { int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y) - player.velocity * 0.5f, player.width, player.height, 185, 0f, 0f, 100, default(Color), 1f); Main.dust[num].noGravity = true; } } } //meteor effect modPlayer.MeteorEffect(60); //pets //modPlayer.AddPet("Omega Pet", hideVisual, thorium.BuffType("OmegaBuff"), thorium.ProjectileType("Omega")); modPlayer.AddPet("I.F.O. Pet", hideVisual, thorium.BuffType("Identified"), thorium.ProjectileType("IFO")); modPlayer.AddPet("Bio-Feeder Pet", hideVisual, thorium.BuffType("BioFeederBuff"), thorium.ProjectileType("BioFeederPet")); //MIDGARD //includes illumite rocket and jester bell modPlayer.MidgardForce = true; if (Soulcheck.GetValue("Lodestone Resistance")) { //lodestone thoriumPlayer.orbital = true; thoriumPlayer.orbitalRotation3 = Utils.RotatedBy(thoriumPlayer.orbitalRotation3, -0.05000000074505806, default(Vector2)); if (player.statLife > player.statLifeMax * 0.75) { thoriumPlayer.thoriumEndurance += 0.1f; thoriumPlayer.lodestoneStage = 1; } if (player.statLife <= player.statLifeMax * 0.75 && player.statLife > player.statLifeMax * 0.5) { thoriumPlayer.thoriumEndurance += 0.2f; thoriumPlayer.lodestoneStage = 2; } if (player.statLife <= player.statLifeMax * 0.5) { thoriumPlayer.thoriumEndurance += 0.3f; thoriumPlayer.lodestoneStage = 3; } } if (Soulcheck.GetValue("Eye of the Beholder")) { //eye of beholder thorium.GetItem("EyeofBeholder").UpdateAccessory(player, hideVisual); } //slime pet modPlayer.AddPet("Pink Slime Pet", hideVisual, thorium.BuffType("PinkSlimeBuff"), thorium.ProjectileType("PinkSlime")); modPlayer.IllumiteEnchant = true; if (Soulcheck.GetValue("Terrarium Spirits")) { //terrarium set bonus terrariumTimer++; if (terrariumTimer > 60) { Projectile.NewProjectile(player.Center.X + 14f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraRed"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X + 9f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraOrange"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X + 4f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraYellow"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraGreen"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 4f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraBlue"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 9f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraIndigo"), 50, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X - 14f, player.Center.Y - 20f, 0f, 2f, thorium.ProjectileType("TerraPurple"), 50, 0f, Main.myPlayer, 0f, 0f); terrariumTimer = 0; } } if (Soulcheck.GetValue("Crietz")) { //crietz thoriumPlayer.crietzAcc = true; } //VANAHEIM //includes malignant debuff, folv bolts, white dwarf flares modPlayer.VanaheimForce = true; if (Soulcheck.GetValue("Folv's Aura")) { //folv thoriumPlayer.folvSet = true; thoriumPlayer.folvBonus2 = true; } if (Soulcheck.GetValue("Mana-Charged Rocketeers")) { //mana charge rockets thorium.GetItem("ManaChargedRocketeers").UpdateAccessory(player, hideVisual); } //HELHEIM //plague lord flask effect modPlayer.HelheimForce = true; if (Soulcheck.GetValue("Dread Speed")) { //dread player.moveSpeed += 0.8f; player.maxRunSpeed += 10f; player.runAcceleration += 0.05f; if (player.velocity.X > 0f || player.velocity.X < 0f) { for (int i = 0; i < 2; i++) { int num = Dust.NewDust(new Vector2(player.position.X, player.position.Y) - player.velocity * 0.5f, player.width, player.height, 65, 0f, 0f, 0, default(Color), 1.75f); int num2 = Dust.NewDust(new Vector2(player.position.X, player.position.Y) - player.velocity * 0.5f, player.width, player.height, 75, 0f, 0f, 0, default(Color), 1f); Main.dust[num].noGravity = true; Main.dust[num2].noGravity = true; Main.dust[num].noLight = true; Main.dust[num2].noLight = true; } } } //crash boots thorium.GetItem("CrashBoots").UpdateAccessory(player, hideVisual); player.moveSpeed -= 0.15f; player.maxRunSpeed -= 1f; if (Soulcheck.GetValue("Dragon Flames")) { //dragon thoriumPlayer.dragonSet = true; } //wyvern pet modPlayer.AddPet("Wyvern Pet", hideVisual, thorium.BuffType("WyvernPetBuff"), thorium.ProjectileType("WyvernPet")); //demon blood badge thoriumPlayer.CrimsonBadge = true; if (Soulcheck.GetValue("Flesh Drops")) { //flesh set bonus thoriumPlayer.Symbiotic = true; } if (Soulcheck.GetValue("Vampire Gland")) { //vampire gland thoriumPlayer.vampireGland = true; } //blister pet modPlayer.AddPet("Blister Pet", hideVisual, thorium.BuffType("BlisterBuff"), thorium.ProjectileType("BlisterPet")); //pet modPlayer.AddPet("Moogle Pet", hideVisual, thorium.BuffType("LilMogBuff"), thorium.ProjectileType("LilMog")); modPlayer.KnightEnchant = true; //lich gaze thoriumPlayer.lichGaze = true; //ASGARD //includes tide turner daggers, assassin duplicate and insta kill, pyro burst modPlayer.AsgardForce = true; //tide turner if (Soulcheck.GetValue("Tide Turner Globules")) { //floating globs and defense thoriumPlayer.tideHelmet = true; if (thoriumPlayer.tideOrb < 8) { tideTimer++; if (tideTimer > 30) { float num = 30f; int num2 = 0; while (num2 < num) { Vector2 vector = Vector2.UnitX * 0f; vector += -Utils.RotatedBy(Vector2.UnitY, (num2 * (6.28318548f / num)), default(Vector2)) * new Vector2(25f, 25f); vector = Utils.RotatedBy(vector, Utils.ToRotation(player.velocity), default(Vector2)); int num3 = Dust.NewDust(player.Center, 0, 0, 113, 0f, 0f, 0, default(Color), 1f); Main.dust[num3].scale = 1.6f; Main.dust[num3].noGravity = true; Main.dust[num3].position = player.Center + vector; Main.dust[num3].velocity = player.velocity * 0f + Utils.SafeNormalize(vector, Vector2.UnitY) * 1f; int num4 = num2; num2 = num4 + 1; } thoriumPlayer.tideOrb++; tideTimer = 0; } } } //set bonus damage to healing hot key thoriumPlayer.tideSet = true; //pyro summon bonus thoriumPlayer.napalmSet = true; //maid pet modPlayer.AddPet("Maid Pet", hideVisual, thorium.BuffType("MaidBuff"), thorium.ProjectileType("Maid1")); modPlayer.DreamEnchant = true; }
public override void AI() { Player player = Main.player[projectile.owner]; FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } if (!player.active) { projectile.active = false; return; } int num1038 = 10; if (player.dead) { modPlayer.EaterMinion = false; } if (modPlayer.EaterMinion) { projectile.timeLeft = 2; } num1038 = 30; //D U S T /*if (Main.rand.Next(30) == 0) * { * int num1039 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0f, 0f, 0, default(Color), 2f); * Main.dust[num1039].noGravity = true; * Main.dust[num1039].fadeIn = 2f; * Point point4 = Main.dust[num1039].position.ToTileCoordinates(); * if (WorldGen.InWorld(point4.X, point4.Y, 5) && WorldGen.SolidTile(point4.X, point4.Y)) * { * Main.dust[num1039].noLight = true; * } * }*/ bool flag67 = false; Vector2 value67 = Vector2.Zero; Vector2 arg_2D865_0 = Vector2.Zero; float num1052 = 0f; if (projectile.ai[1] == 1f) { projectile.ai[1] = 0f; projectile.netUpdate = true; } int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]); if (byUUID >= 0 && Main.projectile[byUUID].active) { flag67 = true; value67 = Main.projectile[byUUID].Center; Vector2 arg_2D957_0 = Main.projectile[byUUID].velocity; num1052 = Main.projectile[byUUID].rotation; float num1053 = MathHelper.Clamp(Main.projectile[byUUID].scale, 0f, 50f); int arg_2D9AD_0 = Main.projectile[byUUID].alpha; Main.projectile[byUUID].localAI[0] = projectile.localAI[0] + 1f; if (Main.projectile[byUUID].type != mod.ProjectileType("EaterHead")) { Main.projectile[byUUID].localAI[1] = projectile.whoAmI; } } if (!flag67) { return; } if (projectile.alpha > 0) { for (int num1054 = 0; num1054 < 2; num1054++) { int num1055 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0f, 0f, 100, default(Color), 2f); Main.dust[num1055].noGravity = true; Main.dust[num1055].noLight = true; } } projectile.alpha -= 42; if (projectile.alpha < 0) { projectile.alpha = 0; } projectile.velocity = Vector2.Zero; Vector2 vector134 = value67 - projectile.Center; if (num1052 != projectile.rotation) { float num1056 = MathHelper.WrapAngle(num1052 - projectile.rotation); vector134 = vector134.RotatedBy(num1056 * 0.1f, default(Vector2)); } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; projectile.width = projectile.height = (int)(num1038 * projectile.scale); projectile.Center = projectile.position; float dist = 26; if (Main.projectile[byUUID].type == mod.ProjectileType("EaterHead")) { dist = 32; } if (vector134 != Vector2.Zero) { projectile.Center = value67 - Vector2.Normalize(vector134) * dist; } projectile.spriteDirection = vector134.X > 0f ? 1 : -1; }
public override void Update(Player player, ref int buffIndex) { if (player.whoAmI == Main.myPlayer) { FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); if (Soulcheck.GetValue("Skeletron Arms Minion")) { fargoPlayer.SkeletronArms = true; if (player.ownedProjectileCounts[mod.ProjectileType("SkeletronArmL")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("SkeletronArmL"), 0, 8f, player.whoAmI); } if (player.ownedProjectileCounts[mod.ProjectileType("SkeletronArmR")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("SkeletronArmR"), 0, 8f, player.whoAmI); } } if (Soulcheck.GetValue("Pungent Eye Minion")) { fargoPlayer.PungentEyeballMinion = true; if (player.ownedProjectileCounts[mod.ProjectileType("PungentEyeball")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("PungentEyeball"), 0, 0f, player.whoAmI); } } if (Soulcheck.GetValue("Rainbow Slime Minion")) { fargoPlayer.RainbowSlime = true; if (player.ownedProjectileCounts[mod.ProjectileType("RainbowSlime")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("RainbowSlime"), 0, 3f, player.whoAmI); } } if (Soulcheck.GetValue("Probes Minion")) { fargoPlayer.Probes = true; if (player.ownedProjectileCounts[mod.ProjectileType("Probe1")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("Probe1"), 0, 9f, player.whoAmI); } if (player.ownedProjectileCounts[mod.ProjectileType("Probe2")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("Probe2"), 0, 9f, player.whoAmI, 0f, -1f); } } if (Soulcheck.GetValue("Plantera Minion")) { fargoPlayer.MagicalBulb = true; if (player.ownedProjectileCounts[mod.ProjectileType("PlanterasChild")] < 1) { Projectile.NewProjectile(player.Center.X, player.Center.Y, -0.15f, -0.1f, mod.ProjectileType("PlanterasChild"), 0, 3f, player.whoAmI); } } if (Soulcheck.GetValue("Flocko Minion")) { fargoPlayer.SuperFlocko = true; if (player.ownedProjectileCounts[mod.ProjectileType("SuperFlocko")] < 1) { Projectile.NewProjectile(player.Center, new Vector2(0f, -10f), mod.ProjectileType("SuperFlocko"), 0, 4f, player.whoAmI); } } if (Soulcheck.GetValue("Saucer Minion")) { fargoPlayer.MiniSaucer = true; if (player.ownedProjectileCounts[mod.ProjectileType("MiniSaucer")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("MiniSaucer"), 0, 3f, player.whoAmI); } } if (Soulcheck.GetValue("Cultist Minion")) { fargoPlayer.LunarCultist = true; if (player.ownedProjectileCounts[mod.ProjectileType("LunarCultist")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("LunarCultist"), 0, 2f, player.whoAmI, -1f); } } if (Soulcheck.GetValue("True Eyes Minion")) { fargoPlayer.TrueEyes = true; if (player.ownedProjectileCounts[mod.ProjectileType("TrueEyeL")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("TrueEyeL"), 0, 3f, player.whoAmI, -1f); } if (player.ownedProjectileCounts[mod.ProjectileType("TrueEyeR")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("TrueEyeR"), 0, 3f, player.whoAmI, -1f); } if (player.ownedProjectileCounts[mod.ProjectileType("TrueEyeS")] < 1) { Projectile.NewProjectile(player.Center, Vector2.Zero, mod.ProjectileType("TrueEyeS"), 0, 3f, player.whoAmI, -1f); } } } }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); fargoPlayer.AllDamageUp(.1f); fargoPlayer.AllCritUp(10); fargoPlayer.MasochistHeart = true; player.endurance += 0.1f; //pumpking's cape player.buffImmune[mod.BuffType("LivingWasteland")] = true; fargoPlayer.PumpkingsCape = true; fargoPlayer.AdditionalAttacks = true; //ice queen's crown player.buffImmune[BuffID.Frozen] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.FlockoMinion)) { player.AddBuff(mod.BuffType("SuperFlocko"), 2); } //saucer control console player.buffImmune[BuffID.Electrified] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.UFOMinion)) { player.AddBuff(mod.BuffType("SaucerMinion"), 2); } //betsy's heart player.buffImmune[BuffID.OgreSpit] = true; player.buffImmune[BuffID.WitheredWeapon] = true; player.buffImmune[BuffID.WitheredArmor] = true; fargoPlayer.BetsysHeart = true; //mutant antibodies player.buffImmune[BuffID.Wet] = true; player.buffImmune[BuffID.Rabies] = true; player.buffImmune[mod.BuffType("MutantNibble")] = true; player.buffImmune[mod.BuffType("OceanicMaul")] = true; fargoPlayer.MutantAntibodies = true; if (player.mount.Active && player.mount.Type == MountID.CuteFishron) { player.dripping = true; } //galactic globe player.buffImmune[mod.BuffType("Flipped")] = true; player.buffImmune[mod.BuffType("FlippedHallow")] = true; player.buffImmune[mod.BuffType("Unstable")] = true; player.buffImmune[mod.BuffType("CurseoftheMoon")] = true; player.buffImmune[BuffID.VortexDebuff] = true; //player.buffImmune[BuffID.ChaosState] = true; if (SoulConfig.Instance.GetValue(SoulConfig.Instance.GravityControl)) { player.gravControl = true; } if (SoulConfig.Instance.GetValue(SoulConfig.Instance.TrueEyes)) { player.AddBuff(mod.BuffType("TrueEyes"), 2); } fargoPlayer.GravityGlobeEX = true; fargoPlayer.wingTimeModifier += 1f; //heart of maso player.buffImmune[BuffID.MoonLeech] = true; player.buffImmune[mod.BuffType("NullificationCurse")] = true; }
public override void AI() { Player player = Main.player[projectile.owner]; FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } int num1038 = 30; bool flag67 = false; Vector2 value67 = Vector2.Zero; Vector2 arg_2D865_0 = Vector2.Zero; float num1052 = 0f; if (projectile.ai[1] == 1f) { projectile.ai[1] = 0f; projectile.netUpdate = true; } int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]); if (byUUID >= 0 && Main.projectile[byUUID].active) { flag67 = true; value67 = Main.projectile[byUUID].Center; Vector2 arg_2D957_0 = Main.projectile[byUUID].velocity; num1052 = Main.projectile[byUUID].rotation; float num1053 = MathHelper.Clamp(Main.projectile[byUUID].scale, 0f, 50f); int arg_2D9AD_0 = Main.projectile[byUUID].alpha; if (arg_2D9AD_0 == 0) { projectile.alpha -= 84; if (projectile.alpha < 0) { projectile.alpha = 0; } } Main.projectile[byUUID].localAI[0] = projectile.localAI[0] + 1f; } if (!flag67) { return; } //projectile.alpha -= 42; //if (projectile.alpha < 0) projectile.alpha = 0; projectile.velocity = Vector2.Zero; Vector2 vector134 = value67 - projectile.Center; if (num1052 != projectile.rotation) { float num1056 = MathHelper.WrapAngle(num1052 - projectile.rotation); vector134 = vector134.RotatedBy(num1056 * 0.1f, default(Vector2)); } projectile.rotation = vector134.ToRotation() + 1.57079637f; projectile.position = projectile.Center; projectile.width = projectile.height = (int)(num1038 * projectile.scale); projectile.Center = projectile.position; if (vector134 != Vector2.Zero) { projectile.Center = value67 - Vector2.Normalize(vector134) * 36; } projectile.spriteDirection = vector134.X > 0f ? 1 : -1; }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.SupersonicSoul(hideVisual); }
public override void UpdateAccessory(Player player, bool hideVisual) { FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); modPlayer.WorldShaperSoul(hideVisual); //add the pet }
public override void UpdateLifeRegen(NPC npc, ref int damage) { Player player = Main.player[Main.myPlayer]; FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(); if (Rotting) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 100; if (damage < 5) { damage = 5; } } if (LeadPoison) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } int dot = npc.type == NPCID.EaterofWorldsBody ? 2 : 10; if (modPlayer.TerraForce || modPlayer.WizardEnchant) { dot *= 3; } npc.lifeRegen -= dot; } //50 dps if (SolarFlare) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 100; if (damage < 10) { damage = 10; } } //100 dps if (HellFire) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 200; if (damage < 20) { damage = 20; } } //20 dps if (OriPoison) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 40; if (damage < 4) { damage = 4; } } if (Infested) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= InfestedExtraDot(npc); if (damage < 8) { damage = 8; } } else { MaxInfestTime = 0; } if (Electrified) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 4; if (npc.velocity != Vector2.Zero) { npc.lifeRegen -= 16; } if (damage < 4) { damage = 4; } } if (CurseoftheMoon) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 24; if (damage < 6) { damage = 6; } } if (OceanicMaul) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 48; if (damage < 12) { damage = 12; } } if (Sadism) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 170 + 48 + 60 + 8 + 4 + 16; if (damage < 70) { damage = 70; } } if (MutantNibble) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } if (npc.lifeRegenCount > 0) { npc.lifeRegenCount = 0; } if (npc.life > 0 && LifePrevious > 0) //trying to prevent some wack despawn stuff { if (npc.life > LifePrevious) { npc.life = LifePrevious; } else { LifePrevious = npc.life; } } } else { LifePrevious = npc.life; } if (GodEater) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 4200; if (damage < 777) { damage = 777; } } if (Suffocation) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= (int)(40f * Math.Min(1f, 1f * SuffocationTimer / 480)); if (damage < 5) { damage = 5; } } if (FlamesoftheUniverse) { if (npc.lifeRegen > 0) { npc.lifeRegen = 0; } npc.lifeRegen -= 30 + 50 + 48 + 30; if (damage < 20) { damage = 20; } } if (modPlayer.OriEnchant && npc.lifeRegen < 0) { int multiplier = 3; if (modPlayer.EarthForce || modPlayer.WizardEnchant) { multiplier = 5; } npc.lifeRegen *= multiplier; damage *= multiplier; //half as effective if daybreak applied if (npc.daybreak) { npc.lifeRegen /= 2; damage /= 2; } } if (TimeFrozen && npc.life == 1) { if (npc.lifeRegen < 0) { npc.lifeRegen = 0; } } }
public override void AI() { Player player = Main.player[projectile.owner]; FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>(mod); if (player.dead) { modPlayer.ChloroEnchant = false; } if (!(modPlayer.ChloroEnchant || modPlayer.TerrariaSoul) || !SoulConfig.Instance.GetValue("Chlorophyte Leaf Crystal")) { projectile.Kill(); return; } float cooldown = 50f; float num395 = Main.mouseTextColor / 200f - 0.35f; num395 *= 0.2f; projectile.scale = num395 + 0.95f; if (projectile.owner == Main.myPlayer) { //rotation mumbo jumbo float distanceFromPlayer = 75; Lighting.AddLight(projectile.Center, 0.1f, 0.4f, 0.2f); projectile.position = player.Center + new Vector2(distanceFromPlayer, 0f).RotatedBy(projectile.ai[1]); projectile.position.X -= projectile.width / 2; projectile.position.Y -= projectile.height / 2; float rotation = 0.03f; projectile.ai[1] -= rotation; if (projectile.ai[1] > (float)Math.PI) { projectile.ai[1] -= 2f * (float)Math.PI; projectile.netUpdate = true; } projectile.rotation = projectile.ai[1] + (float)Math.PI / 2f; //wait for CD if (projectile.ai[0] != 0f) { projectile.ai[0] -= 1f; return; } //trying to shoot float num396 = projectile.position.X; float num397 = projectile.position.Y; float num398 = 700f; bool flag11 = false; for (int i = 0; i < 200; i++) { if (Main.npc[i].CanBeChasedBy(projectile, true)) { float num400 = Main.npc[i].position.X + Main.npc[i].width / 2; float num401 = Main.npc[i].position.Y + Main.npc[i].height / 2; float num402 = Math.Abs(projectile.position.X + projectile.width / 2 - num400) + Math.Abs(projectile.position.Y + projectile.height / 2 - num401); if (num402 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) { num398 = num402; num396 = num400; num397 = num401; flag11 = true; } } } //shoot if (flag11) { Vector2 vector29 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f); float num404 = num396 - vector29.X; float num405 = num397 - vector29.Y; float num406 = (float)Math.Sqrt(num404 * num404 + num405 * num405); num406 = 10f / num406; num404 *= num406; num405 *= num406; Projectile.NewProjectile(projectile.Center.X - 4f, projectile.Center.Y, num404, num405, 227, projectile.damage, projectile.knockBack, projectile.owner); projectile.ai[0] = cooldown; } } }