Пример #1
0
        private void UnFlip()
        {
            Flipped = false;
            AnimManager.PlayAnimation(GetIdleAnim(), true);

            int immobile = EntityProperties.GetAdditionalProperty <int>(Enumerations.AdditionalProperty.Immobile) - 1;

            EntityProperties.RemoveAdditionalProperty(Enumerations.AdditionalProperty.Immobile);
            if (immobile > 0)
            {
                EntityProperties.AddAdditionalProperty(Enumerations.AdditionalProperty.Immobile, immobile);
            }

            //Raise defense again after unflipping
            RaiseDefense(DefenseLoss);

            ElapsedFlippedTurns = 0;
        }
Пример #2
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);

            LoadAnimations();
        }
Пример #3
0
        public void HandleFlipped()
        {
            if (Flipped == false)
            {
                int immobile = EntityProperties.GetAdditionalProperty <int>(Enumerations.AdditionalProperty.Immobile) + 1;
                EntityProperties.AddAdditionalProperty(Enumerations.AdditionalProperty.Immobile, immobile);

                //Lower defense by an amount when flipped
                LowerDefense(DefenseLoss);
            }

            Flipped = true;

            //Don't play this animation if dead
            if (IsDead == false)
            {
                BattleEventManager.Instance.QueueBattleEvent((int)BattleGlobals.StartEventPriorities.Damage - 2,
                                                             new BattleManager.BattleState[] { BattleManager.BattleState.Turn, BattleManager.BattleState.TurnEnd },
                                                             new PlayAnimBattleEvent(this, GetIdleAnim(), false));
            }

            //Getting hit again while flipped refreshes the flip timer
            ElapsedFlippedTurns = 0;
        }
Пример #4
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))));
        }