private static Expression RushCondition(PlayerExporter exporter, NormalSkill skill)
 {
     if (skill.IsRushSkill)
     {
         var skillActionID = skill.ActionID;
         var indexes       = exporter.Skills
                             .Where(s => s is NormalSkill)
                             .Select(s => (NormalSkill)s)
                             .Where(s => s.RushCancel == skillActionID)
                             .Select(s =>
                                     new BiOpExpr(ThisExpr.Instance.MakeIndex("motion"),
                                                  new BiOpExpr(ThisExpr.Instance.MakeIndex("u").MakeIndex("CA"),
                                                               new ConstNumberExpr(exporter.GetActionID(s.ActionID)), BiOpExpr.Op.Add),
                                                  BiOpExpr.Op.Equal))
                             .ToArray();
         return(ExpressionExt.OrAll(indexes));
     }
     return(new ConstNumberExpr(1));
 }
        private static ILineObject GenerateNormalSkill(PlayerExporter exporter, bool isFirst, NormalSkill skill, string name)
        {
            var u         = ThisExpr.Instance.MakeIndex("u");
            var condition = ExpressionExt.AndAll(
                KeyCondition(skill.Key),
                CancelLevelCondition(skill.CancelLevel),
                AirCondition(skill.AirState),
                XCondition(skill.X),
                YCondition(skill.Y),
                MagicCondition(skill.MagicUse),
                RushCondition(exporter, skill));

            return(new ControlBlock(isFirst ? ControlBlockType.If : ControlBlockType.ElseIf,
                                    condition, new ILineObject[] {
                u.MakeIndex("InputReset").MakeIndex("call").Call(ThisExpr.Instance).Statement(),
                u.MakeIndex(name).MakeIndex("call").Call(ThisExpr.Instance).Statement(),
            }).Statement());
        }