コード例 #1
0
        public Koopatrol()
        {
            Name = "Koopatrol";

            //Using their TTYD stats
            BattleStats = new Stats(26, 6, 0, 4, 2);

            AIBehavior = new KoopatrolAI(this);

            EntityProperties.AddPayback(SpikedPayback);
            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);

            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Sleep, new StatusPropertyHolder(70d, -1));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Dizzy, new StatusPropertyHolder(105d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Confused, new StatusPropertyHolder(75d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Tiny, new StatusPropertyHolder(90d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Stop, new StatusPropertyHolder(75d, -1));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.DEFDown, new StatusPropertyHolder(95d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Burn, new StatusPropertyHolder(100d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Frozen, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Fright, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Blown, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.KO, new StatusPropertyHolder(95d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Electrified, new StatusPropertyHolder(80d, 0));

            Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Koopatrol.png");

            AnimManager.SetSpriteSheet(spriteSheet);

            AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                  new Animation.Frame(new Rectangle(1, 388, 42, 59), 500d)));
            AnimManager.AddAnimation(AnimationGlobals.RunningName, new ReverseAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                        new Animation.Frame(new Rectangle(1, 388, 42, 59), 100d),
                                                                                        new Animation.Frame(new Rectangle(49, 387, 43, 60), 100d, new Vector2(-1, -1)),
                                                                                        new Animation.Frame(new Rectangle(98, 386, 45, 60), 100d, new Vector2(-2, -2))));
            AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(spriteSheet,
                                                                              new Animation.Frame(new Rectangle(5, 325, 40, 50), 250d),
                                                                              new Animation.Frame(new Rectangle(56, 325, 38, 49), 250d)));
            AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(spriteSheet,
                                                                               new Animation.Frame(new Rectangle(99, 327, 43, 48), 1000d)));

            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.EnterShellName, new Animation(spriteSheet,
                                                                                                            new Animation.Frame(new Rectangle(99, 262, 39, 49), 70d),
                                                                                                            new Animation.Frame(new Rectangle(152, 260, 35, 27), 70d),
                                                                                                            new Animation.Frame(new Rectangle(202, 261, 33, 25), 70d)));
            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.ShellSpinName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                                               new Animation.Frame(new Rectangle(34, 449, 28, 30), 100d),
                                                                                                               new Animation.Frame(new Rectangle(66, 449, 28, 30), 100d),
                                                                                                               new Animation.Frame(new Rectangle(97, 449, 30, 30), 100d),
                                                                                                               new Animation.Frame(new Rectangle(130, 449, 28, 30), 100d),
                                                                                                               new Animation.Frame(new Rectangle(162, 449, 28, 30), 100d),
                                                                                                               new Animation.Frame(new Rectangle(1, 449, 30, 30), 100d)));
            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.ExitShellName, new Animation(spriteSheet,
                                                                                                           new Animation.Frame(new Rectangle(202, 261, 33, 25), 70d),
                                                                                                           new Animation.Frame(new Rectangle(152, 260, 35, 27), 70d),
                                                                                                           new Animation.Frame(new Rectangle(99, 262, 39, 49), 70d)));
            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.FlippedName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                                             new Animation.Frame(new Rectangle(337, 57, 58, 35), 300d),
                                                                                                             new Animation.Frame(new Rectangle(337, 97, 58, 36), 300d)));
        }
コード例 #2
0
        public SpikedGoomba()
        {
            Name        = "Spiked Goomba";
            BattleStats = new Stats(1, 2, 0, 1, 0);

            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);
            EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Constant, Enumerations.PhysicalAttributes.Spiked,
                                                                        Enumerations.Elements.Sharp, new Enumerations.ContactTypes[] { Enumerations.ContactTypes.TopDirect },
                                                                        new Enumerations.ContactProperties[] { Enumerations.ContactProperties.None },
                                                                        Enumerations.ContactResult.Failure, Enumerations.ContactResult.Failure, 1, null));

            Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/SpikedGoomba.png");

            AnimManager.SetSpriteSheet(spriteSheet);

            AnimManager.AddAnimation(AnimationGlobals.IdleName, new ReverseAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                     new Animation.Frame(new Rectangle(34, 153, 28, 39), 1000d),
                                                                                     new Animation.Frame(new Rectangle(67, 152, 26, 40), 150d, new Vector2(0, -1)),
                                                                                     new Animation.Frame(new Rectangle(67, 110, 26, 42), 1000d, new Vector2(0, -2))));
            AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(spriteSheet,
                                                                              new Animation.Frame(new Rectangle(32, 68, 31, 36), 500d),
                                                                              new Animation.Frame(new Rectangle(128, 108, 31, 36), 500d)));
            AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(128, 108, 31, 36), 1000d)));

            AnimManager.AddAnimation(AnimationGlobals.RunningName, new ReverseAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                        new Animation.Frame(new Rectangle(98, 153, 29, 39), 150d),
                                                                                        new Animation.Frame(new Rectangle(34, 153, 28, 39), 100d),
                                                                                        new Animation.Frame(new Rectangle(34, 110, 30, 42), 150d)));
        }
コード例 #3
0
        public Koopatrol()
        {
            Name = "Koopatrol";

            //Using their TTYD stats
            BattleStats = new Stats(26, 6, 0, 4, 2);

            AIBehavior = new KoopatrolAI(this);

            EntityProperties.AddPayback(SpikedPayback);
            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);

            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Sleep, new StatusPropertyHolder(70d, -1));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Dizzy, new StatusPropertyHolder(105d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Confused, new StatusPropertyHolder(75d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Tiny, new StatusPropertyHolder(90d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Stop, new StatusPropertyHolder(75d, -1));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.DEFDown, new StatusPropertyHolder(95d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Burn, new StatusPropertyHolder(100d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Frozen, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Fright, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Blown, new StatusPropertyHolder(70d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.KO, new StatusPropertyHolder(95d, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Electrified, new StatusPropertyHolder(80d, 0));
        }
コード例 #4
0
        public SpikedGoomba()
        {
            Name        = "Spiked Goomba";
            BattleStats = new Stats(1, 2, 0, 1, 0);

            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);
            EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Constant, Enumerations.PhysicalAttributes.Spiked,
                                                                        Enumerations.Elements.Sharp, new Enumerations.ContactTypes[] { Enumerations.ContactTypes.TopDirect },
                                                                        new Enumerations.ContactProperties[] { Enumerations.ContactProperties.None },
                                                                        Enumerations.ContactResult.Failure, Enumerations.ContactResult.Failure, 1, null));
        }
コード例 #5
0
ファイル: Watt.cs プロジェクト: balmz/PaperMarioBattleSystem
        public Watt() : base(new PartnerStats(PartnerGlobals.PartnerRanks.Normal, 50, 0, 0))
        {
            Name = "Watt";
            PartnerDescription = "";
            PartnerType        = Enumerations.PartnerTypes.Watt;

            ChangeHeightState(HeightStates.Airborne);

            //Watt is Electrified
            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Electrified);

            //Add Watt's Electrified Payback
            EntityProperties.AddPayback(ElectricPayback);

            //Watt is a light source that fully lights any battle
            EntityProperties.AddAdditionalProperty(AdditionalProperty.LightSource, 10000d);

            LoadAnimations();
        }
コード例 #6
0
        public Pokey() : base(new Stats(11, 4, 0, 2, 0))
        {
            Name = "Pokey";

            AIBehavior = new PokeyAI(this);

            #region Entity Property Setup

            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Sleep, new StatusPropertyHolder(95, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Dizzy, new StatusPropertyHolder(80, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Confused, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Tiny, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Stop, new StatusPropertyHolder(80, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.DEFDown, new StatusPropertyHolder(95, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Burn, new StatusPropertyHolder(100, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Frozen, new StatusPropertyHolder(60, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Fright, new StatusPropertyHolder(100, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Blown, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.KO, new StatusPropertyHolder(100, 0));

            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);
            EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Constant, Enumerations.PhysicalAttributes.Spiked,
                                                                        Enumerations.Elements.Sharp, new Enumerations.ContactTypes[] { Enumerations.ContactTypes.Latch, Enumerations.ContactTypes.TopDirect, Enumerations.ContactTypes.SideDirect },
                                                                        new Enumerations.ContactProperties[] { Enumerations.ContactProperties.None },
                                                                        Enumerations.ContactResult.Failure, Enumerations.ContactResult.Failure, 1, null));

            EntityProperties.SetVulnerableDamageEffects(Enumerations.DamageEffects.RemovesSegment);

            #endregion

            LoadAnimations();

            SegmentTex = new CroppedTexture2D(AnimManager.SpriteSheet, new Rectangle(99, 38, 28, 23));

            SegmentBehavior = new PokeySegmentBehavior(this, 3, Enumerations.DamageEffects.RemovesSegment);

            //Add the visual segments
            for (int i = 0; i < SegmentBehavior.CurSegmentCount; i++)
            {
                VisualSegments.Add(SegmentTex);
            }
        }
コード例 #7
0
        public Pokey() : base(new Stats(11, 4, 0, 2, 0))
        {
            Name = "Pokey";

            AIBehavior = new GoombaAI(this);

            #region Entity Property Setup

            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Sleep, new StatusPropertyHolder(95, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Dizzy, new StatusPropertyHolder(80, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Confused, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Tiny, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Stop, new StatusPropertyHolder(80, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.DEFDown, new StatusPropertyHolder(95, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Burn, new StatusPropertyHolder(100, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Frozen, new StatusPropertyHolder(60, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Fright, new StatusPropertyHolder(100, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.Blown, new StatusPropertyHolder(90, 0));
            EntityProperties.AddStatusProperty(Enumerations.StatusTypes.KO, new StatusPropertyHolder(100, 0));

            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Spiked);
            EntityProperties.AddPayback(new StatusGlobals.PaybackHolder(StatusGlobals.PaybackTypes.Constant, Enumerations.PhysicalAttributes.Spiked,
                                                                        Enumerations.Elements.Sharp, new Enumerations.ContactTypes[] { Enumerations.ContactTypes.Latch, Enumerations.ContactTypes.TopDirect, Enumerations.ContactTypes.SideDirect },
                                                                        new Enumerations.ContactProperties[] { Enumerations.ContactProperties.None },
                                                                        Enumerations.ContactResult.Failure, Enumerations.ContactResult.Failure, 1, null));

            EntityProperties.SetVulnerableDamageEffects(Enumerations.DamageEffects.RemovesSegment);

            #endregion

            Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Enemies/Pokey.png");
            AnimManager.SetSpriteSheet(spriteSheet);

            AnimManager.AddAnimation(AnimationGlobals.IdleName, new ReverseAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                     new Animation.Frame(new Rectangle(33, 65, 30, 30), 200d),
                                                                                     new Animation.Frame(new Rectangle(97, 65, 30, 30), 200d),
                                                                                     new Animation.Frame(new Rectangle(65, 66, 30, 29), 200d, new Vector2(0, 1))));
            //AnimManager.AddAnimationChildFrame(AnimationGlobals.IdleName)
        }
コード例 #8
0
        public Watt() : base(new PartnerStats(PartnerGlobals.PartnerRanks.Normal, 50, 0, 0))
        {
            Name = "Watt";
            PartnerDescription = "";
            PartnerType        = Enumerations.PartnerTypes.Watt;

            ChangeHeightState(HeightStates.Airborne);

            //Watt is Electrified
            EntityProperties.AddPhysAttribute(Enumerations.PhysicalAttributes.Electrified);

            //Add Watt's Electrified Payback
            EntityProperties.AddPayback(ElectricPayback);

            //Watt is a light source that fully lights any battle
            EntityProperties.AddAdditionalProperty(AdditionalProperty.LightSource, 10000d);

            Texture2D spriteSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.SpriteRoot}/Characters/Watt.png");

            AnimManager.SetSpriteSheet(spriteSheet);

            AnimManager.AddAnimation(AnimationGlobals.IdleName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                  new Animation.Frame(new Rectangle(102, 149, 34, 33), 70d, new Vector2(0, 0)),
                                                                                  new Animation.Frame(new Rectangle(151, 149, 33, 34), 70d, new Vector2(0, 0)),
                                                                                  new Animation.Frame(new Rectangle(103, 230, 34, 31), 70d, new Vector2(-1, 1))));
            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.DangerName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                           new Animation.Frame(new Rectangle(102, 149, 34, 33), 70d, new Vector2(0, 0)),
                                                                                                           new Animation.Frame(new Rectangle(151, 149, 33, 34), 70d, new Vector2(0, 0)),
                                                                                                           new Animation.Frame(new Rectangle(103, 230, 34, 31), 70d, new Vector2(-1, 1))));

            AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(null,
                                                                              new Animation.Frame(new Rectangle(199, 189, 33, 34), 70d),
                                                                              new Animation.Frame(new Rectangle(6, 230, 36, 32), 70d, new Vector2(-2, 1)),
                                                                              new Animation.Frame(new Rectangle(53, 227, 36, 36), 70d, new Vector2(-1, -2))));
            AnimManager.AddAnimation(AnimationGlobals.SpikedTipHurtName, new Animation(null,
                                                                                       new Animation.Frame(new Rectangle(199, 189, 33, 34), 70d),
                                                                                       new Animation.Frame(new Rectangle(6, 230, 36, 32), 70d, new Vector2(-2, 1)),
                                                                                       new Animation.Frame(new Rectangle(53, 227, 36, 36), 70d, new Vector2(-1, -2))));

            AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(null,
                                                                               new Animation.Frame(new Rectangle(6, 230, 36, 32), 1000d, new Vector2(-2, 1))));

            AnimManager.AddAnimation(AnimationGlobals.RunningName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                     new Animation.Frame(new Rectangle(102, 149, 34, 33), 50d),
                                                                                     new Animation.Frame(new Rectangle(151, 149, 33, 34), 50d),
                                                                                     new Animation.Frame(new Rectangle(103, 230, 34, 31), 50d, new Vector2(-1, 1))));

            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.ChoosingActionName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                                   new Animation.Frame(new Rectangle(7, 269, 33, 34), 70d),
                                                                                                                   new Animation.Frame(new Rectangle(150, 229, 34, 33), 70d),
                                                                                                                   new Animation.Frame(new Rectangle(55, 270, 34, 31), 70d, new Vector2(-1, 1))));
            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.DangerChoosingActionName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                                         new Animation.Frame(new Rectangle(7, 269, 33, 34), 70d),
                                                                                                                         new Animation.Frame(new Rectangle(150, 229, 34, 33), 70d),
                                                                                                                         new Animation.Frame(new Rectangle(55, 270, 34, 31), 70d, new Vector2(-1, 1))));

            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.DizzyName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                          new Animation.Frame(new Rectangle(103, 112, 34, 28), 70d),
                                                                                                          new Animation.Frame(new Rectangle(199, 111, 33, 31), 70d, new Vector2(1, -1)),
                                                                                                          new Animation.Frame(new Rectangle(7, 152, 34, 28), 70d),
                                                                                                          new Animation.Frame(new Rectangle(150, 111, 34, 30), 70d, new Vector2(1, -1))));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.ConfusedName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                             new Animation.Frame(new Rectangle(103, 112, 34, 28), 70d),
                                                                                                             new Animation.Frame(new Rectangle(199, 111, 33, 31), 70d, new Vector2(1, -1)),
                                                                                                             new Animation.Frame(new Rectangle(7, 152, 34, 28), 70d),
                                                                                                             new Animation.Frame(new Rectangle(150, 111, 34, 30), 70d, new Vector2(1, -1))));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.InjuredName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                            new Animation.Frame(new Rectangle(103, 112, 34, 28), 70d),
                                                                                                            new Animation.Frame(new Rectangle(199, 111, 33, 31), 70d, new Vector2(1, -1)),
                                                                                                            new Animation.Frame(new Rectangle(7, 152, 34, 28), 70d),
                                                                                                            new Animation.Frame(new Rectangle(150, 111, 34, 30), 70d, new Vector2(1, -1))));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.SleepName, new LoopAnimation(null, AnimationGlobals.InfiniteLoop,
                                                                                                          new Animation.Frame(new Rectangle(199, 230, 34, 31), 150d),
                                                                                                          new Animation.Frame(new Rectangle(150, 189, 34, 33), 150d, new Vector2(1, -1))));
        }