#include_function "script\Ikareimu\Stage.dnh"

task Stage4 {
  SetCommonData(GetCommonData("difficulty")~"Stage4Practice", true);
  SaveCommonData;
  
  Wait(60);
  
  if(GetCommonData("gamemode")=="start"){
    SetCommonData("gameevent", "stage5");
    return ;
  }
  else if(GetCommonData("gamemode")=="practiceStart"){
    SetCommonData("gameevent", "clear");
    return ;
  }
  else {
    RaiseError("CommonData [gamemode] is not saving correctly.", "Ikareimu Bug");
  }
}

sub Stage4BG {
  if(GetCommonData("gamestate")=="stage4"){
    DrawText("Stage 4", GetClipMinX, GetClipMaxY-30, 18, 255);
  }
}