Example #1
0
        public override void UpdateAmulet(Player player)
        {
            player.minionDamage       *= 0.03f;
            player.minionKB           *= 0.03f;
            player.npcTypeNoAggro[1]   = true;
            player.npcTypeNoAggro[16]  = true;
            player.npcTypeNoAggro[59]  = true;
            player.npcTypeNoAggro[71]  = true;
            player.npcTypeNoAggro[81]  = true;
            player.npcTypeNoAggro[121] = true;
            player.npcTypeNoAggro[122] = true;
            player.npcTypeNoAggro[138] = true;
            player.npcTypeNoAggro[147] = true;
            player.npcTypeNoAggro[183] = true;
            player.npcTypeNoAggro[184] = true;
            player.npcTypeNoAggro[187] = true;
            player.npcTypeNoAggro[204] = true;
            player.npcTypeNoAggro[225] = true;
            player.npcTypeNoAggro[244] = true;
            player.npcTypeNoAggro[302] = true;
            player.npcTypeNoAggro[304] = true;
            player.npcTypeNoAggro[333] = true;
            player.npcTypeNoAggro[334] = true;
            player.npcTypeNoAggro[335] = true;
            player.npcTypeNoAggro[336] = true;
            player.npcTypeNoAggro[535] = true;
            player.npcTypeNoAggro[537] = true;

            DecimationPlayer modPlayer = player.GetModPlayer <DecimationPlayer>();

            modPlayer.amuletsBuff        = mod.BuffType <Singed>();
            modPlayer.amuletsBuffChances = 4;
            modPlayer.amuletsBuffTime    = 300;
        }
Example #2
0
        public override void UpdateAmulet(Player player)
        {
            player.meleeDamage *= 1.03f;
            player.meleeSpeed  *= 1.03f;
            player.meleeCrit   += 3;
            player.lavaMax     += 420;

            DecimationPlayer modPlayer = player.GetModPlayer <DecimationPlayer>();

            modPlayer.amuletsBuff        = mod.BuffType <Singed>();
            modPlayer.amuletsBuffChances = 4;
            modPlayer.amuletsBuffTime    = 300;
        }
        public override void UpdateAmulet(Player player)
        {
            player.thrownDamage   *= 1.03f;
            player.thrownVelocity *= 1.03f;
            player.thrownCrit     += 3;

            DecimationPlayer modPlayer = player.GetModPlayer <DecimationPlayer>();

            modPlayer.amuletsBuff              = BuffID.Confused;
            modPlayer.amuletsBuffTime          = 300;
            modPlayer.amuletsBuffChances       = 4;
            modPlayer.amuletsBuffWhenAttacking = true;
        }
        public override void ModifyBuffTip(ref string tip, ref int rare)
        {
            DecimationPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DecimationPlayer>();
            int defenseAdded           = 0;

            for (int i = 0; i < modPlayer.scarabCounter; i++)
            {
                defenseAdded += (int)(modPlayer.oldStatDefense * 0.15f);
            }

            tip += "Summons scarabs to protect you.";
            tip += "\nGive 15% more defense for each scarabs alive.";
            tip += "\n3 scarabs maximum";
            tip += "\nCurrently, you have " + defenseAdded + " defense added.";
        }
        public override void Update(Player player, ref int buffIndex)
        {
            DecimationPlayer modPlayer = player.GetModPlayer <DecimationPlayer>();

            if (modPlayer.scarabEnduranceBuffTimeCounter >= 180)
            {
                if (modPlayer.scarabCounter < 3)
                {
                    modPlayer.scarabCounter++;
                    modPlayer.scarabs[modPlayer.scarabCounter - 1] = Projectile.NewProjectile(player.Center, new Vector2(0, 0), mod.ProjectileType <Scarab>(), 0, 0, 255, player.whoAmI);
                }
                modPlayer.scarabEnduranceBuffTimeCounter = 0;
            }
            modPlayer.scarabEnduranceBuffTimeCounter++;

            for (int i = 0; i < modPlayer.scarabCounter; i++)
            {
                player.statDefense += (int)(modPlayer.oldStatDefense * 0.15f);
            }
        }
Example #6
0
        public override void UpdateArmorSet(Player player)
        {
            DecimationPlayer modPlayer = player.GetModPlayer <DecimationPlayer>();

            player.AddBuff(mod.BuffType <ScarabEndurance>(), 1);
            player.arrowDamage  *= 1.05f;
            player.bulletDamage *= 1.05f;
            player.magicDamage  *= 1.05f;
            player.meleeDamage  *= 1.05f;
            player.minionDamage *= 1.05f;
            player.rangedDamage *= 1.05f;
            player.rocketDamage *= 1.05f;
            player.thrownDamage *= 1.05f;
            player.buffImmune[BuffID.OnFire]        = true;
            player.buffImmune[BuffID.CursedInferno] = true;
            player.lavaImmune = true;

            player.setSolar = true;
            player.setBonus = "Summons scarabs to protect you, add 5% damages to each attacks, gives immunity to On Fire!, Cursed Inferno and Lava.";
            modPlayer.solarCounter++;
            int num11 = 240;

            if (modPlayer.solarCounter >= num11)
            {
                if (player.solarShields > 0 && player.solarShields < 3)
                {
                    for (int num12 = 0; num12 < 22; num12++)
                    {
                        if (player.buffType[num12] >= 170 && player.buffType[num12] <= 171)
                        {
                            player.DelBuff(num12);
                        }
                    }
                }
                if (player.solarShields < 3)
                {
                    player.AddBuff(170 + player.solarShields, 5, false);
                    for (int num13 = 0; num13 < 16; num13++)
                    {
                        Dust dust = Main.dust[Dust.NewDust(player.position, player.width, player.height, 6, 0f, 0f, 100, default(Color), 1f)];
                        dust.noGravity = true;
                        dust.scale     = 1.7f;
                        dust.fadeIn    = 0.5f;
                        Dust dust2 = dust;
                        dust2.velocity *= 5f;
                        dust.shader     = GameShaders.Armor.GetSecondaryShader(player.ArmorSetDye(), player);
                    }
                    modPlayer.solarCounter = 0;
                }
                else
                {
                    modPlayer.solarCounter = num11;
                }
            }
            for (int num14 = player.solarShields; num14 < 3; num14++)
            {
                player.solarShieldPos[num14] = Vector2.Zero;
            }
            for (int num15 = 0; num15 < player.solarShields; num15++)
            {
                player.solarShieldPos[num15] += player.solarShieldVel[num15];
                Vector2 value = ((float)player.miscCounter / 100f * 6.28318548f + (float)num15 * (6.28318548f / (float)player.solarShields)).ToRotationVector2() * 6f;
                value.X = (float)(player.direction * 20);
                player.solarShieldVel[num15] = (value - player.solarShieldPos[num15]) * 0.2f;
            }
            if (player.dashDelay >= 0)
            {
                player.solarDashing           = false;
                player.solarDashConsumedFlare = false;
            }
            bool flag = player.solarDashing && player.dashDelay < 0;

            if (player.solarShields > 0 | flag)
            {
                player.dash = 3;
            }
        }