protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                SegmentTexUI        = new UICroppedTexture2D(SegmentTex);
                SegmentTexUI.Origin = new Vector2(.5f, .5f);

                User.BManager.battleUIManager.AddUIElement(SegmentTexUI);

                //Start it out being underneath, where the segment would be
                SegmentTexUI.Position = Camera.Instance.SpriteToUIPos(User.Position + new Vector2(0f, SegmentTex.SourceRect.Value.Height * SegmentBehavior.CurSegmentCount));

                //Remove a segment
                SegmentBehavior.HandleSegmentRemoved(1);

                //Move the segment above the user's head
                CurSequenceAction = new MoveToSeqAction(SegmentTexUI, Camera.Instance.SpriteToUIPos(User.GetDrawnPosAbove(new Vector2(0f, -SegmentTex.SourceRect.Value.Height))),
                                                        UpMoveTime, Interpolation.InterpolationTypes.Linear, Interpolation.InterpolationTypes.CubicInOut);

                break;

            case 1:
                //Wait a little bit
                CurSequenceAction = new WaitSeqAction(WaitTime);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #2
0
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //NOTE: Mario moves up a bit when he's in the front, I haven't confirmed how it works in the back yet

                User.AnimManager.PlayAnimation(AnimationGlobals.RunningName);
                CurSequenceAction = new MoveToSeqAction(User.BattlePosition, WalkDuration);
                break;

            case 1:
                //NOTE: Show all Crystal Stars coming from the map with VFX and such

                User.AnimManager.PlayAnimation(AnimationGlobals.MarioBattleAnimations.MapLiftName);
                CurSequenceAction = new WaitSeqAction(WaitTime);
                break;

            case 2:
                User.AnimManager.PlayAnimation(User.GetIdleAnim());
                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Remove evasion and other properties
                BattleEntity allyAffected = EntitiesAffected[0];

                User.RemoveEvasionMod(0d);
                allyAffected.RemoveEvasionMod(0d);

                //Remove Effects suppression from the Poison, Burn, and Frozen Status Effects
                User.EntityProperties.UnsuppressStatuses(Enumerations.StatusSuppressionTypes.Effects, Enumerations.StatusTypes.Poison, Enumerations.StatusTypes.Burn, Enumerations.StatusTypes.Frozen);
                allyAffected.EntityProperties.UnsuppressStatuses(Enumerations.StatusSuppressionTypes.Effects, Enumerations.StatusTypes.Poison, Enumerations.StatusTypes.Burn, Enumerations.StatusTypes.Frozen);

                //Make them visible
                User.Scale         /= ScaleVal;
                allyAffected.Scale /= ScaleVal;

                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                CurSequenceAction = new MoveToSeqAction(new Vector2(EntitiesAffected[0].BattlePosition.X, User.Position.Y), 200d);
                break;

            case 1:
                InteractionResult[] result = AttemptDamage(Action.DamageProperties.Damage, EntitiesAffected[0], Action.DamageProperties, false);

                if (result[0] != null && result[0].WasVictimHit == true)
                {
                    ShowCommandRankVFX(HighestCommandRank, EntitiesAffected[0].Position);
                }

                CurSequenceAction = new WaitSeqAction(0d);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttName);
                CurSequenceAction = new MoveToSeqAction(User, new Vector2(EntitiesAffected[0].Position.X, EntitiesAffected[0].Position.Y + YHeight), MoveDur);
                break;

            case 1:
                AttemptDamage(Action.DamageProperties.Damage, EntitiesAffected[0], Action.DamageProperties, false);

                Vector2 pos = BattleManagerUtils.GetPositionInFront(EntitiesAffected[0], User.EntityType == Enumerations.EntityTypes.Player);
                CurSequenceAction = new MoveToSeqAction(User, pos, MoveDur / 2d, Interpolation.InterpolationTypes.Linear, Interpolation.InterpolationTypes.QuadIn);
                break;

            case 2:
                User.AnimManager.PlayAnimation(AnimationGlobals.IdleName);

                CurSequenceAction = new WaitSeqAction(WaitDur / 5d);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #6
0
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Remove evasion and other properties
                BattleEntity allyAffected = EntitiesAffected[0];

                User.RemoveEvasionMod(0d);
                allyAffected.RemoveEvasionMod(0d);

                //Remove Invincibility
                User.EntityProperties.RemoveAdditionalProperty(Enumerations.AdditionalProperty.Invincible);
                allyAffected.EntityProperties.RemoveAdditionalProperty(Enumerations.AdditionalProperty.Invincible);

                //Make them visible
                User.TintColor         = Color.White;
                allyAffected.TintColor = Color.White;

                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceFailedBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Play the wink animation, add the heart (and particles at a later time), and play the sound
                User.AnimManager.PlayAnimation(AnimationGlobals.GoombellaBattleAnimations.WinkName, true);

                CurSequenceAction = new WaitForAnimationSeqAction(AnimationGlobals.GoombellaBattleAnimations.WinkName);
                break;

            case 1:
                //Wait a little bit
                CurSequenceAction = new WaitSeqAction(WaitDur);
                break;

            case 2:
                //Deal 0 damage to show the move wasn't effective
                AttemptDamage(0, EntitiesAffected[0], Action.DamageProperties, true);

                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMissBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.RunningName);

                //When Watt misses Electro Dash, she goes in a downwards arc to around where the next enemy slot would be
                Vector2 destPos = BattleManager.Instance.GetPositionInFront(EntitiesAffected[0], EntitiesAffected[0].EntityType == Enumerations.EntityTypes.Player);
                Vector2 curDest = User.Position + new Vector2(UtilityGlobals.DifferenceDivided(destPos.X, User.Position.X, 2f), MissHeight);

                CurSequenceAction = new MoveToSeqAction(curDest, MissMoveDur, Interpolation.InterpolationTypes.Linear, Interpolation.InterpolationTypes.QuadOut);
                break;

            case 1:
                destPos = BattleManager.Instance.GetPositionInFront(EntitiesAffected[0], EntitiesAffected[0].EntityType == Enumerations.EntityTypes.Player);
                curDest = User.Position + new Vector2(UtilityGlobals.DifferenceDivided(destPos.X, User.Position.X, 2f), -MissHeight);

                CurSequenceAction = new MoveToSeqAction(curDest, MissMoveDur, Interpolation.InterpolationTypes.Linear, Interpolation.InterpolationTypes.QuadIn);
                break;

            case 2:
                User.AnimManager.PlayAnimation(AnimationGlobals.IdleName);

                CurSequenceAction = new WaitSeqAction(MissWaitDur);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                CurSequenceAction = new WaitSeqAction(EndWaitTime);
                break;

            case 1:
                //It's a success, so we know there was at least one boost
                for (int i = 0; i < EntitiesAffected.Length; i++)
                {
                    BattleEntity entity = EntitiesAffected[i];

                    //Inflict POWUp if we have Attack boosted
                    if (Response.AttackBoosted > 0)
                    {
                        entity.EntityProperties.AfflictStatus(new POWUpStatus(Response.AttackBoosted, TurnsBoosted), true);
                    }

                    //Inflict DEFUp if we have Defense boosted
                    if (Response.DefenseBoosted > 0)
                    {
                        entity.EntityProperties.AfflictStatus(new DEFUpStatus(Response.DefenseBoosted, TurnsBoosted), true);
                    }
                }
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Remove the evasion mod and turn transparency back to normal
                //NOTE: Find a way to get the original transparency (Ex. Invisible causes additional transparency)
                BattleEntity allyAffected = EntitiesAffected[0];
                User.RemoveEvasionMod(0d);
                allyAffected.RemoveEvasionMod(0d);

                //Turn transparency back
                User.TintColor         = Color.White;
                allyAffected.TintColor = Color.White;

                //Make the ally play its idle animation
                allyAffected.AnimManager.PlayAnimation(EntitiesAffected[0].GetIdleAnim());

                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #11
0
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //NOTE: Mario moves up a tiny bit when he's in the front, I haven't confirmed how it works in the back yet

                User.AnimManager.PlayAnimation(AnimationGlobals.RunningName);
                CurSequenceAction = new MoveToSeqAction(User.BattlePosition, WalkDuration);
                break;

            case 1:
                User.AnimManager.PlayAnimation(AnimationGlobals.PlayerBattleAnimations.StarSpecialName);
                CurSequenceAction = new WaitSeqAction(WaitTime);
                break;

            case 2:
                User.AnimManager.PlayAnimation(AnimationGlobals.PlayerBattleAnimations.StarWishName);
                //NOTE: Show Star Spirit appearing and VFX and such
                CurSequenceAction = new WaitSeqAction(WaitTime);
                break;

            case 3:
                User.AnimManager.PlayAnimation(User.GetIdleAnim());
                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #12
0
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                StartActionCommandInput();
                CurSequenceAction = new WaitForCommandSeqAction(10000d, actionCommand, CommandEnabled);
                break;

            case 1:
                CurSequenceAction = new WaitSeqAction(EggWait);
                break;

            default:
                //If there are no more eggs to throw, switch to the end
                if (EggsToThrow <= 0)
                {
                    ChangeSequenceBranch(SequenceBranch.End);
                }
                else
                {
                    //Throw an egg, then wait
                    ThrowEgg();
                    EggsToThrow--;

                    CurSequenceAction = new WaitSeqAction(500d);
                }

                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            //Base behavior:
            //1. Heal (if the item heals)
            //2. Deal Damage (if the item deals damage)
            //3. End
            switch (SequenceStep)
            {
            case 0:
                if (Action.Heals == true)
                {
                    PerformHeal(Action.HealingInfo.Value, EntitiesAffected);
                    CurSequenceAction = new WaitSeqAction(WaitDuration);
                }
                break;

            case 1:
                if (Action.DealsDamage == true)
                {
                    AttemptDamage(BaseDamage, EntitiesAffected, Action.DamageProperties, true);
                    CurSequenceAction = new WaitSeqAction(WaitDuration);
                }
                break;

            case 2:
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Play the wink animation, add the heart (and particles at a later time), play the sound, and show the Command Rank result
                User.AnimManager.PlayAnimation(AnimationGlobals.GoombellaBattleAnimations.WinkName, true);

                if (HighestCommandRank != ActionCommand.CommandRank.None)
                {
                    ShowCommandRankVFX(HighestCommandRank, EntitiesAffected[0].Position);
                }

                BattleObjManager.Instance.AddBattleObject(HeartVFX);
                EntitiesAffected[0].AnimManager.PlayAnimation(AnimationGlobals.PlayerBattleAnimations.StarSpecialName);

                CurSequenceAction = new WaitForAnimationSeqAction(AnimationGlobals.GoombellaBattleAnimations.WinkName);
                break;

            case 1:
                //Wait a little bit
                CurSequenceAction = new WaitSeqAction(WaitDur);
                break;

            case 2:
                //Subtract the used turn count by one to give another turn
                //This shouldn't work if the entity is immobile in some way (Ex. Stop, Frozen, etc.), so check for it first
                if (EntitiesAffected[0].MaxTurns > 0)
                {
                    EntitiesAffected[0].SetTurnsUsed(EntitiesAffected[0].TurnsUsed - 1);
                }

                MessageBattleEvent msgEvent = new MessageBattleEvent(SuccessMessage, 2000d);

                //Show the message
                BattleManager.Instance.battleEventManager.QueueBattleEvent((int)BattleGlobals.BattleEventPriorities.Message,
                                                                           new BattleManager.BattleState[] { BattleManager.BattleState.Turn }, msgEvent);

                CurSequenceAction = new WaitForBattleEventSeqAction(msgEvent);
                break;

            case 3:
                EntitiesAffected[0].AnimManager.PlayAnimation(EntitiesAffected[0].GetIdleAnim());
                HeartVFX.FadeOut();
                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #15
0
        /// <summary>
        /// Handles anything that needs to be done directly after updating the sequence.
        /// This is where it jumps to a new branch, if it should.
        /// </summary>
        protected void PostUpdate()
        {
            if (InSequence == true && JumpToBranch != SequenceBranch.None)
            {
                //Change the sequence action itself to cancel out anything that it will be waiting for to finish
                //We don't end the previous sequence action because it has been interrupted by the new branch
                CurSequenceAction = new WaitSeqAction(0d);
                ChangeSequenceBranch(JumpToBranch);

                ChangeJumpBranch(SequenceBranch.None);
            }
        }
예제 #16
0
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                if (SecondPart == false)
                {
                    base.SequenceSuccessBranch();

                    //Stop targeting the current targets. If it's a Winged entity, it won't be airborne anymore and thus
                    //won't take damage from the second part of the attack
                    for (int i = 0; i < CurTargets.Length; i++)
                    {
                        CurTargets[i].StopTarget();
                    }

                    SecondPart = true;
                    ChangeSequenceBranch(SequenceBranch.Main);
                }
                else
                {
                    CurSequenceAction = new WaitSeqAction(WaitTime);
                }
                break;

            case 1:
                int        aerialDamage     = BaseDamage;
                DamageData aerialDamageInfo = Action.DamageProperties;

                //Make sure the action used for this sequence is Tornado Jump
                //If not, default to base damage and base targets
                if (TJAction != null)
                {
                    aerialDamage     = TJAction.AerialDamage.Damage;
                    aerialDamageInfo = TJAction.AerialDamage;
                }
                else
                {
                    Debug.LogWarning($"{Action.Name} is not of type {nameof(TornadoJump)} in {nameof(TornadoJumpSequence)}!");
                }

                AttemptDamage(aerialDamage, CurTargets, aerialDamageInfo, true);

                CurSequenceAction = new MoveAmountSeqAction(new Vector2(0f, JumpHeight), JumpDuration);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Wait a bit
                CurSequenceAction = new WaitSeqAction(300d);
                break;

            case 1:
                //Deal damage
                InteractionResult[] interactions = AttemptDamage(BaseDamage, EntitiesAffected[0], Action.DamageProperties, false);

                //Switch only if the victim was hit, damage was greater than 0, and the victim didn't perform any defensive actions
                if (interactions[0] != null && interactions[0].WasVictimHit == true &&
                    interactions[0].VictimResult.TotalDamage > 0 &&
                    interactions[0].VictimResult.DefensiveActionsPerformed == Enumerations.DefensiveActionTypes.None)
                {
                    //Find a Partner to swap to
                    List <BattlePartner> allPartners = new List <BattlePartner>();
                    Inventory.Instance.partnerInventory.GetAllPartners(allPartners);

                    //Remove the current Partner from being selected
                    allPartners.Remove(User.BManager.Partner);

                    //Filter out all dead Partners
                    BattleManagerUtils.FilterDeadEntities(allPartners);

                    //If there's another Partner available, choose it
                    if (allPartners.Count != 0)
                    {
                        int randIndex = RandomGlobals.Randomizer.Next(0, allPartners.Count);

                        SwapPartnerBattleEvent swapPartnerBattleEvent = new SwapPartnerBattleEvent(User.BManager.Partner, allPartners[randIndex],
                                                                                                   300d, 300d);
                        User.BManager.battleEventManager.QueueBattleEvent((int)BattleGlobals.BattleEventPriorities.SwapPartner,
                                                                          new BattleGlobals.BattleState[] { BattleGlobals.BattleState.Turn },
                                                                          swapPartnerBattleEvent);
                    }
                }

                CurSequenceAction = new WaitSeqAction(0d);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMissBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                CurSequenceAction = new WaitSeqAction(0d);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.DuplighostBattleAnimations.HeadbuttStartName);
                CurSequenceAction = new WaitSeqAction(WaitDur);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.RunningName);
                CurSequenceAction = new WaitSeqAction(StartWaitDur);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #21
0
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Move down
                //NOTE: Move the ally as well - this needs to be added in
                CurSequenceAction = new MoveToSeqAction(EntityUsing.Position + new Vector2(0f, 25f), MoveTime);

                break;

            case 1:
                //Make them invisible
                //NOTE: We need to change this to scale down the characters to almost 0, as that is how it works in the actual game
                EntityUsing.TintColor  = Color.White * 0f;
                AllyAffected.TintColor = Color.White * 0f;

                //Add evasion so attacks against these entities always miss
                EntityUsing.AddEvasionMod(0d);
                AllyAffected.AddEvasionMod(0d);

                //NOTE: Add Invincibility to prevent both from taking damage from Status Effects
                //This doesn't seem ideal, but it's the only way we can do this right now
                EntityUsing.EntityProperties.AddAdditionalProperty(Enumerations.AdditionalProperty.Invincible, true);
                AllyAffected.EntityProperties.AddAdditionalProperty(Enumerations.AdditionalProperty.Invincible, true);

                CurSequenceAction = new WaitSeqAction(0d);
                break;

            case 2:
                //Set up the entities for the second phase of the move
                EntityUsing.TurnStartEvent -= OnUserTurnStart;
                EntityUsing.TurnStartEvent += OnUserTurnStart;

                //Skip the ally's turns until the user comes back up
                AllyAffected.TurnStartEvent -= AllyAffectedTurnStartHandler;
                AllyAffected.TurnStartEvent += AllyAffectedTurnStartHandler;

                //Go to the end of the sequence
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMissBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.IdleName);

                CurSequenceAction = new WaitSeqAction(MissWaitDur);

                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Make the entity assume the Guard position and wait for the animation for now (spinning will occur later)
                EntityUsing.AnimManager.PlayAnimation(AnimationGlobals.PlayerBattleAnimations.GuardName);
                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.Main);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #24
0
        protected override void SequenceSuccessBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Move down
                //NOTE: Move the ally as well - this needs to be added in
                CurSequenceAction = new MoveToSeqAction(User, EntityUsing.Position + new Vector2(0f, 25f), MoveTime);

                break;

            case 1:
                //Scale down the characters to almost 0; that is how it works in the actual game
                EntityUsing.Scale  *= ScaleVal;
                AllyAffected.Scale *= ScaleVal;

                //Add evasion so attacks against these entities always miss
                EntityUsing.AddEvasionMod(0d);
                AllyAffected.AddEvasionMod(0d);

                //Add Effects suppression to the Poison, Burn, and Frozen Status Effects
                EntityUsing.EntityProperties.SuppressStatuses(Enumerations.StatusSuppressionTypes.Effects, Enumerations.StatusTypes.Poison, Enumerations.StatusTypes.Burn, Enumerations.StatusTypes.Frozen);
                AllyAffected.EntityProperties.SuppressStatuses(Enumerations.StatusSuppressionTypes.Effects, Enumerations.StatusTypes.Poison, Enumerations.StatusTypes.Burn, Enumerations.StatusTypes.Frozen);

                CurSequenceAction = new WaitSeqAction(0d);
                break;

            case 2:
                //Set up the entities for the second phase of the move
                EntityUsing.TurnStartEvent -= OnUserTurnStart;
                EntityUsing.TurnStartEvent += OnUserTurnStart;

                //Skip the ally's turns until the user comes back up
                AllyAffected.TurnStartEvent -= AllyAffectedTurnStartHandler;
                AllyAffected.TurnStartEvent += AllyAffectedTurnStartHandler;

                //Go to the end of the sequence
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #25
0
        protected override void SequenceEndBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(User.GetIdleAnim());
                CurSequenceAction = new WaitSeqAction(EndWait);
                break;

            case 1:
                EndSequence();
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                CurSequenceAction = new WaitSeqAction(300d);
                break;

            case 1:
                BattleManager.Instance.SwapPartner(NewPartner);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //Fling the segment at the target
                CurSequenceAction = new MoveToSeqAction(SegmentTexUI, Camera.Instance.SpriteToUIPos(EntitiesAffected[0].Position), FlingTime);
                break;

            case 1:
                //Attempt damage
                InteractionResult[] interactionResult = AttemptDamage(BaseDamage, EntitiesAffected[0], Action.DamageProperties, false);

                //If the victim Superguarded, we need to reflect the segment back at the attacker and damage it
                //If the victim didn't Superguard, move on to the End branch
                if (UtilityGlobals.DefensiveActionTypesHasFlag(interactionResult[0].VictimResult.DefensiveActionsPerformed,
                                                               Enumerations.DefensiveActionTypes.Superguard) == false)
                {
                    ChangeSequenceBranch(SequenceBranch.End);
                }

                CurSequenceAction = new WaitSeqAction(0d);
                break;

            case 2:
                //Fling the segment back to the attacker
                CurSequenceAction = new MoveToSeqAction(SegmentTexUI, Camera.Instance.SpriteToUIPos(User.Position), FlingTime);

                break;

            case 3:
                //Damage the attacker then move onto the end of the sequence
                AttemptDamage(BaseDamage, User, Action.DamageProperties, false);

                CurSequenceAction = new WaitSeqAction(0d);

                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceStartBranch()
        {
            //Have the entity move back and forth quickly for a bit
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.RunningName);
                CurSequenceAction = new WaitSeqAction(0d);
                break;

            case 1:
                CurSequenceAction = new MoveToSeqAction(User.BattlePosition - new Vector2(10, 0), 100d);
                break;

            case 2:
                CurSequenceAction = new MoveToSeqAction(User.BattlePosition, 100d);
                break;

            case 3:
                CurSequenceAction = new MoveToSeqAction(User.BattlePosition + new Vector2(10, 0), 100d);
                break;

            case 4:
                goto case 2;

            case 5:
                goto case 1;

            case 6:
                goto case 2;

            case 7:
                goto case 3;

            case 8:
                ChangeSequenceBranch(SequenceBranch.Main);
                goto case 2;

            default:
                PrintInvalidSequence();
                break;
            }
        }
        protected override void SequenceMainBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                //NOTE: For now simply choose a random item and exclude the roulette until we get this working
                int randItemIndex = GeneralGlobals.Randomizer.Next(0, MysteryItemSet.Count);
                ItemChosen = MysteryItemSet[randItemIndex];

                Debug.Log($"Chose {ItemChosen.Name} to use for the Mystery!");
                CurSequenceAction = new WaitSeqAction(0d);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }
예제 #30
0
        protected override void SequenceFailedBranch()
        {
            switch (SequenceStep)
            {
            case 0:
                User.AnimManager.PlayAnimation(AnimationGlobals.JumpLandName);
                CurSequenceAction = new WaitSeqAction(JumpLandDuration);
                break;

            case 1:
                AttemptDamage(DamageDealt, CurTarget, Action.DamageProperties, false);
                ChangeSequenceBranch(SequenceBranch.End);
                break;

            default:
                PrintInvalidSequence();
                break;
            }
        }