Exemplo n.º 1
0
        public override List <SceneAnimation> ExecuteEffect(EffectScript Script)
        {
            //Animations = new List<SceneAnimation>();
            //AnimationStack.Add(Animations);

            CurrentFrame = Frames.Last();
            CurrentFrame.UseFrame();

            if (!(Element == CreatureElement.EARTH && Opponent.NotEffectedByEarth.Evaluate()))
            {
                List <byte> Memory = Script.Script;
                for (int i = 0; i < Memory.Count; i++)
                {
                    OP_Decode[Memory[i] >> 4]((byte)(Memory[i] & 0x0F))();
                }
            }

            /*AnimationStack.Remove(Animations);
             *          List<SceneAnimation> Finished = Animations;
             *          if (AnimationStack.Count > 0) {
             *                  Animations = AnimationStack.Last();
             *          } else {
             *                  AnimationStack.Clear();
             *                  Animations = null;
             *          }*/

            Frames.Remove(CurrentFrame);
            List <SceneAnimation> Finished = Animations;

            if (Frames.Count > 0)
            {
                CurrentFrame = Frames.Last();
                CurrentFrame.UseFrame();
            }
            else
            {
                Frames.Clear();
                CurrentFrame = null;
            }

            return(Finished);
        }
Exemplo n.º 2
0
        public override void SetNewFrame(BattleEffect Effect, Player User, Player Opponent, Player Trigger, byte TriggerPosition)
        {
            InterpreterFrame Frame = new InterpreterFrame(this, Effect, User, Opponent, Trigger, TriggerPosition);

            Frames.Add(Frame);
        }