$dotw) { $ys+=(((7-sd_date('N',$ys))+$dotw)*60*60*24); } else { $ys+=(($dotw-sd_date('N',$ys))*60*60*24); } $ys+=(($wn-1)*60*60*24*7); $did = sd_getMonthStart(sd_date('m',$ys)-1); $did += (sd_date('j',$ys)-1); sd_addDateIn($id,$did); } function sd_getMonthStart($month) { if ($month==0) { return 0; } else { $c = sd_daysInMonth($month-1)+sd_getMonthStart($month-1); return ($c); } } function sd_daysInMonth($month) { switch ($month) { case 0: return 31; case 1: return (28+sd_isLeapYear()); case 2: return 31; case 3: return 30; case 4: return 31; case 5: return 30; case 6: return 31; case 7: return 31; case 8: return 30; case 9: return 31; case 10: return 30; case 11: return 31; default: throw new Exception('Invalid month ID'); } } function sd_isLeapYear() { return sd_date('L'); } function sd_isSpecialDay($id) { global $specialdates; $did = sd_getMonthStart(sd_date('n')-1); $did += (sd_date('j')-1); if ($specialdates[$did] == $id) { return 1; } else { return 0; } } function sd_ifNoSpecialDay() { global $specialdates; $did = sd_getMonthStart(sd_date('n')-1); $did += (sd_date('j')-1); if ($specialdates[$did] == '') { return 1; } else { return 0; } } function sd_kirbyWeek() { $did = sd_getMonthStart(11); $ys = sd_clearDate(); $ys+=(60*60*24*24); $ys+=(60*60*24*$did); $tWD=sd_date('N',$ys); if ($tWD==7) {$tWD=0;} $ys-=($tWD*60*60*24); $ys-=(60*60*24*7); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+1); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+2); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+3); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+4); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+5); sd_solar_annual('Kirby Week',12,sd_date('j',$ys)+6); } function sd_easter() { $nYear = sd_date('Y'); $nCent = $nYear/100; $nRemain19 = $nYear%19; $n1 = ($nCent-15)/2+202-11*$nRemain19; if ($nCent>20) { if ($nCent>26) {$n1--;} if ($nCent>38) {$n1--;} if ($nCent==21 || $nCent==24 || $nCent==25 || $nCent==33 || $nCent==36 || $nCent==37) {$
connections {
  from_room: "Center"
  to_room: "Nuclear Side"
  door { name: "Nuclear Wall" }
}
connections {
  from_room: "Center"
  to_room: "Rain Side"
  door { name: "Rain Wall" }
}
connections {
  from_room: "Center"
  to_room: "Tornado Side"
  door { name: "Tornado Wall" }
}
connections {
  from_room: "Center"
  to_room: "Volcano Side"
  door { name: "Volcano Wall" }
}
connections {
  from_room: "Nuclear Side"
  to_room: "Nuclear Vestibule"
  door { name: "Side Doors" }
}
connections {
  from_room: "Tornado Side"
  to_room: "Tornado Vestibule"
  door { name: "Side Doors" }
}
connections {
  from_room: "Nuclear Side"
  to_room: "X2 Room"
  door { name: "X Door" }
}