예제 #1
0
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("CherryPower"), 1, true);
            return(true);
        }
예제 #2
0
파일: TestBody.cs 프로젝트: Nyraloid/Chunky
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            //Give normal body item
            if (modPlayer.BodyType == null || modPlayer.BodyType == "OG")
            {
                Item.NewItem(player.position, mod.ItemType("OriginalBody"));
            }

            //Give beggar body item
            if (modPlayer.BodyType == "Beggar")
            {
                Item.NewItem(player.position, mod.ItemType("BeggarBody"));
            }

            //Give god body item
            if (modPlayer.BodyType == "God")
            {
                Item.NewItem(player.position, mod.ItemType("GodBody"));
            }

            //Change to test body
            modPlayer.BodyType  = "Test";
            player.statLifeMax  = modPlayer.Health[1];
            player.statLifeMax2 = modPlayer.Health[1];
            player.statManaMax2 = modPlayer.Mana[1];
            player.statManaMax  = modPlayer.Mana[1];
            player.statLife     = modPlayer.Health2[1];
            player.statMana     = modPlayer.Mana2[1];

            return(true);
        }
예제 #3
0
        public override void UpdateArmorSet(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.setBonus = "+6 seconds of stopping time, and -6 seconds of cooldown\nYou cannot run out of mana\nImmunity to pretty much everything\nImmunity to knockback\nRegeneration increased by 10\n'You've conquerored the world, it only makes sense for you to control time as well'";

            modPlayer.tsDuration += 360;
            modPlayer.tsCoolDown -= 360;
            player.lifeRegen     += 10;
            player.buffImmune[BuffID.Silenced]       = true;
            player.buffImmune[BuffID.Cursed]         = true;
            player.buffImmune[BuffID.Darkness]       = true;
            player.buffImmune[BuffID.Slow]           = true;
            player.buffImmune[BuffID.Confused]       = true;
            player.buffImmune[BuffID.Weak]           = true;
            player.buffImmune[BuffID.BrokenArmor]    = true;
            player.buffImmune[BuffID.Poisoned]       = true;
            player.buffImmune[BuffID.Bleeding]       = true;
            player.buffImmune[BuffID.Venom]          = true;
            player.buffImmune[BuffID.Blackout]       = true;
            player.buffImmune[BuffID.WitheredArmor]  = true;
            player.buffImmune[BuffID.WitheredWeapon] = true;
            player.buffImmune[BuffID.CursedInferno]  = true;
            player.buffImmune[BuffID.Ichor]          = true;
            player.buffImmune[BuffID.Chilled]        = true;
            player.buffImmune[BuffID.Frozen]         = true;
            player.buffImmune[BuffID.Obstructed]     = true;
            player.buffImmune[BuffID.Electrified]    = true;
            player.buffImmune[BuffID.Suffocation]    = true;
            player.buffImmune[BuffID.Frostburn]      = true;
            player.buffImmune[BuffID.ShadowFlame]    = true;
            player.noKnockback = true;
        }
예제 #4
0
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            //Give normal body item
            if (modPlayer.BodyType == null || modPlayer.BodyType == "OG")
            {
                Item.NewItem(player.position, mod.ItemType("OriginalBody"));
            }
            //it's crafted with the original body item but im still including this

            //Give test body item
            if (modPlayer.BodyType == "Test")
            {
                Item.NewItem(player.position, mod.ItemType("TestBody"));
            }

            //Give god body item
            if (modPlayer.BodyType == "God")
            {
                Item.NewItem(player.position, mod.ItemType("GodBody"));
            }

            //Change to test body
            modPlayer.BodyType  = "Beggar";
            player.statLifeMax  = modPlayer.Health[2];
            player.statLifeMax2 = modPlayer.Health[2];
            player.statManaMax2 = modPlayer.Mana[2];
            player.statManaMax  = modPlayer.Mana[2];
            player.statLife     = modPlayer.Health2[2];
            player.statMana     = modPlayer.Mana2[2];

            return(true);
        }
예제 #5
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.statLifeMax2 += 25;
            player.endurance    += 0.01f;
            player.noFallDmg     = true;
        }
예제 #6
0
파일: Time.cs 프로젝트: Nyraloid/Chunky
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("Time"), 1, true);
            modPlayer.CanUseTimeMagic = true;
            modPlayer.HasNormal       = true;
            player.accWatch           = 3;
        }
예제 #7
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("ReverseTime"), 1, true);
            modPlayer.CanUseTimeReverse = true;
            modPlayer.HasInstant        = true;
            player.accWatch             = 3;
        }
예제 #8
0
        public override bool CanUseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            if (modPlayer.HasInfinite)
            {
                return(false);
            }
            return(true);
        }
예제 #9
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.magicDamage       += 0.1f;
            player.manaSickReduction += 10;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 0.55f, 0.05f, 0.3f);
        }
예제 #10
0
        public override bool CanUseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            if (player.HasBuff(mod.BuffType("Terror")))
            {
                return(false);
            }
            return(true);
        }
예제 #11
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("LastRhymes"), 1, true);
            modPlayer.HasNormal = true;
            if (Chunky.Skill1.JustPressed && !player.HasBuff(mod.BuffType("NoRhymes")))
            {
                player.AddBuff(mod.BuffType("NoRhymes"), 1, true);
            }
        }
예제 #12
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            modPlayer.HasInfinite = true;
            player.AddBuff(mod.BuffType("Gurnard"), 1, true);
            player.endurance    -= 0.02f;
            player.statDefense  -= 2;
            player.statLifeMax2 -= 25;
            player.statManaMax2 -= 10;
        }
예제 #13
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("Terror"), 1, true);
            modPlayer.Terror = true;
            modPlayer.tTime++;
            player.statLifeMax2  += 100;
            modPlayer.tsDuration += (int)(modPlayer.tTime / 360);
            modPlayer.kcDuration += (int)(modPlayer.tTime / 240);
        }
예제 #14
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.endurance += 0.05f;
            player.lifeRegen += 1;
            player.manaRegen += 1;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 1f, 0.9f, 0.4f);
        }
예제 #15
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("TardyCardinal"), 1, true);
            modPlayer.HasInfinite = true;
            player.moveSpeed     += 7;
            player.lifeRegen     += 1;
            player.manaRegen     += 1;
            Main.time++;
        }
예제 #16
0
파일: HalfTime.cs 프로젝트: Nyraloid/Chunky
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("HalfTime"), 1, true);
            modPlayer.HasInfinite = true;
            if (ChunkyWorld.EveryOther && ChunkyWorld.TOKIWOTOMARE == 0 && ChunkyWorld.TimeSkipping == 0)
            {
                Main.time--;
            }
            player.moveSpeed += 3;
        }
예제 #17
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.meleeDamage   *= 1.16f;
            player.magicDamage   *= 1.16f;
            player.rangedDamage  *= 1.16f;
            player.minionDamage  *= 1.16f;
            modPlayer.tsDuration += 60;
            modPlayer.tsCoolDown -= 60;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 1.11f, .90f, .40f);
        }
예제 #18
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            modPlayer.HasInstant = true;
            player.AddBuff(mod.BuffType("Milk"), 1);
            player.statLifeMax2 += 25;
            player.endurance    += 0.01f;
            if (Chunky.Skill2.JustPressed && !modPlayer.noInstant)
            {
                player.AddBuff(mod.BuffType("NoInstant"), 30 * 60);
                player.AddBuff(mod.BuffType("MilkEff"), 15 * 60);
            }
        }
예제 #19
0
파일: StopTime.cs 프로젝트: Nyraloid/Chunky
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            //We dont need this every other second thing for adding to AddTime since the dividing takes care of its job already
            //Math.DivRem((int)Main.time, 2, out int n);
            if (modPlayer.BodyType == null || modPlayer.BodyType == "OG")
            {
                if (ChunkyWorld.TOKIWOTOMARE > 0)
                {
                    modPlayer.AddTime[0]++;
                }
                if (modPlayer.AddTime[0] < 113400)
                {
                    modPlayer.tsDuration += (int)(modPlayer.AddTime[0] / 90);                                //dividing by the amount of seconds it takes to increase duration by 1 seconds
                }
                if (modPlayer.AddTime[0] >= 113400)
                {
                    modPlayer.tsDuration += (int)((modPlayer.AddTime[0]) / 600) + 1071;                                 //I wanted to make it grow at sqrt(x) rate but that was too slow
                }
            }
            if (modPlayer.BodyType == "Beggar")
            {
                if (ChunkyWorld.TOKIWOTOMARE > 0)
                {
                    modPlayer.AddTime[1]++;
                }
                if (modPlayer.AddTime[1] < 226800)
                {
                    modPlayer.tsDuration += (int)(modPlayer.AddTime[1] / 180);
                }
                if (modPlayer.AddTime[1] >= 226800)
                {
                    modPlayer.tsDuration += (int)((modPlayer.AddTime[1]) / 1200) + 2142;                                 //I just multiplied everything by 2 hoping thatll make it take twice as long
                }
            }
            if (modPlayer.BodyType == "God")
            {
                if (ChunkyWorld.TOKIWOTOMARE > 0)
                {
                    modPlayer.AddTime[2]++;
                }
                modPlayer.tsDuration += (int)(modPlayer.AddTime[2] / 60); //every second you gain a second.
                //Im thinking I just wont have it slow down cuz that's totally balanced right
            }


            //if (ChunkyWorld.TOKIWOTOMARE > 0 && n == 0) player.statMana--;
        }
예제 #20
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            modPlayer.HasInstant = true;
            player.wingTimeMax  += 20;
            player.statManaMax2 += 20;
            player.statLifeMax2 += 20;
            player.endurance    += 0.015f;
            if (Chunky.Skill2.JustPressed && !modPlayer.noInstant)
            {
                player.AddBuff(mod.BuffType("BabyDomain"), 30, true);
                player.AddBuff(mod.BuffType("NoInstant"), 30, true);
            }
        }
예제 #21
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.maxFallSpeed   += 10;
            player.maxRunSpeed    += 2;
            player.moveSpeed      += 2;
            player.jumpSpeedBoost += 2;
            player.statManaMax2   += 30;
            player.statLifeMax2   += 30;
            player.manaCost       -= 0.5f;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 0.55f, 0.05f, 0.3f);
        }
예제 #22
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.AddBuff(mod.BuffType("CherryPower"), 1, true);
            modPlayer.HasInstant = true;

            if (modPlayer.CanEatCherry && Chunky.Skill2.JustPressed && player.statMana >= 100)
            {
                player.AddBuff(mod.BuffType("NoPain"), modPlayer.CherryImmuneTime, true);
                player.AddBuff(mod.BuffType("YesPain"), modPlayer.CherryCooldownTime, true);
                player.AddBuff(BuffID.ManaSickness, 2700, true);
                Main.PlaySound(SoundLoader.customSoundType, -1, -1, mod.GetSoundSlot(SoundType.Custom, "Sounds/HOOOOOOOOO"));
            }
        }
예제 #23
0
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            if (player.lastDeathPostion.X >= 1 && player.lastDeathPostion.Y >= 1)
            {
                Vector2 LastSeen;
                LastSeen.X = player.lastDeathPostion.X - player.width;
                LastSeen.Y = player.lastDeathPostion.Y - player.height;
                player.Teleport(LastSeen, 0);
                LastSeen.X = -1;
                LastSeen.Y = -1;
                Main.PlaySound(SoundLoader.customSoundType, -1, -1, 13);
                return(true);
            }
            return(false);
        }
예제 #24
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.meleeDamage   *= 2;
            player.magicDamage   *= 2;
            player.rangedDamage  *= 2;
            player.minionDamage  *= 2;
            player.statManaMax2  += 100;
            player.statLifeMax2  += 100;
            player.manaCost      -= 0.3f;
            modPlayer.tsDuration += 60;
            player.dangerSense    = true;
            player.detectCreature = true;
            player.findTreasure   = true;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 1.11f, .90f, .40f);
        }
예제 #25
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.meleeDamage   += 0.16f;
            player.magicDamage   += 0.16f;
            player.rangedDamage  += 0.16f;
            player.minionDamage  += 0.16f;
            player.longInvince    = true;
            player.endurance     += 0.1f;
            modPlayer.tsDuration += 60;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 1.11f, .90f, .40f);


            if (ChunkyWorld.TOKIWOTOMARE == 0 && !modPlayer.tsChillBro)
            {
                player.buffImmune[BuffID.ChaosState] = true;
            }
        }
예제 #26
0
        public override void UpdateEquip(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.meleeDamage              += 0.12f;
            player.magicDamage              += 0.12f;
            player.rangedDamage             += 0.12f;
            player.minionDamage             += 0.12f;
            modPlayer.tsDuration            += 60;
            player.buffImmune[BuffID.OnFire] = true;
            player.lavaImmune = true;
            player.waterWalk  = true;
            player.buffImmune[BuffID.Burning] = true;
            player.moveSpeed      += 4.5f;
            player.maxFallSpeed   += 28;
            player.maxRunSpeed    += 4.5f;
            player.jumpSpeedBoost += 4.5f;
            Vector2 position = player.position;

            Lighting.AddLight((int)((position.X + (float)(player.width / 2)) / 16f), (int)((position.Y + (float)(player.height / 2)) / 16f), 1.11f, .90f, .40f);
        }
예제 #27
0
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            if (modPlayer.Fetuses < 25)
            {
                player.statLifeMax2 += 2;
                player.statLife     += 2;
                player.HealEffect(2, true);
            }
            else
            {
                player.statLifeMax2 += 1;
                player.statLife     += 1;
                player.HealEffect(1, true);
            }

            modPlayer.Fetuses += 1;

            return(true);
        }
예제 #28
0
파일: GodBody.cs 프로젝트: Nyraloid/Chunky
        public override bool UseItem(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            //Give normal body item
            if (modPlayer.BodyType == null || modPlayer.BodyType == "OG")
            {
                Item.NewItem(player.position, mod.ItemType("OriginalBody"));
            }
            //it's crafted with the original body item but im still including this

            //Give test body item
            if (modPlayer.BodyType == "Test")
            {
                Item.NewItem(player.position, mod.ItemType("TestBody"));
            }

            //Give beggar body item
            if (modPlayer.BodyType == "Beggar")
            {
                Item.NewItem(player.position, mod.ItemType("BeggarBody"));
            }

            //Change to test body
            //player.statLife = modPlayer.Health2[3];
            //player.statMana = modPlayer.Mana2[3];
            modPlayer.BodyType  = "God";
            player.statLifeMax  = modPlayer.Health[3]; //we're doing it like this
            player.statManaMax  = modPlayer.Health[3];
            player.statLifeMax2 = modPlayer.Health[3]; //This is the actual health
            player.statManaMax2 = modPlayer.Mana[3];
            //player.statLifeMax2 += 200;
            //Main.NewText(player.statLifeMax2);
            //Main.NewText(player.statLife);
            player.statLife = modPlayer.Health2[3];
            player.statMana = modPlayer.Mana2[3];
            //Main.NewText(player.statLife);

            return(true);
        }
예제 #29
0
        public override void UpdateArmorSet(Player player)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            player.setBonus = "Leap past your enemy's movements";

            //Unskipping time
            if ((Chunky.ArmorSkill.JustPressed || player.statMana <= 0) && ChunkyWorld.TimeSkipping > 0)
            {
                int t0 = modPlayer.kcCoolDown;
                int t  = modPlayer.kcDuration;
                int x  = t - ChunkyWorld.TimeSkipping;

                player.ClearBuff(mod.BuffType("TimeLeap"));
                player.ClearBuff(mod.BuffType("OutOfTime"));
                player.AddBuff(mod.BuffType("OutOfTime"), (int)((t0 - t) * (1 - Math.Cos(x * Math.PI / t)) / 2), true);
                ChunkyWorld.TimeSkipping = 0;
            }

            //Skipping time
            if (Chunky.ArmorSkill.JustPressed && modPlayer.kcChillBro == false && ChunkyWorld.TOKIWOTOMARE == 0 && player.statMana > 20)
            {
                player.statMana -= 20;
                Main.PlaySound(SoundLoader.customSoundType, -1, -1, mod.GetSoundSlot(SoundType.Custom, "Sounds/ReverseFart"));
                ChunkyWorld.TimeSkipping = modPlayer.kcDuration;
                player.AddBuff(mod.BuffType("OutOfTime"), modPlayer.kcCoolDown, true);
                player.AddBuff(mod.BuffType("TimeLeap"), modPlayer.kcDuration, true);
            }

            if (ChunkyWorld.TimeSkipping > 0 && modPlayer.kcImmune == true)
            {
                player.moveSpeed      += 7f;
                player.maxRunSpeed    += 7f;
                player.jumpSpeedBoost += 5f;
                player.immune          = true;
            }

            player.AddBuff(mod.BuffType("SkipTime"), 1, true);
        }
예제 #30
0
        public override void Update(Player player, ref int buffIndex)
        {
            ChunkyPlayer modPlayer = player.GetModPlayer <ChunkyPlayer>();

            modPlayer.tsCoolDown -= 360;
            modPlayer.tsDuration += 120;
            modPlayer.kcCoolDown -= 360;
            modPlayer.kcCoolDown += 120;
            //This could go horribly wrong

            player.AddBuff(mod.BuffType("NoRhymes"), 1, true);
            player.AddBuff(BuffID.PotionSickness, 1, true);
            player.AddBuff(BuffID.ManaSickness, 1, true);
            Math.DivRem((int)Main.time, 5, out int n);
            if (n == 0)
            {
                player.statLife--;
            }
            if (player.statLife >= 20)
            {
                player.statLifeMax = player.statLife;
            }
            player.maxRunSpeed    += 10;
            player.moveSpeed      += 20;
            player.jumpSpeedBoost += 5;
            player.wingTimeMax     = -1;
            player.ignoreWater     = true;
            player.lavaImmune      = true;
            player.immune          = true;

            player.allDamage *= 10; //This couldn't possibly be overpowered
            //player.manaCost = 0;

            if (player.statLife < 0)
            {
                player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s wizarding rampage has come to an end."), 1, 0, false);
            }
        }