Exemplo n.º 1
0
        /// <summary>
        /// Removes the Duplighost's disguise.
        /// <para>If it's already disguised, make sure to remove its disguise first before disguising as something else.</para>
        /// </summary>
        public void RemoveDisguise()
        {
            //If the Duplighost isn't disguised, there's no disguise to remove
            if (IsDisguised == false)
            {
                return;
            }

            //Revert back to original Defense and attributes
            //NOTE: We may want to copy attributes and defense back...it's hard to tell with all the modifications that could be made, though
            //This normally isn't a problem because Partners can't be inflicted with Status Effects (barring Injured) or anything else in PM
            BattleStats.BaseDefense = 0;

            //Change back to Grounded if not Grounded
            if (HeightState != HeightStates.Grounded)
            {
                ChangeHeightState(HeightStates.Grounded);

                //Move the Duplighost back down
                SetBattlePosition(BattlePosition + new Vector2(0f, BattleManager.Instance.AirborneY));
                if (PreviousAction?.MoveSequence.InSequence == false)
                {
                    Position = BattlePosition;
                }
            }

            if (PartnerTypeDisguise == PartnerTypes.Watt)
            {
                //If it copied Watt, remove Electrified, its light source, and its Payback
                EntityProperties.RemovePhysAttribute(PhysicalAttributes.Electrified);
                EntityProperties.RemoveAdditionalProperty(AdditionalProperty.LightSource);
            }

            //Remove any Payback it obtained, if it had any
            if (PaybackCopied != null)
            {
                EntityProperties.RemovePayback(PaybackCopied.Value);
                PaybackCopied = null;
            }

            //Clean up its Flippable behavior if it copied a shelled Partner
            if (FlippableBehavior != null)
            {
                if (FlippableBehavior.Flipped == true)
                {
                    FlippableBehavior.UnFlip();
                }
                FlippableBehavior.CleanUp();
                FlippableBehavior = null;
            }

            PartnerTypeDisguise = PartnerTypes.None;

            //Make the Duplighost copy back its original animations
            CopyEntityAnimations(OrigAnimations);
            AnimManager.PlayAnimation(GetIdleAnim());
        }
Exemplo n.º 2
0
        public Kooper() : base(new PartnerStats(PartnerGlobals.PartnerRanks.Normal, 50, 0, 1))
        {
            Name = "Kooper";
            PartnerDescription = "He can throw his shell at enemies!";
            PartnerType        = Enumerations.PartnerTypes.Kooper;

            //As Kooper is a Koopa, he can be flipped
            EntityProperties.SetVulnerableDamageEffects(Enumerations.DamageEffects.FlipsShelled | Enumerations.DamageEffects.FlipsClefts);

            FlippedBehavior = new KoopaFlippedBehavior(this, 2, EntityProperties.GetVulnerableDamageEffects(), BattleStats.BaseDefense);

            LoadAnimations();
        }
Exemplo n.º 3
0
        public Kooper() : base(new PartnerStats(PartnerGlobals.PartnerRanks.Normal, 50, 0, 1))
        {
            Name = "Kooper";
            PartnerDescription = "He can throw his shell at enemies!";
            PartnerType        = Enumerations.PartnerTypes.Kooper;

            //As Kooper is a Koopa, he can be flipped
            EntityProperties.SetVulnerableDamageEffects(Enumerations.DamageEffects.FlipsShelled | Enumerations.DamageEffects.FlipsClefts);

            FlippedBehavior = new KoopaFlippedBehavior(this, 2, EntityProperties.GetVulnerableDamageEffects(), BattleStats.BaseDefense);

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

            AnimManager.SetSpriteSheet(spriteSheet);

            AnimManager.AddAnimation(AnimationGlobals.IdleName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 117, 30, 50), 1000d)));
            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.DangerName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 117, 30, 50), 1000d)));

            AnimManager.AddAnimation(AnimationGlobals.HurtName, new Animation(spriteSheet,
                                                                              new Animation.Frame(new Rectangle(4, 170, 42, 45), 500d),
                                                                              new Animation.Frame(new Rectangle(52, 173, 41, 42), 500d)));
            AnimManager.AddAnimation(AnimationGlobals.DeathName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(52, 173, 41, 42), 1000d)));

            AnimManager.AddAnimation(AnimationGlobals.RunningName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                     new Animation.Frame(new Rectangle(97, 117, 30, 50), 100d),
                                                                                     new Animation.Frame(new Rectangle(89, 3, 34, 48), 100d)));

            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.ChoosingActionName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(225, 117, 30, 50), 1000d)));
            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.DangerChoosingActionName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(225, 117, 30, 50), 1000d)));

            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.StarSpecialName, new Animation(spriteSheet,
                                                                                                            new Animation.Frame(new Rectangle(233, 60, 34, 51), 700d)));
            AnimManager.AddAnimation(AnimationGlobals.PlayerBattleAnimations.StarWishName, new Animation(spriteSheet,
                                                                                                         new Animation.Frame(new Rectangle(193, 62, 30, 49), 700d)));

            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.DizzyName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 117, 30, 50), 1000d)));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.ConfusedName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 117, 30, 50), 1000d)));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.SleepName, new Animation(spriteSheet, new Animation.Frame(new Rectangle(97, 117, 30, 50), 1000d)));
            AnimManager.AddAnimation(AnimationGlobals.StatusBattleAnimations.InjuredName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                                            new Animation.Frame(new Rectangle(4, 170, 42, 45), 500d),
                                                                                                            new Animation.Frame(new Rectangle(52, 173, 41, 42), 500d)));

            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.ShellSpinName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                                               new Animation.Frame(new Rectangle(162, 222, 28, 25), 250d),
                                                                                                               new Animation.Frame(new Rectangle(194, 222, 28, 25), 250d),
                                                                                                               new Animation.Frame(new Rectangle(225, 222, 30, 25), 250d),
                                                                                                               new Animation.Frame(new Rectangle(258, 222, 28, 25), 250d)));
            AnimManager.AddAnimation(AnimationGlobals.ShelledBattleAnimations.FlippedName, new LoopAnimation(spriteSheet, AnimationGlobals.InfiniteLoop,
                                                                                                             new Animation.Frame(new Rectangle(69, 221, 53, 26), 350d),
                                                                                                             new Animation.Frame(new Rectangle(5, 218, 54, 28), 350d)));
        }
 protected virtual void SetFlippedBehavior()
 {
     FlippedBehavior = new KoopaFlippedBehavior(this, 2, EntityProperties.GetVulnerableDamageEffects(), BattleStats.BaseDefense);
 }