[State -1, Jump Light Punch]
type = ChangeState
value = 40007
triggerall = !var(59) <= 0
triggerall = command = "x"
trigger1 = statetype = A && (ctrl || stateno = 40006) ;; nope
I'm assuming 40006 is your flying state, but this trigger is incorrect. If statetype is A and you have ctrl, then you're jumping. Wrong. Don't allow flying attacks to function when jumping. Don't allow jumping attacks to work when flying.
Have a triggerall that checks for the flying variable. Pretty sure I saw one in there somewhere. Every single attack in your CMD file should be checking for flight and only working one way or the other.
Trigger1 should just be something like "trigger1 = stateno = 40006". If you want this attack to work in combos or be spammable, make more triggers to add that function. If you have different states for moving around when flying, add those to your trigger as well.
I don't know what you're using var(59) for, but that whole trigger looks really weird to me. Try it without that line.
Also, I'm not sure if you actually have ctrl when in the flying state, so try without the ctrl trigger. What I see above shows that statedef 40006 has ctrl = 0...
Straight up just try this and add triggers that you might need later. If it stops working, then you'll know what the problem is.
[State -1, Jump Light Punch]
type = ChangeState
value = 40007
triggerall = command = "x"
trigger1 = stateno = 40006