Is it possible to add an if statement inside of switch case? Below is a small piece of a pretty long switch statement that has about 12 different cases. But I only want it to change/switch cases if certain conditions are met for each particular case.
Can I just add an if statement within the case?
case 'forcetrade': $next_state = 'forceplace';
case 'forceplace': $next_state = 'attacking';