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; } }
protected override void SequenceStartBranch() { switch (SequenceStep) { case 0: SwapPartnerBattleEvent swapPartnerBattleEvent = new SwapPartnerBattleEvent(User.BManager.Partner, NewPartner, 300d, 300d); User.BManager.battleEventManager.QueueBattleEvent((int)BattleGlobals.BattleEventPriorities.SwapPartner, new BattleGlobals.BattleState[] { BattleGlobals.BattleState.Turn }, swapPartnerBattleEvent); CurSequenceAction = new WaitForBattleEventSeqAction(swapPartnerBattleEvent); ChangeSequenceBranch(SequenceBranch.End); break; default: PrintInvalidSequence(); break; } }