code:
;-------------------------------------------------
;天候管理システム本体
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM
#DIMS 低気圧位置
#DIMS 선상강수대위치
#DIMS 적란운위치
#DIM 최신날씨경향

低気圧位置 = %GET_LOCATION_LOW()%
선상강수대위치 = %GET_LOCATION_LINER_RAINBAND()%
적란운위치 = %GET_LOCATION_CUMULUS()%

IF 低気圧位置 == "台風接近強風域" || 低気圧位置 == "台風通過強風域"
	최신날씨경향 = 16
ELSEIF 低気圧位置 == "台風接近暴風域" || 低気圧位置 == "台風通過暴風域" || (IS_TYPHOON:2 != 2 && 低気圧位置 == "台風最接近")
	최신날씨경향 = 21
ELSEIF 低気圧位置 == "台風最接近"
	최신날씨경향 = 17
ELSEIF 선상강수대위치 == "線状降水帯勢力圏"
	최신날씨경향 = 20
ELSEIF 低気圧位置 == "寒冷渦遠方" && DAY:2 == 4
	최신날씨경향 = 19
ELSEIF 低気圧位置 == "寒冷渦接近" && DAY:2 == 4
	최신날씨경향 = 13
ELSEIF 低気圧位置 == "寒冷渦接近" && (DAY:2 == 1 || DAY:2 == 3) && !IS_RAINY_SEASON1 && !IS_RAINY_SEASON2
	최신날씨경향 = 5
ELSEIF IS_RAINY_SEASON1:1 == 1 || (IS_RAINY_SEASON2 == 1 && 低気圧位置 == "台風勢力圏") || (IS_TYPHOON:3 == 1 && 低気圧位置 == "台風勢力圏")
	최신날씨경향 = 15
ELSEIF IS_RAINY_SEASON1:0 == 1 || IS_RAINY_SEASON2 == 1
	최신날씨경향 = 14
ELSEIF 低気圧位置 == "二つ玉低気圧接近" || 低気圧位置 == "日本海低気圧接近"
	최신날씨경향 = 10
ELSEIF 低気圧位置 == "二つ玉低気圧通過中" || 低気圧位置 == "日本海低気圧通過中"
	최신날씨경향 = 11
ELSEIF 低気圧位置 == "疑似好天"
	최신날씨경향 = 19
ELSEIF 低気圧位置 == "南岸低気圧接近"
	최신날씨경향 = 12
ELSEIF 低気圧位置 == "温暖前線接近"
	최신날씨경향 = 2
ELSEIF 低気圧位置 == "暖域"
	최신날씨경향 = 3
ELSEIF 低気圧位置 == "寒冷前線通過"
	최신날씨경향 = 4
ELSEIF TIME:0 >= 240 && TIME:0 <= 600 && CAN_STRATUS == 1
	최신날씨경향 = 18
ELSEIF DAY:2 == 1 || DAY:2 == 3
	최신날씨경향 = 1
ELSEIF DAY:2 == 4
	최신날씨경향 = 9
ELSEIF DAY:2 == 2 && 적란운위치 == "積乱雲接近"
	최신날씨경향 = 7
ELSEIF DAY:2 == 2 && 적란운위치 == "積乱雲直下"
	최신날씨경향 = 8
ELSE
	최신날씨경향 = 6
ENDIF

;天候が変わっていればその場で変更
IF NOW_WEATHER_CONTROL != 최신날씨경향
	NOW_WEATHER_CONTROL = 최신날씨경향
	;異常気象発生時は処理終了
	SIF FLAG:이상기상 >= 1 && FLAG:이상기상 <= 8
		RETURN
	;天候変更禁止ならば処理終了
	SIF FORBIDDEN_CHANGE_WEATHER == 1
		RETURN
	TRYCALLFORM CHANGE_WEATHER_SYSTEM_{최신날씨경향}
	;(天候パッチ)台風接近時・猛吹雪時にFLAG:異常気象を設定
	CALL SET_ABNORMAL_WEATHER
ENDIF

;-------------------------------------------------
;1 春・秋の天気(基本)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_1
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 5, 6, 7, 9, IS >= 8
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;晴れの時
		CASE 0
			;20%で晴天に移行
			IF RAND:5 == 0
				SETBIT TIME:5,0
			;20%で薄曇に移行
			ELSEIF RAND:5 == 0
				SETBIT TIME:5,1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			;上記確率に引っかからなかったら晴れ
			ELSE
				TIME:5 = 0
			ENDIF
		CASE 1
			;20%で晴れに移行
			IF RAND:5 == 0
				CLEARBIT TIME:5,0
			;20%で薄曇に移行
			ELSEIF RAND:5 == 0
				TIME:5 = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			ENDIF
		;曇りの時
		CASE 2,3
			;50%で弱体化
			IF RAND:2 == 0
				TIME:5 = 2
			ELSE
				;晴れに移行
				TIME:5 = 0
				IF !CFLAG:MASTER:우후후 && !지저
					IF TIME:2 >= 5 && TIME:2 <= 7
						PRINTW 별이 보인다
					ELSE
						PRINTW 해가 비친다
					ENDIF
				ENDIF
			ENDIF
		;雨の時
		CASE 4,5,13,14,15
			;50%で弱体化
			IF RAND:2 == 0 && TIME:5 != 4
				TIME:5 = 4
				PRINTW 비가 약해졌다
			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
					;念のため相合い傘を解除
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雨なら10%で霧雨かみぞれに移行
				ELSEIF TIME:5 == 4 && RAND:10 == 0
					TIME:5 = 6
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 물방울이 가늘어졌다
				;晴れに移行
				ELSE
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						;かもしれないといいつつ確実に見えるのは気分をよくさせる魔法
						IF TIME:2 >= 5 && TIME:2 <= 7
							PRINTW 갑자기 밤하늘이 펼쳐졌다！달무지개가 보일지도 모른다
						ELSE
							PRINTW 갑자기 해가 비친다！무지개가 보일지도 모른다
						ENDIF
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雨→晴れを処理したら虹が出る
					TIME:7 = 1
					;市場が開かれる
					FLAG:시장의신 = 1
				ENDIF
			ENDIF
		;霧・霧雨の時
		CASE 6, 7
			TIME:5 = 0
			IF !CFLAG:MASTER:우후후 && !지저
				IF TIME:2 >= 5 && TIME:2 <= 7
					PRINTW 별이 보인다
				ELSE
					PRINTW 해가 비친다
				ENDIF
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		CASE IS >= 8
			;雪は冬以外降らない
			IF RAND:2
				;雨になる
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 비로 바뀐 것 같다
			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;晴れに移行
				ELSE
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						PRINTFORMW \@ TIME:2 >= 5 && TIME:2 <= 7? 갑자기 밤하늘이 펼쳐졌다！# 갑자기 해가 비친다！\@ 다이아몬드 더스트가 보일지도 모른다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雪→晴れを処理したらダイヤモンドダストが出る
					TIME:7 = 2
				ENDIF
			ENDIF
		CASEELSE
			TIME:5 = RAND:4
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;強風である場合風がおさまる
IF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;春第2タームまでは降雪・雪崩判定
IF DAY:2 == 1 && NOW_TERM <= 2
	;連続降雪カウンター
	SELECTCASE TIME:5
		CASE 0,1,2,3,7
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 5)
			ENDIF
		CASE 4,5,6,14
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 8)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 10)
			ENDIF
		CASE 8
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 1
			ELSE
				SNOW_COVERAGE += 1
			ENDIF
		CASE 9
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 3
			ELSE
				SNOW_COVERAGE += 3
			ENDIF
		CASEELSE
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
			ENDIF
	ENDSELECT

	;雪崩発生フラグ判定
	IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR >= 3 || TIME:5 <= 7 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR == 4 || TIME:5 == 4 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 7 && (POWER_WARM_AIR >= 5 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSE
		POSSIBLITY_AVALANCHE = 0
	ENDIF
ELSE
	CONTINUOUS_SNOWFALL = 0
	SNOW_COVERAGE = 0
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;2 春・秋の天気(温暖前線接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_2
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 0, 1, IS >= 5
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;快晴の時
		CASE 1
			TIME:5 = 0
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 조금 구름이 끼었다
		;晴れの時
		CASE 0
			;60%で薄曇に移行
			IF RAND:2 == 0
				SETBIT TIME:5,1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			;10%で曇りに移行
			ELSEIF RAND:10 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 하늘이 온통 구름으로 덮였다
			ENDIF
		;薄曇の時
		CASE 2
			;60%で曇りに移行
			IF RAND:2 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 하늘이 온통 구름으로 덮였다
			;10%で雨に移行
			ELSEIF RAND:10 == 0
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		;曇の時
		CASE 3
			;50%で雨に移行
			IF RAND:2 == 0
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		;降雨時
		CASE 4,5,13,14,15
			;熱雷発生フラグが立っているとき大雨に移行
			IF GET_HEAT_THUNDERSTORM() && TIME:5 == 4
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ENDIF
		CASEELSE
			TIME:5 = 2
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 살짝 흐려졌다
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;春第2タームまでは降雪・雪崩判定
IF DAY:2 == 1 && NOW_TERM <= 2
	;連続降雪カウンター
	SELECTCASE TIME:5
		CASE 0,1,2,3,7
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
			ENDIF
		CASE 4,5,6,14
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 8)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 10)
			ENDIF
		CASE 8
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 1
			ELSE
				SNOW_COVERAGE += 1
			ENDIF
		CASE 9
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 3
			ELSE
				SNOW_COVERAGE += 3
			ENDIF
		CASEELSE
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
			ENDIF
	ENDSELECT

	;雪崩発生フラグ判定
	IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR >= 3 || TIME:5 <= 7 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR == 4 || TIME:5 == 4 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 7 && (POWER_WARM_AIR >= 5 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSE
		POSSIBLITY_AVALANCHE = 0
	ENDIF
ELSE
	CONTINUOUS_SNOWFALL = 0
	SNOW_COVERAGE = 0
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;3 春・秋の天気(暖域時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_3
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF (TIME:5 != 0 || TIME:5 != 2) && CFLAG:MASTER:현재위치 != 천계
	IF RAND:2 == 1
		TIME:5 = 0
		IF !CFLAG:MASTER:우후후 && !지저
			IF TIME:2 >= 5 && TIME:2 <= 7
				IF TIME:5 >= 4
					PRINTW 밤하늘이 펼쳐졌다！달무지개가 보일지도 모른다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
					;雨→晴れを処理したら虹が出る
					TIME:7 = 1
					;市場が開かれる
					FLAG:시장의신 = 1
				ELSE
					PRINTW 별이 보인다
				ENDIF
			ELSE
				IF TIME:5 >= 4
					PRINTW 해가 비친다！무지개가 보일지도 모른다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
					;雨→晴れを処理したら虹が出る
					TIME:7 = 1
					;市場が開かれる
					FLAG:시장의신 = 1
				ELSE
					PRINTW 해가 비친다
				ENDIF
			ENDIF
		ENDIF
	ELSE
		TIME:5 = 2
		IF !CFLAG:MASTER:우후후 && !지저 && TIME:5 >= 4
			PRINTW 비가 그친 것 같다
		ENDIF
		;念のため相合い傘を解除
		FOR LOCAL,0,CHARANUM
			SIF TEQUIP:LOCAL:201
				TEQUIP:LOCAL:201 = 0
		NEXT
	ENDIF
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;風速変化の確立
LOCAL:1 = RAND:10

;50%の確率で風速弱体化。暖気が強い場合20%の確率で風速強化
;但し春第1タームは確実に強風
IF DAY:2 == 1 && NOW_TERM == 1 && WIND_VELOCITY != 1 && CFLAG:MASTER:현재위치 != 천계
	WIND_VELOCITY = 1
	IF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 세졌다 봄바람(春一番)이다！
		CALL ASK_DIARY("봄바람이 불었다")
	ENDIF
ELSEIF POWER_WARM_AIR >= 4 && LOCAL:1 >= 8 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 0
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 세졌다
ELSEIF LOCAL:1 >= 5 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY > 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;春第2タームまでは降雪・雪崩判定
IF DAY:2 == 1 && NOW_TERM <= 2
	;連続降雪カウンター
	SELECTCASE TIME:5
		CASE 0,1,2,3,7
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
			ENDIF
		CASE 4,5,6,14
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 8)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 10)
			ENDIF
		CASE 8
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 1
			ELSE
				SNOW_COVERAGE += 1
			ENDIF
		CASE 9
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 3
			ELSE
				SNOW_COVERAGE += 3
			ENDIF
		CASEELSE
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
			ENDIF
	ENDSELECT

	;雪崩発生フラグ判定
	IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR >= 3 || TIME:5 <= 7 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR == 4 || TIME:5 == 4 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 7 && (POWER_WARM_AIR >= 5 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSE
		POSSIBLITY_AVALANCHE = 0
	ENDIF
ELSE
	CONTINUOUS_SNOWFALL = 0
	SNOW_COVERAGE = 0
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;4 春・秋の天気(寒冷前線通過時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_4
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF TIME:5 == 15 && GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && CFLAG:MASTER:현재위치 != 천계
	TIME:5 = 14
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 맹렬한 비가 되었다！
ELSEIF (TIME:5 == 13 || TIME:5 == 15) && CFLAG:MASTER:현재위치 != 천계
	TIME:5 = 5
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 억수같이 쏟아진다！
ELSEIF TIME:5 != 4 && TIME:5 != 5 && TIME:5 != 14 && CFLAG:MASTER:현재위치 != 천계
	IF RAND:3 == 0
		TIME:5 = 4
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 비가 내리기 시작했다！
	ELSEIF RAND:3 == 1 && GET_FRONTAL_THUNDERSTORM() == 1
		SELECTCASE POWER_WARM_AIR
			CASE 5
				IF RAND:3 == 0
					TIME:5 = 15
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 우박이 내리기 시작했다！
				ELSE
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				ENDIF
			CASEELSE
				TIME:5 = 13
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 싸라기눈이 내리기 시작했다！
		ENDSELECT
	ELSE
		TIME:5 = 5
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 억수같이 쏟아진다！
	ENDIF
ELSEIF CFLAG:MASTER:현재위치 != 천계
	IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1
		IF TIME:5 != 14
			TIME:5 = 14
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 맹렬한 비가 되었다！
		ENDIF
	ELSE
		SELECTCASE TIME:5
			CASE 4
				IF RAND:3 == 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ENDIF
			CASE 5
				IF RAND:3 == 0
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 약해졌다
				ENDIF
			CASE 14
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 조금 잦아들기 시작했다
			CASEELSE
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
		ENDSELECT
	ENDIF
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;風速変化の確立
LOCAL:1 = RAND:4

;(天候パッチ)熱界雷時の処理　ダウンバースト発生
IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && ATMOSPHERIC_INSTABILITY <= -1 && CFLAG:MASTER:현재위치 != 천계
	IF ATMOSPHERIC_INSTABILITY <= -2
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 거센 바람이다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASE 1
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 더욱 바람이 거세졌다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASEELSE
				WIND_VELOCITY = 2
		ENDSELECT
	ELSE
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 바람이 거세졌다！
			CASE 1
				WIND_VELOCITY = 1
			CASEELSE
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 아까보다 바람이 약해졌다
		ENDSELECT
	ENDIF
;強風である場合25%で風がおさまる
ELSEIF LOCAL:1 == 0 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;春第2タームまでは降雪・雪崩判定
IF DAY:2 == 1 && NOW_TERM <= 2
	;連続降雪カウンター
	SELECTCASE TIME:5
		CASE 0,1,2,3,7
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
			ENDIF
		CASE 4,5,6,14
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 8)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 10)
			ENDIF
		CASE 8
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 1
			ELSE
				SNOW_COVERAGE += 1
			ENDIF
		CASE 9
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 3
			ELSE
				SNOW_COVERAGE += 3
			ENDIF
		CASEELSE
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
			ENDIF
	ENDSELECT

	;雪崩発生フラグ判定
	IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR >= 3 || TIME:5 <= 7 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR == 4 || TIME:5 == 4 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 7 && (POWER_WARM_AIR >= 5 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSE
		POSSIBLITY_AVALANCHE = 0
	ENDIF
ELSE
	CONTINUOUS_SNOWFALL = 0
	SNOW_COVERAGE = 0
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;5 春・秋の天気(寒冷渦接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_5
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 3
		LOCAL = 16
	CASE 4, 8, 12, 13
		LOCAL = 24
	CASE 5, 9
		LOCAL = 48
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	;暖気が1の場合降雪の可能性
	IF POWER_WARM_AIR == 1
		SELECTCASE TIME:5
			;曇り
			CASE 3
				SELECTCASE RAND:5
					CASE 0
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					CASE 1, 2
						TIME:5 = 8
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈이 내리기 시작했다！
					CASEELSE
						TIME:5 = 9
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈이 내리기 시작했다！폭설이다
				ENDSELECT
			;雪
			CASE 8
				SELECTCASE RAND:5
					CASE 0
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					CASE 1
						TIME:5 = 3
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW  눈이 그친 것 같다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					CASEELSE
						TIME:5 = 9
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈발이 거세졌다！
				ENDSELECT
			;大雪
			CASE 9
				SELECTCASE RAND:5
					CASE 0
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					CASE 1
						TIME:5 = 3
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW  눈이 그친 것 같다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					CASEELSE
						TIME:5 = 8
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈은 약해진 것 같다
				ENDSELECT
			;あられ
			CASE 13
				SELECTCASE RAND:4
					CASE 0
						TIME:5 = 8
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈이 내리기 시작했다！
					CASEELSE
						TIME:5 = 9
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈발이 거세졌다！
				ENDSELECT
			CASEELSE
				TIME:5 = 9
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 내리기 시작했다！폭설이다
		ENDSELECT
	ELSE
		SELECTCASE TIME:5
			;曇り
			CASE 3
				IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && RAND:6 == 0
					SELECTCASE RAND:6
						CASE 0
							TIME:5 = 15
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 우박이 내리기 시작했다！
						CASE IS >= 2
							TIME:5 = 5
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 억수같이 쏟아진다！
						CASEELSE
							TIME:5 = 14
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 맹렬한 비가 되었다！
					ENDSELECT
				ELSE
					SELECTCASE RAND:6
						CASE 0
							TIME:5 = 13
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 싸라기눈이 내리기 시작했다！
						CASE 1
							TIME:5 = 12
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 진눈깨비가 내리기 시작했다！
						CASE 2
							TIME:5 = 4
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 비가 내리기 시작했다！
						CASEELSE
							TIME:5 = 5
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 억수같이 쏟아진다！
					ENDSELECT
				ENDIF
			;雨
			CASE 4
				IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && RAND:4 == 0
					SELECTCASE RAND:6
						CASE 0
							TIME:5 = 15
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 우박이 내리기 시작했다！
						CASE IS >= 2
							TIME:5 = 5
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 억수같이 쏟아진다！
						CASEELSE
							TIME:5 = 14
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 맹렬한 비가 되었다！
					ENDSELECT
				ELSE
					SELECTCASE RAND:6
						CASE 0
							TIME:5 = 13
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 싸라기눈이 내리기 시작했다！
						CASE 1
							TIME:5 = 12
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 진눈깨비가 내리기 시작했다！
						CASE 2
							TIME:5 = 3
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW  비가 그친 것 같다
							FOR LOCAL,0,CHARANUM
								SIF TEQUIP:LOCAL:201
									TEQUIP:LOCAL:201 = 0
							NEXT
						CASEELSE
							TIME:5 = 5
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 억수같이 쏟아진다！
					ENDSELECT
				ENDIF
			;大雨
			CASE 5,14
				SELECTCASE RAND:5
					CASE 0
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					CASE 1
						TIME:5 = 3
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW  비가 그친 것 같다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					CASEELSE
						IF TIME:5 == 14
							TIME:5 = 5
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 비가 조금 가라앉았다
						ELSEIF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && RAND:2 == 0
							TIME:5 = 14
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 맹렬한 비가 되었다！
						ELSE
							TIME:5 = 4
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 비가 약해졌다
						ENDIF
				ENDSELECT
			;みぞれ
			CASE 12
				SELECTCASE RAND:5
					CASE 0
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					CASE 1, 2
						TIME:5 = 3
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW  비가 그친 것 같다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					CASEELSE
						TIME:5 = 4
				ENDSELECT
			;あられ
			CASE 13
				SELECTCASE RAND:4
					CASE 0
						TIME:5 = 4
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 비가 내리기 시작했다！
					CASEELSE
						TIME:5 = 5
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 억수같이 쏟아진다！
				ENDSELECT
			;ひょう
			CASE 15
				SELECTCASE RAND:4
					CASE 0
						TIME:5 = 14
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 맹렬한 비가 되었다！
					CASEELSE
						TIME:5 = 5
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 억수같이 쏟아진다！
				ENDSELECT
			CASEELSE
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
		ENDSELECT
	ENDIF
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;風速変化の確立
LOCAL:1 = RAND:20

;(天候パッチ)熱界雷時の処理　ダウンバースト発生
IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && ATMOSPHERIC_INSTABILITY <= -1 && CFLAG:MASTER:현재위치 != 천계
	IF ATMOSPHERIC_INSTABILITY <= -2
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 거센 바람이다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASE 1
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 더욱 바람이 거세졌다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASEELSE
				WIND_VELOCITY = 2
		ENDSELECT
	ELSE
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 바람이 거세졌다！
			CASE 1
				WIND_VELOCITY = 1
			CASEELSE
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 아까보다 바람이 약해졌다
		ENDSELECT
	ENDIF
;10%の確率で暴風
ELSEIF LOCAL:1 == 0 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 1
	WIND_VELOCITY = 2
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 더욱 거세졌다！
;50%の確率で暴風から強風に弱体化
ELSEIF LOCAL:1 >= 10 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 2
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 조금 수그러들었다
ELSEIF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 0
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 세졌다
ENDIF

;春第2タームまでは降雪・雪崩判定
IF DAY:2 == 1 && NOW_TERM <= 2
	;連続降雪カウンター
	SELECTCASE TIME:5
		CASE 0,1,2,3,7
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
			ENDIF
		CASE 4,5,6,14
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 8)
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 10)
			ENDIF
		CASE 8
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 1
			ELSE
				SNOW_COVERAGE += 1
			ENDIF
		CASE 9
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
				SNOW_COVERAGE += 3
			ELSE
				SNOW_COVERAGE += 3
			ENDIF
		CASEELSE
			IF CONTINUOUS_SNOWFALL >= 1
				SNOW_COVERAGE = CONTINUOUS_SNOWFALL
				CONTINUOUS_SNOWFALL = 0
			ELSE
				SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
			ENDIF
	ENDSELECT

	;雪崩発生フラグ判定
	IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR >= 3 || TIME:5 <= 7 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR == 4 || TIME:5 == 4 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 7 && (POWER_WARM_AIR >= 5 || TIME:5 == 5 || TIME:5 == 14)
		POSSIBLITY_AVALANCHE = 2
	ELSE
		POSSIBLITY_AVALANCHE = 0
	ENDIF
ELSE
	CONTINUOUS_SNOWFALL = 0
	SNOW_COVERAGE = 0
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;6 夏の天気(基本)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_6
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;暖気が1のとき
IF POWER_WARM_AIR == 1 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;晴れの時
		CASE 0
			;20%で晴天に移行
			IF RAND:5 == 0
				SETBIT TIME:5,0
			;20%で薄曇に移行
			ELSEIF RAND:5 == 0
				SETBIT TIME:5,1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			;上記確率に引っかからなかったら晴れ
			ELSE
				TIME:5 = 0
			ENDIF
		CASE 1
			;20%で晴れに移行
			IF RAND:5 == 0
				CLEARBIT TIME:5,0
			;20%で薄曇に移行
			ELSEIF RAND:5 == 0
				TIME:5 = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			ENDIF
		;曇りの時
		CASE 2,3
			;25%で弱体化
			IF RAND:4 == 0
				TIME:5 = 2
			ELSE
				;20%で晴れに移行
				IF RAND:5 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						IF TIME:2 >= 5 && TIME:2 <= 7
							PRINTW 별이 보인다
						ELSE
							PRINTW 해가 비친다
						ENDIF
					ENDIF
				ENDIF
			ENDIF
		;雨の時
		CASE 4,5,14,15
			;25%で弱体化
			IF RAND:4 == 0 && TIME:5 != 4
				TIME:5 = 4
				PRINTW 비가 약해졌다
			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
					;念のため相合い傘を解除
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雨なら10%で霧雨に移行
				ELSEIF TIME:5 == 4 && RAND:10 == 0
					TIME:5 = 6
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 물방울이 가늘어졌다
				;10%で晴れに移行
				ELSEIF RAND:10 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						;かもしれないといいつつ確実に見えるのは気分をよくさせる魔法
						IF TIME:2 >= 5 && TIME:2 <= 7
							PRINTW 갑자기 밤하늘이 펼쳐졌다！달무지개가 보일지도 모른다
						ELSE
							PRINTW 갑자기 해가 비친다！무지개가 보일지도 모른다
						ENDIF
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雨→晴れを処理したら虹が出る
					TIME:7 = 1
					;市場が開かれる
					FLAG:시장의신 = 1
				ENDIF
			ENDIF
		;霧・霧雨の時
		CASE 6, 7
			TIME:5 = 0
			IF !CFLAG:MASTER:우후후 && !지저
				IF TIME:2 >= 5 && TIME:2 <= 7
					PRINTW 별이 보인다
				ELSE
					PRINTW 해가 비친다
				ENDIF
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		;雪の時
		CASE IS >= 8
			;雪は冬以外降らない
			IF TIME:5 == 8
				;雨になる
				CLEARBIT TIME:5,3
				SETBIT TIME:5,2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 비로 바뀐 것 같다
			;50%の確率で弱体化
			ELSEIF GETBIT(TIME:5,0) && RAND:2
				CLEARBIT TIME:5,0
				PRINTW 눈은 약해진 것 같다

			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雪なら10%で細雪かみぞれに移行
				ELSEIF TIME:5 == 8 && RAND:10 == 0
					IF RAND:2
						TIME:5 = 10
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈의 결정이 가늘어졌다
					ELSE
						TIME:5 = 12
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 조금 비도 섞이기 시작했다
					ENDIF
					;更に10%の確率で霧雪,あられに移行
					SIF RAND:10 == 0
						SETBIT TIME:5,0
				;10%で晴れに移行
				ELSEIF RAND:10 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						PRINTFORMW \@ TIME:2 >= 5 && TIME:2 <= 7? 갑자기 밤하늘이 펼쳐졌다！# 갑자기 해가 비친다！\@ 다이아몬드 더스트가 보일지도 모른다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雪→晴れを処理したらダイヤモンドダストが出る
					TIME:7 = 2
				ENDIF
			ENDIF
		CASEELSE
			TIME:5 = RAND:4
	ENDSELECT
;暖気が2以上
ELSEIF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;晴れの時
		CASE 0
			TIME:5 = 1
		;曇りの時
		CASE 2,3
			TIME:5 = 1
			IF !CFLAG:MASTER:우후후 && !지저
				IF TIME:2 >= 5 && TIME:2 <= 7
					PRINTW 별이 보인다
				ELSE
					PRINTW 해가 비친다
				ENDIF
			ENDIF
		;雨の時
		CASE 4,5,6,7,13
			;25%で曇りに移行
			IF RAND:4 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 그친 것 같다
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			;75%で晴れに移行
			ELSE
				TIME:5 = 0
				IF !CFLAG:MASTER:우후후 && !지저
					;かもしれないといいつつ確実に見えるのは気分をよくさせる魔法
					IF TIME:2 >= 5 && TIME:2 <= 7
						PRINTW 갑자기 밤하늘이 펼쳐졌다！달무지개가 보일지도 모른다
					ELSE
						PRINTW 갑자기 해가 비친다！무지개가 보일지도 모른다
					ENDIF
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
				ENDIF
				;更に確率で快晴
				SIF RAND:10 < 5
					TIME:5 = 1
				;雨→晴れを処理したら虹が出る
				TIME:7 = 1
				;市場が開かれる
				FLAG:시장의신 = 1
			ENDIF
		CASE 14,15
			TIME:5 = 5
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 조금 비가 수그러들었다
		;雪の時
		CASE IS >= 8
			;雪は冬以外降らない
			IF TIME:5 == 8
				;雨になる
				CLEARBIT TIME:5,3
				SETBIT TIME:5,2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 비로 바뀐 것 같다
			;50%の確率で弱体化
			ELSEIF GETBIT(TIME:5,0) && RAND:2
				CLEARBIT TIME:5,0
				PRINTW 눈은 약해진 것 같다

			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雪なら10%で細雪かみぞれに移行
				ELSEIF TIME:5 == 8 && RAND:10 == 0
					IF RAND:2
						TIME:5 = 10
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 눈의 결정이 가늘어졌다
					ELSE
						TIME:5 = 12
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 조금 비도 섞이기 시작했다
					ENDIF
					;更に10%の確率で霧雪,あられに移行
					SIF RAND:10 == 0
						SETBIT TIME:5,0
				;10%で晴れに移行
				ELSEIF RAND:10 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						PRINTFORMW \@ TIME:2 >= 5 && TIME:2 <= 7? 갑자기 밤하늘이 펼쳐졌다！# 갑자기 해가 비친다！\@ 다이아몬드 더스트가 보일지도 모른다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雪→晴れを処理したらダイヤモンドダストが出る
					TIME:7 = 2
				ENDIF
			ENDIF
		CASEELSE
			TIME:5 = 1
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;強風である場合風がおさまる
IF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;7 夏の天気(夕立接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_7
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE CAN_CUMULUS:0
		CASE 1
			TIME:5 = 0
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 적운이 떠올랐다
		CASE 2, 3
			IF RAND:2 == 0
				TIME:5 = 0
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 적운이 떠올랐다
			ELSE
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			ENDIF
		CASE 4
			IF RAND:2 == 0
				TIME:5 = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 권운이 퍼지기 시작했다
			ELSE
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 흐려졌다
			ENDIF
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 찬바람이 불었다！
		CASE 5
			TIME:5 = 3
			IF !CFLAG:MASTER:우후후 && !지저
				PRINTW 하늘이 어두워졌다……
				PRINTW 찬바람이 불었다！
			ENDIF
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;8 夏の天気(夕立通過後)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_8
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE CAN_CUMULUS:0
		CASE 1
			IF RAND:2 == 0 && TIME:5 <= 1
				TIME:5 = 0
			ELSEIF TIME:5 < 3
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 흐려졌다
			ENDIF
		CASE 2
			IF RAND:3 == 0 && TIME:5 < 4
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ELSEIF TIME:5 < 3
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 흐려졌다
			ENDIF
		CASE 3
			IF RAND:3 == 0 && TIME:5 < 4
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ELSEIF TIME:5 < 4
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		CASE 4
			IF RAND:3 == 0 && TIME:5 == 5
				TIME:5 = 13
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 싸라기눈이 내리기 시작했다！
			ELSEIF TIME:5 != 5
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ENDIF
		CASE 5
			IF RAND:3 == 0 && TIME:5 != 15
				TIME:5 = 15
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 우박이 내리기 시작했다！
			ELSEIF TIME:5 != 14
				TIME:5 = 14
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 비다！
			ENDIF
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;ダウンバースト発生
IF CAN_CUMULUS:2 == 2 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 2
	WIND_VELOCITY = 2
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 거센 바람이다！
	;ダウンバーストによる作物への影響
	IF FLAG:지주 > 0
		FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
		IS_STORM_CROP_DAMAGE ++
	ENDIF
ELSEIF CAN_CUMULUS:2 == 1 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 1
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 거세졌다！
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;9 冬の天気(基本)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_9
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 4, 5, 6, 7, 9
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;晴れの時
		CASE 0
			;20%で薄曇に移行
			IF RAND:5 == 0
				SETBIT TIME:5,1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			;5%で曇りに移行
			ELSEIF RAND:20 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 구름이 떠올랐다
			;上記確率に引っかからなかったら晴れ
			ELSE
				TIME:5 = 0
			ENDIF
		CASE 1
			;20%で薄曇に移行
			IF RAND:5 == 0
				TIME:5 = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			ELSE
				TIME:5 = 0
			ENDIF
		;曇りの時
		CASE 2,3
			;25%で強化or弱体化
			IF RAND:4 == 0
				INVERTBIT TIME:5,0
			ELSE
				;20%で晴れに移行
				IF RAND:5 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						IF TIME:2 >= 5 && TIME:2 <= 7
							PRINTW 별이 보인다
						ELSE
							PRINTW 해가 비친다
						ENDIF
					ENDIF
				;薄曇なら10%で雨か雪に移行
				ELSEIF TIME:5 == 2 && RAND:10 == 0
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
					;更に10%の確率で霧雨,細雪に移行
					SIF RAND:10 == 0
						SETBIT TIME:5,1
				;曇りなら30%で雪に移行
				ELSEIF TIME:5 == 3 && RAND:10 < 3
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				ENDIF
			ENDIF
		;雨の時
		CASE 4,5,14,15
			TIME:5 = 8
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 내리기 시작했다！
		;霧・霧雨の時
		CASE 6, 7
			TIME:5 = 0
			IF !CFLAG:MASTER:우후후 && !지저
				IF TIME:2 >= 5 && TIME:2 <= 7
					PRINTW 별이 보인다
				ELSE
					PRINTW 해가 비친다
				ENDIF
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		;雪の時
		CASE IS >= 8
			;大雪は弱体化
			IF TIME:5 == 9
				TIME:5 = 8
				PRINTW 눈은 약해진 것 같다

			ELSE
				;50%で曇りに移行
				IF RAND:2 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雪なら10%で細雪かみぞれに移行
				ELSEIF TIME:5 == 8 && RAND:10 == 0
					TIME:5 = 10
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈의 결정이 가늘어졌다
					;更に10%の確率で霧雪,あられに移行
					SIF RAND:10 == 0
						SETBIT TIME:5,0
				;25%で晴れに移行
				ELSEIF RAND:4 == 0
					TIME:5 = 0
					IF !CFLAG:MASTER:우후후 && !지저
						PRINTFORMW \@ TIME:2 >= 5 && TIME:2 <= 7? 갑자기 밤하늘이 펼쳐졌다！# 갑자기 해가 비친다！\@ 다이아몬드 더스트가 보일지도 모른다
						FOR LOCAL,0,CHARANUM
							SIF TEQUIP:LOCAL:201
								TEQUIP:LOCAL:201 = 0
						NEXT
					ENDIF
					;更に低確率で快晴
					SIF RAND:100 < 5
						TIME:5 = 1
					;雪→晴れを処理したらダイヤモンドダストが出る
					TIME:7 = 2
				ENDIF
			ENDIF
		CASEELSE
			TIME:5 = RAND:4
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;連続降雪カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
		ENDIF
	CASE 3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ENDIF
	CASE 4,5,6,14
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 6)
		ENDIF
	CASE 8
		CONTINUOUS_SNOWFALL += 1
	CASE 9
		CONTINUOUS_SNOWFALL += 3
ENDSELECT

;強風である場合風がおさまる
IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE WIND_VELOCITY
		CASE 1
			WIND_VELOCITY = 0
			SIF !지저
				PRINTW 바람이 가라앉기 시작했다
		CASE 2
			WIND_VELOCITY = 1
			SIF !지저
				PRINTW 바람이 조금 수그러들었다
		CASE IS >= 3
			WIND_VELOCITY = 2
			SIF !지저
				PRINTW 아까보다 바람이 약해졌다
	ENDSELECT
ENDIF

;雪崩発生フラグ判定
IF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;10 冬の天気(日本海低気圧接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_10
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 0, 1, IS >= 5
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;快晴の時
		CASE 1
			TIME:5 = 0
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 조금 구름이 끼었다
		;晴れの時
		CASE 0
			;60%で薄曇に移行
			IF RAND:2 == 0
				SETBIT TIME:5,1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 살짝 흐려졌다
			;10%で曇りに移行
			ELSEIF RAND:10 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 하늘이 온통 구름으로 덮였다
			ENDIF
		;薄曇の時
		CASE 2
			;60%で曇りに移行
			IF RAND:2 == 0
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 하늘이 온통 구름으로 덮였다
			;10%で雨・雪に移行
			ELSEIF RAND:10 == 0
				;暖気の強さによって雨か雪を区別
				IF POWER_WARM_AIR >= 3
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 내리기 시작했다！
				ELSE
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				ENDIF
			ENDIF
		;曇の時
		CASE 3
			;50%で雨・雪に移行
			IF RAND:2 == 0
				;暖気の強さによって雨か雪を区別
				IF POWER_WARM_AIR >= 3
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 내리기 시작했다！
				ELSE
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				ENDIF
			ENDIF
		;雨の時
		CASE 4
			;50%で大雨・大雪に移行
			IF RAND:2 == 0
				;暖気の強さによって雨か雪を区別
				IF POWER_WARM_AIR >= 3
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSE
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 눈으로 변했다！
				ENDIF
			ENDIF
		;雪の時
		CASE 8
			;50%で大雨・大雪に移行
			IF RAND:2 == 0
				;暖気の強さによって雨か雪を区別
				IF POWER_WARM_AIR >= 3
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSE
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈발이 거세졌다！
				ENDIF
			ENDIF
		CASE 6, 7, IS >= 10
			;暖気の強さによって雨か雪を区別
			IF POWER_WARM_AIR >= 3
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ELSE
				TIME:5 = 8
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 내리기 시작했다！
			ENDIF
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;連続降雪カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
		ENDIF
	CASE 3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ENDIF
	CASE 4,5,6,14
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 6)
		ENDIF
	CASE 8
		CONTINUOUS_SNOWFALL += 1
	CASE 9
		CONTINUOUS_SNOWFALL += 3
ENDSELECT

IF (POWER_WARM_AIR >= 4 || IS_SoJ_LOW ==2) && CFLAG:MASTER:현재위치 != 천계
	IF WIND_VELOCITY == 0
		WIND_VELOCITY = 1
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 바람이 세졌다
	ENDIF
ENDIF

;雪崩発生フラグ判定
IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR == 4 || TIME:5 == 4)
	POSSIBLITY_AVALANCHE = 2
ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR >= 5 || TIME:5 == 5)
	POSSIBLITY_AVALANCHE = 2
ELSEIF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;11 冬の天気(日本海低気圧通過時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_11
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE IS < 8
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF IS_SoJ_LOW ==2 && CFLAG:MASTER:현재위치 != 천계
	IF TIME:5 != 9 || WIND_VELOCITY < 2
		TIME:5 = 9
		IF POWER_COLD_AIR >= 4 && POWER_WARM_AIR >= 5
			WIND_VELOCITY = 3
			IF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈보라가 몰아친다！
				CALL ASK_DIARY("맑개 갠 하늘에서 날씨가 돌변했다")
			ENDIF
		ELSE
			WIND_VELOCITY = 2
			IF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈보라가 몰아친다！
				CALL ASK_DIARY("맑개 갠 하늘에서 날씨가 돌변했다")
			ENDIF
		ENDIF
	ENDIF
RETURN
ENDIF

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE IS < 8
			IF POWER_COLD_AIR < 3
				TIME:5 = 8
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 내리기 시작했다！
			ELSE
				TIME:5 = 9
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 大雪になった！
			ENDIF
		CASE 8
			IF POWER_COLD_AIR >= 3
				IF RAND:3 > 1
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈발이 거세졌다！
				ELSEIF RAND:3 == 1
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				ENDIF
			ENDIF
		CASE 9
			IF RAND:3 == 0
				TIME:5 = 8
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 약해진 것 같다
			ELSEIF RAND:3 == 1
				TIME:5 = 13
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 싸라기눈이 내리기 시작했다！
			ENDIF
		CASE 13
			IF POWER_COLD_AIR >= 3
				TIME:5 = 9
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈발이 거세졌다！
			ELSE
				TIME:5 = 8
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 눈이 내리기 시작했다！
			ENDIF
		CASEELSE
			TIME:5 = 8
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 내리기 시작했다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;連続降雪カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
		ENDIF
	CASE 3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ENDIF
	CASE 4,5,6,14
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 6)
		ENDIF
	CASE 8
		CONTINUOUS_SNOWFALL += 1
	CASE 9
		CONTINUOUS_SNOWFALL += 3
ENDSELECT

;風速変化の確立
LOCAL:1 = RAND:20

;5%の確率で暴風
IF LOCAL:1 == 0 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 1 && POWER_COLD_AIR >= 4
	WIND_VELOCITY = 2
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 더욱 거세졌다！
;50%の確率で暴風から強風に弱体化
ELSEIF LOCAL:1 >= 10 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 2
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 조금 수그러들었다
ELSEIF LOCAL:1 >= 10 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 0
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 세졌다
ENDIF

;雪崩発生フラグ判定
IF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;12 冬の天気(南岸低気圧接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_12
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 4, 5, 6, 7, 9
		LOCAL = 12
	CASEELSE
		LOCAL = 24
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;晴れの時
		CASE 0, 1
			TIME:5 = 3
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 구름이 떠올랐다
		;曇りの時
		CASE 2,3
			;25%で強化or弱体化
			IF RAND:4 == 0
				INVERTBIT TIME:5,0
			ELSE
				;薄曇なら25%で雨か雪に移行
				IF TIME:5 == 2 && RAND:4 == 0
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				;曇りなら50%で雨に移行
				ELSEIF TIME:5 == 3 && RAND:2 == 0
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				ENDIF
			ENDIF
		;雨の時
		CASE 4,5,6,7,14,15
			TIME:5 = 8
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 내리기 시작했다！
		;雪の時
		CASE IS >= 8
			;10%で強化
			IF !GETBIT(TIME:5,0) && RAND:10 == 0
				SETBIT TIME:5,0
				PRINTW 눈발이 거세졌다！
			;50%の確率で弱体化
			ELSEIF GETBIT(TIME:5,0) && RAND:2
				CLEARBIT TIME:5,0
				PRINTW 눈은 약해진 것 같다

			ELSE
				;25%で曇りに移行
				IF RAND:4 == 0
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				;雪なら10%で細雪かみぞれに移行
				ELSEIF TIME:5 == 8 && RAND:10 == 0
					TIME:5 = 10
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈의 결정이 가늘어졌다
					;更に10%の確率で霧雪,あられに移行
					SIF RAND:10 == 0
						SETBIT TIME:5,0
				ENDIF
			ENDIF
		CASEELSE
			TIME:5 = 8
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 내리기 시작했다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;連続降雪カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
		ENDIF
	CASE 3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ENDIF
	CASE 4,5,6,14
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 6)
		ENDIF
	CASE 8
		CONTINUOUS_SNOWFALL += 1
	CASE 9
		CONTINUOUS_SNOWFALL += 3
ENDSELECT

;雪崩発生フラグ判定
IF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 15 && (POWER_WARM_AIR == 4 || TIME:5 == 4)
	POSSIBLITY_AVALANCHE = 2
ELSEIF SNOW_COVERAGE + CONTINUOUS_SNOWFALL >= 10 && (POWER_WARM_AIR >= 5 || TIME:5 == 5)
	POSSIBLITY_AVALANCHE = 2
ELSEIF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;13 冬の天気(寒冷渦接近時)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_13
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 3
		LOCAL = 16
	CASE 8, 13
		LOCAL = 24
	CASE 9
		LOCAL = 48
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		;曇り
		CASE 3
			SELECTCASE RAND:5
				CASE 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				CASE 1, 2
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				CASEELSE
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！폭설이다
			ENDSELECT
		;雪
		CASE 8
			SELECTCASE RAND:5
				CASE 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				CASE 1
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW  눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				CASEELSE
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈발이 거세졌다！
			ENDSELECT
		;大雪
		CASE 9
			SELECTCASE RAND:5
				CASE 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				CASE 1
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW  눈이 그친 것 같다
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				CASEELSE
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈은 약해진 것 같다
			ENDSELECT
		;あられ
		CASE 13
			SELECTCASE RAND:4
				CASE 0
					TIME:5 = 8
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈이 내리기 시작했다！
				CASEELSE
					TIME:5 = 9
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 눈발이 거세졌다！
			ENDSELECT
		CASEELSE
			TIME:5 = 9
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 내리기 시작했다！폭설이다
		ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;連続降雪カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 3)
		ENDIF
	CASE 3
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 1)
		ENDIF
	CASE 4,5,6,14
		IF CONTINUOUS_SNOWFALL >= 1
			SNOW_COVERAGE = CONTINUOUS_SNOWFALL
			CONTINUOUS_SNOWFALL = 0
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 4)
		ELSE
			SNOW_COVERAGE = MAX(0, SNOW_COVERAGE - 6)
		ENDIF
	CASE 8
		CONTINUOUS_SNOWFALL += 1
	CASE 9
		CONTINUOUS_SNOWFALL += 3
ENDSELECT

;風速変化の確立
LOCAL:1 = RAND:20

;10%の確率で暴風
IF LOCAL:1 == 0 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 1
	WIND_VELOCITY = 2
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 더욱 거세졌다！
;50%の確率で暴風から強風に弱体化
ELSEIF LOCAL:1 >= 10 && CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 2
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 조금 수그러들었다
ELSEIF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY == 0
	WIND_VELOCITY = 1
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 세졌다
ENDIF

;雪崩発生フラグ判定
IF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;14 梅雨・秋雨の天気(基本)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_14
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 1
		LOCAL = 16
	CASE 2, 3
		LOCAL = 24
	CASE 4
		LOCAL = 48
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 1
			TIME:5 = 2
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 조금 구름이 끼었다
		CASE 2
			IF RAND:4 == 0
				IF !CFLAG:MASTER:우후후 && !지저
					IF TIME:2 >= 5 && TIME:2 <= 7
						PRINTW 별이 보인다
					ELSE
						PRINTW 해가 비친다
					ENDIF
				ENDIF
			ELSE
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 구름이 두꺼워졌다
			ENDIF
		CASE 3
			IF RAND:3 == 0
				TIME:5 = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 구름이 걷혀간다
			ELSE
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		CASE 4,5,6,7,14,15
			IF GET_HEAT_THUNDERSTORM() == 1 && GET_FRONTAL_THUNDERSTORM() == 1 && (TIME:5 == 4 || TIME:5 == 5) && RAND:2 == 0 && TIME:5 != 14
				TIME:5 = 14
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 비가 되었다！
			ELSEIF (GET_HEAT_THUNDERSTORM() == 1 || GET_FRONTAL_THUNDERSTORM() == 1) && TIME:5 == 4
				IF RAND:4 == 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				ELSE
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ENDIF
			ELSEIF RAND:3 == 0
				TIME:5 = 0
				IF !CFLAG:MASTER:우후후 && !지저
					;かもしれないといいつつ確実に見えるのは気分をよくさせる魔法
					IF TIME:2 >= 5 && TIME:2 <= 7
						PRINTW 갑자기 밤하늘이 펼쳐졌다！달무지개가 보일지도 모른다
					ELSE
						PRINTW 갑자기 해가 비친다！무지개가 보일지도 모른다
					ENDIF
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
				ENDIF
				;雨→晴れを処理したら虹が出る
				TIME:7 = 1
				;市場が開かれる
				FLAG:시장의신 = 1
			ELSE
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 그친 것 같다
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		CASEELSE
			TIME:5 = 3
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 구름이 두꺼워졌다
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;強風である場合風がおさまる
IF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;15 梅雨・秋雨(梅雨末期・秋雨+台風接近)・先駆降雨帯発生時の天気
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_15
#DIM 지저
#DIM 활발화플래그
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 3
		LOCAL = 16
	CASE 4, 5
		LOCAL = 24
	CASEELSE
		LOCAL = 12
ENDSELECT

활발화플래그 = 0
SIF POWER_WARM_AIR == 5 || GET_LOCATION_LOW() == "台風勢力圏" || GET_HEAT_THUNDERSTORM() == 1 || GET_FRONTAL_THUNDERSTORM() == 1
	활발화플래그 = 1

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 3
			IF 활발화플래그 == 1
				IF RAND:3 == 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSEIF RAND:2 == 0 && (GET_HEAT_THUNDERSTORM() == 1 || GET_FRONTAL_THUNDERSTORM() == 1)
					IF GET_HEAT_THUNDERSTORM() == 1 && GET_FRONTAL_THUNDERSTORM() == 1
						IF RAND:4 == 0
							TIME:5 = 15
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 우박이 내리기 시작했다！
						ELSE
							TIME:5 = 14
							SIF !CFLAG:MASTER:우후후 && !지저
								PRINTW 맹렬한 비가 되었다！
						ENDIF
					ELSE
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					ENDIF
				ELSE
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 내리기 시작했다！
				ENDIF
			ELSE
				IF RAND:4 == 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSE
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 내리기 시작했다！
				ENDIF
			ENDIF
		CASE 4,6,7
			IF GET_HEAT_THUNDERSTORM() == 1 && GET_FRONTAL_THUNDERSTORM() == 1 && RAND:2
				IF RAND:4 == 0
					TIME:5 = 15
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 우박이 내리기 시작했다！
				ELSE
					TIME:5 = 14
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 맹렬한 비가 되었다！
				ENDIF
			ELSEIF 활발화플래그 == 1
				IF RAND:3 != 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSEIF RAND:2 == 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				ELSE
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
					;念のため相合い傘を解除
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				ENDIF
			ELSE
				IF RAND:2 != 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				ELSE
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
					;念のため相合い傘を解除
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				ENDIF
			ENDIF
		CASE 5,14,15
			IF GET_HEAT_THUNDERSTORM() == 1 && GET_FRONTAL_THUNDERSTORM() == 1
				IF RAND:4 == 0 && TIME:5 != 15
					TIME:5 = 15
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 우박이 내리기 시작했다！
				ELSEIF RAND:2 == 0 && TIME:5 != 14
					TIME:5 = 14
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 맹렬한 비가 되었다！
				ELSEIF TIME:5 == 14
					IF RAND:3
						TIME:5 = 4
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 비가 약해졌다
					ELSE
						TIME:5 = 5
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 비가 조금 가라앉았다
					ENDIF
				ELSE
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
				ENDIF
			ELSEIF 활발화플래그 == 1
				IF RAND:2 != 0
					TIME:5 = 13
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 싸라기눈이 내리기 시작했다！
				ELSE
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 약해졌다
				ENDIF
			ELSE
				IF RAND:2 != 0
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 약해졌다
				ELSE
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
					;念のため相合い傘を解除
					FOR LOCAL,0,CHARANUM
						SIF TEQUIP:LOCAL:201
							TEQUIP:LOCAL:201 = 0
					NEXT
				ENDIF
			ENDIF
		CASE 13
			IF GET_HEAT_THUNDERSTORM() == 1 && GET_FRONTAL_THUNDERSTORM() == 1
				TIME:5 = 14
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 비가 되었다！
			ELSE
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ENDIF
		CASEELSE
			TIME:5 = 4
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 비가 내리기 시작했다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		SIF CFLAG:MASTER:현재위치 != 천계
			CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;(天候パッチ)熱界雷時の処理　ダウンバースト発生
IF GET_FRONTAL_THUNDERSTORM() == 1 && GET_HEAT_THUNDERSTORM() == 1 && ATMOSPHERIC_INSTABILITY <= -1 && CFLAG:MASTER:현재위치 != 천계
	IF ATMOSPHERIC_INSTABILITY <= -2 && RAND:2 == 0
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 거센 바람이다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASE 1
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 더욱 바람이 거세졌다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASEELSE
				WIND_VELOCITY = 2
		ENDSELECT
	ELSE
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 바람이 거세졌다！
			CASE 1
				WIND_VELOCITY = 1
			CASEELSE
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 아까보다 바람이 약해졌다
		ENDSELECT
	ENDIF
;強風である場合風がおさまる
ELSEIF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;16 台風接近時の天気(強風域)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_16
#DIM 지저
#DIM 豪雨フラグ
#DIMS 低気圧位置
지저 = 0
低気圧位置 = %GET_LOCATION_LOW()%
豪雨フラグ = 0

;台風勢力5以上、台風の位置が西かつ暖気5のとき豪雨フラグオン
SIF IS_TYPHOON:1 >= 5 && IS_TYPHOON:2 == 3 && POWER_WARM_AIR >= 5
	豪雨フラグ = 1

IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 3
		LOCAL = 16
	CASE 4, 5
		LOCAL = 24
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 3
			IF RAND:2 == 0
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ELSE
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		CASE 4,6,7
			IF RAND:2 != 0
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ELSEIF RAND:2 == 0 && 低気圧位置 == "台風通過強風域"
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 雨があがったようだ
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		CASE 5,14
			IF RAND:2 != 0 && 豪雨フラグ == 1 && TIME:5 != 14 && 低気圧位置 != "台風通過強風域"
				TIME:5 = 14
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 비가 되었다！
			ELSEIF RAND:2 != 0
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 약해졌다
			ENDIF
		CASE 13,15
			TIME:5 = 5
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 억수같이 쏟아진다！
		CASEELSE
			TIME:5 = 4
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 비가 내리기 시작했다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
ENDSELECT

IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE WIND_VELOCITY
		CASE 0
			WIND_VELOCITY = 1
			IF !CFLAG:MASTER:우후후 && !지저
				PRINTW 바람이 거세졌다！
				低気圧位置 = %GET_LOCATION_LOW()%
				IF 低気圧位置 == "台風接近強風域"
					PRINTL 태풍이 내습한 것 같다
					CALL ASK_DIARY("태풍이 내습했다")
				ENDIF
			ENDIF
		CASE IS >= 2
			WIND_VELOCITY = 1
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 아까보다 바람이 약해졌다
	ENDSELECT
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;21 台風接近時の天気(暴風域・最接近)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_21
#DIM 지저
#DIM 現在台風位置
#DIM 颶風フラグ
#DIM 豪雨フラグ
#DIMS 低気圧位置
지저 = 0
低気圧位置 = %GET_LOCATION_LOW()%
颶風フラグ = 0
豪雨フラグ = 0

;台風勢力5以上、台風の位置が西かつ暖気5のとき豪雨フラグオン
SIF IS_TYPHOON:1 >= 5 && IS_TYPHOON:2 == 3 && POWER_WARM_AIR >= 5
	豪雨フラグ = 1

SELECTCASE 低気圧位置
	CASE "台風接近暴風域", "台風最接近"
		現在台風位置 = 1
	CASE "台風通過暴風域"
		現在台風位置 = 2
ENDSELECT

IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 3
		LOCAL = 16
	CASE 4, 5
		LOCAL = 24
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 3
			IF RAND:2 == 0
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ELSE
				TIME:5 = 4
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 내리기 시작했다！
			ENDIF
		CASE 4,6,7
			IF RAND:2 != 0
				TIME:5 = 5
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 억수같이 쏟아진다！
			ELSEIF RAND:2 == 0
				IF 豪雨フラグ == 1
					TIME:5 = 14
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 맹렬한 비가 되었다！
				ELSEIF 現在台風位置 == 2
					TIME:5 = 3
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 그친 것 같다
				ENDIF
			ELSE
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 그친 것 같다
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ENDIF
		CASE 5,14
			IF TIME:5 != 14 && 豪雨フラグ == 1
				TIME:5 = 14
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 비가 되었다！
			ELSEIF RAND:2 != 0 && 現在台風位置 == 2
				TIME:5 = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 비가 그친 것 같다
			ELSEIF RAND:2 != 0
				IF TIME:5 == 14
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 조금 비가 수그러들었다
				ELSE
					TIME:5 = 4
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 비가 약해졌다
				ENDIF
			ENDIF
		CASE 13,15
			TIME:5 = 5
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 억수같이 쏟아진다！
		CASEELSE
			TIME:5 = 4
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 비가 내리기 시작했다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
ENDSELECT

;台風勢力5以上、寒気1かつ暖気5のとき颶風フラグオン
SIF IS_TYPHOON:1 >= 5 && POWER_COLD_AIR == 1 && POWER_WARM_AIR >= 5
	颶風フラグ = 1

IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE WIND_VELOCITY
		CASE 0
			IF 颶風フラグ == 1
				WIND_VELOCITY = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 갑자기 맹렬한 바람이 되었다！
			ELSE
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 바람이 갑자기 거세졌다！
			ENDIF
		CASE 1
			WIND_VELOCITY = 2
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 더욱 바람이 거세졌다！
			;台風直撃による作物への影響
			IF FLAG:지주 > 0
				IF IS_TYPHOON:2 == 2
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			ENDIF
		CASE 2
			IF 颶風フラグ == 1 && 現在台風位置 == 1
				WIND_VELOCITY = 3
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 맹렬한 바람이 되었다！
				;猛烈な風による作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			ENDIF
		CASE IS >= 3
			IF 現在台風位置 == 2
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 아까보다 바람이 약해졌다
			ENDIF
	ENDSELECT
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;17 台風接近時の天気(台風の目)
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_17
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF CFLAG:MASTER:현재위치 != 천계
	IF IS_TYPHOON:1 < 3 && (TIME:5 != 2 || WIND_VELOCITY != 0)
		TIME:5 = 2
		WIND_VELOCITY = 0
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 바람이 잔잔해졌다
		;念のため相合い傘を解除
		FOR LOCAL,0,CHARANUM
			SIF TEQUIP:LOCAL:201
				TEQUIP:LOCAL:201 = 0
		NEXT
	ELSEIF TIME:5 != 0 || WIND_VELOCITY != 0
		TIME:5 = 0
		WIND_VELOCITY = 0
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 바람이 잔잔해졌다
		;念のため相合い傘を解除
		FOR LOCAL,0,CHARANUM
			SIF TEQUIP:LOCAL:201
				TEQUIP:LOCAL:201 = 0
		NEXT
	ENDIF
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0

;-------------------------------------------------
;18 霧の天気
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_18
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

;天候変化確率（標準は50%）
SELECTCASE TIME:5
	CASE 6, 7, 10
		LOCAL = 24
	CASEELSE
		LOCAL = 12
ENDSELECT

IF RAND:LOCAL + 1 <= 12 && CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 6
			TIME:5 = 7
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 비가 그쳤다
			;念のため相合い傘を解除
			FOR LOCAL,0,CHARANUM
				SIF TEQUIP:LOCAL:201
					TEQUIP:LOCAL:201 = 0
			NEXT
		CASE 10
			TIME:5 = 7
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 눈이 그쳤다
			;念のため相合い傘を解除
			FOR LOCAL,0,CHARANUM
				SIF TEQUIP:LOCAL:201
					TEQUIP:LOCAL:201 = 0
			NEXT
		CASE 7
			IF DAY:2 == 4
				TIME:5 = 10
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 가루눈이 되었다
			ELSE
				TIME:5 = 6
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 이슬비가 되었다
			ENDIF
		CASEELSE
			IF RAND:2 == 0
				TIME:5 = 7
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 안개가 끼기 시작했다
				;念のため相合い傘を解除
				FOR LOCAL,0,CHARANUM
					SIF TEQUIP:LOCAL:201
						TEQUIP:LOCAL:201 = 0
				NEXT
			ELSEIF DAY:2 == 4
				TIME:5 = 10
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 가루눈이 되었다
			ELSE
				TIME:5 = 6
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 이슬비가 되었다
			ENDIF
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 0,1,2,3
		CONTINUOUS_RAINFALL = 0
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;-------------------------------------------------
;19 疑似好天
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_19
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF CFLAG:MASTER:현재위치 != 천계
	IF TIME:5 != 1 || WIND_VELOCITY != 0
		TIME:5 = 1
		WIND_VELOCITY = 0
		SIF !CFLAG:MASTER:우후후 && !지저
			PRINTW 하늘이 맑게 개었다！！
		FOR LOCAL,0,CHARANUM
			SIF TEQUIP:LOCAL:201
				TEQUIP:LOCAL:201 = 0
		NEXT
	ENDIF
ENDIF

;雪崩発生フラグ判定
IF SNOW_COVERAGE >= 15 && CONTINUOUS_SNOWFALL >= 10
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 10 && CONTINUOUS_SNOWFALL >= 7 && WIND_VELOCITY >= 1
	POSSIBLITY_AVALANCHE = 1
ELSEIF SNOW_COVERAGE >= 5 && CONTINUOUS_SNOWFALL >= 5 && WIND_VELOCITY >= 2
	POSSIBLITY_AVALANCHE = 1
ELSE
	POSSIBLITY_AVALANCHE = 0
ENDIF

;-------------------------------------------------
;20 集中豪雨時の天気
;-------------------------------------------------
@CHANGE_WEATHER_SYSTEM_20
#DIM 지저
지저 = 0
IF CFLAG:MASTER:데이트중 == 9
	지저 = 1
ELSEIF CFLAG:MASTER:현재위치 == OMANEKIBEYA() && GROUPMATCH(CFLAG:MASTER:초대, 36, 37, 38, 49, 60, 64, 83, 84)
	지저 = 1
ENDIF
TIME:7 = 0

IF CFLAG:MASTER:현재위치 != 천계
	SELECTCASE TIME:5
		CASE 5
			SELECTCASE RAND:3
				CASE 0
					TIME:5 = 14
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 더욱 비가 거세졌다！
				CASE 1
					IF ATMOSPHERIC_INSTABILITY <= 0
						TIME:5 = 15
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 우박이 내리기 시작했다！
					ELSE
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					ENDIF
			ENDSELECT
		CASE 14
			SELECTCASE RAND:3
				CASE 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 조금 비가 수그러들었다
				CASE 1
					IF ATMOSPHERIC_INSTABILITY <= 0
						TIME:5 = 15
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 우박이 내리기 시작했다！
					ELSE
						TIME:5 = 13
						SIF !CFLAG:MASTER:우후후 && !지저
							PRINTW 싸라기눈이 내리기 시작했다！
					ENDIF
			ENDSELECT
		CASE 13,15
			SELECTCASE RAND:2
				CASE 0
					TIME:5 = 5
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 억수같이 쏟아진다！
				CASE 1
					TIME:5 = 14
					SIF !CFLAG:MASTER:우후후 && !지저
						PRINTW 맹렬한 비가 되었다！
			ENDSELECT
		CASEELSE
			TIME:5 = 14
			SIF !CFLAG:MASTER:우후후 && !지저
				PRINTW 맹렬한 비가 되었다！
	ENDSELECT
ENDIF

;連続降水カウンター
SELECTCASE TIME:5
	CASE 5
		CONTINUOUS_RAINFALL += 1
	CASE 14
		CONTINUOUS_RAINFALL += 3
	CASE 3,6,7,10,11
		CONTINUOUS_RAINFALL = MAX(0, CONTINUOUS_RAINFALL - 1)
ENDSELECT

;(天候パッチ)熱界雷時の処理　ダウンバースト発生
IF ATMOSPHERIC_INSTABILITY <= 0 && CFLAG:MASTER:현재위치 != 천계 && RAND:4 == 0
	IF ATMOSPHERIC_INSTABILITY <= -2 && RAND:2 == 0
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 거센 바람이다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASE 1
				WIND_VELOCITY = 2
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 더욱 바람이 거세졌다！
				;ダウンバーストによる作物への影響
				IF FLAG:지주 > 0
					FLAG:밭일성과 = MAX(0, FLAG:밭일성과 - 30)
					IS_STORM_CROP_DAMAGE ++
				ENDIF
			CASEELSE
				WIND_VELOCITY = 2
		ENDSELECT
	ELSE
		SELECTCASE WIND_VELOCITY
			CASE 0
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 바람이 거세졌다！
			CASE 1
				WIND_VELOCITY = 1
			CASEELSE
				WIND_VELOCITY = 1
				SIF !CFLAG:MASTER:우후후 && !지저
					PRINTW 아까보다 바람이 약해졌다
		ENDSELECT
	ENDIF
;強風である場合風がおさまる
ELSEIF CFLAG:MASTER:현재위치 != 천계 && WIND_VELOCITY != 0
	WIND_VELOCITY = 0
	SIF !CFLAG:MASTER:우후후 && !지저
		PRINTW 바람이 가라앉기 시작했다
ENDIF

;降雪・雪崩判定を解除
CONTINUOUS_SNOWFALL = 0
SNOW_COVERAGE = 0
POSSIBLITY_AVALANCHE = 0


code:
;------------------------------------
;長期予報に関する変数
;------------------------------------

;現在の長期天候傾向
;0=未設定 1=通常 2=エルニーニョ現象 3=ラニーニャ現象
#DIM SAVEDATA YEAR_WEATHER_CONTROL

;------------------------------------
;短期予報に関する変数
;------------------------------------

;現在のターム数
#DIM SAVEDATA NOW_TERM

;現在のタームにおける寒気の強さ
#DIM SAVEDATA POWER_COLD_AIR

;現在のタームにおける暖気の強さ
#DIM SAVEDATA POWER_WARM_AIR

;現在梅雨である
;第1引数：0=梅雨である　1=梅雨末期である
#DIM SAVEDATA IS_RAINY_SEASON1, 2

;現在秋雨である
#DIM SAVEDATA IS_RAINY_SEASON2

;現在寒冷渦が発生している
#DIM SAVEDATA IS_COLD_LOW

;寒冷渦の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_COLD_LOW, 3

;寒冷渦の勢力圏通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_TERRITORY_COLD_LOW, 3

;台風が発生している
;第1引数：0=発生している　1=勢力(1~5)　2=通過位置(1:可航半円 2:直撃 3:危険半円)　3=先駆降雨帯が発生している
#DIM SAVEDATA IS_TYPHOON, 4

;台風の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_TYPHOON, 3

;台風の強風域突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_WIND_ZONE_TYPHOON, 3

;台風の暴風域突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_STORM_AREA_TYPHOON, 3

;台風の最接近時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_CLOSEST_TYPHOON, 3

;台風の目通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_EYE_TYPHOON, 3

;台風の暴風域通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_STORM_AREA_TYPHOON, 3

;台風の強風域通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_WIND_ZONE_TYPHOON, 3

;日本海低気圧が発生している
;1=日本海低気圧が発生している　2=二つ玉低気圧が発生している
#DIM SAVEDATA IS_SoJ_LOW

;日本海低気圧の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_SoJ_LOW, 3

;日本海低気圧の最接近時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_CLOSEST_SoJ_LOW, 3

;疑似好天エリア通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_FAKE_FINE, 3

;日本海低気圧の通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_SoJ_LOW, 3

;南岸低気圧が発生している
#DIM SAVEDATA IS_SOUTHERN_LOW

;南岸低気圧の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_SOUTHERN_LOW, 3

;南岸低気圧の通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_SOUTHERN_LOW, 3

;春・秋の温帯低気圧の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_EXTRATROPICAL_LOW, 3

;春・秋の温帯低気圧の温暖前線通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_WARM_FRONT, 3

;春・秋の温帯低気圧の寒冷前線通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_COLD_FRONT, 3

;春・秋の温帯低気圧の勢力圏通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_EXTRATROPICAL_LOW, 3

;線状降水帯が発生している
;第1引数：0=発生している　1=勢力(1~2)
#DIM SAVEDATA IS_LINER_RAINBAND, 2

;線状降水帯の勢力圏突入時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_ENTER_TERRITORY_LINER_RAINBAND, 3

;線状降水帯の通過時刻
;第1引数：0=季節　1=日付　2=時間
#DIM SAVEDATA TIME_PASSAGE_LINER_RAINBAND, 3

;------------------------------------
;1日予報に関する変数
;------------------------------------

;霧が発生するか
#DIM SAVEDATA CAN_STRATUS

;積雲/積乱雲は発生するか
;0：発達度合い　0=発生せず 1=積雲 2=雄大積雲 3=積乱雲(入道雲) 4=積乱雲(かなとこ雲) 5=積乱雲(スーパーセル)
;1：直撃するかどうか
;2：風の強さ
#DIM SAVEDATA CAN_CUMULUS, 3

;積雲/積乱雲の勢力圏突入時刻
#DIM SAVEDATA TIME_ENTER_TERRITORY_CUMULUS

;積雲/積乱雲の最接近時刻
#DIM SAVEDATA TIME_CLOSEST_CUMULUS

;積雲/積乱雲の勢力圏通過時刻
#DIM SAVEDATA TIME_PASSAGE_CUMULUS

;天子による天候操作で天候変更が禁止されている
#DIM SAVEDATA FORBIDDEN_CHANGE_WEATHER

;1日の大気安定度(小さいほど不安定)
;熱雷発生判定に使用
#DIM SAVEDATA ATMOSPHERIC_INSTABILITY

;------------------------------------
;農作物関係
;------------------------------------

;寒気による被害量
#DIM SAVEDATA AMOUNT_COLD_CROP_DAMAGE

;冷害が発生した
#DIM SAVEDATA IS_COLD_CROP_DAMAGE

;風害が発生した
#DIM SAVEDATA IS_STORM_CROP_DAMAGE

;水害が発生した
#DIM SAVEDATA IS_FLOOD_CROP_DAMAGE

;------------------------------------
;その他変数
;------------------------------------

;風速
;0=通常 1=強風 2=暴風
#DIM SAVEDATA WIND_VELOCITY

;現在の天候管理
#DIM SAVEDATA NOW_WEATHER_CONTROL

;連続降水カウンター
#DIM SAVEDATA CONTINUOUS_RAINFALL

;連続降雪カウンター
#DIM SAVEDATA CONTINUOUS_SNOWFALL

;積雪量
#DIM SAVEDATA SNOW_COVERAGE

;雪崩発生フラグ
;1=表層雪崩 2=全層雪崩
#DIM SAVEDATA POSSIBLITY_AVALANCHE

;天候システム上の時間帯管理
#DIM SAVEDATA WEATHER_TIMEZOME

;------------------------------------
;気温関係
;長野市の気温を参照,摂氏温度を10倍
;------------------------------------

#DIM CONST 気温_春_1T_0時 = 14
#DIM CONST 気温_春_1T_1時 = 10
#DIM CONST 気温_春_1T_2時 = 7
#DIM CONST 気温_春_1T_3時 = 4
#DIM CONST 気温_春_1T_4時 = 2
#DIM CONST 気温_春_1T_5時 = 0
#DIM CONST 気温_春_1T_6時 = -2
#DIM CONST 気温_春_1T_7時 = 0
#DIM CONST 気温_春_1T_8時 = 11
#DIM CONST 気温_春_1T_9時 = 25
#DIM CONST 気温_春_1T_10時 = 40
#DIM CONST 気温_春_1T_11時 = 53
#DIM CONST 気温_春_1T_12時 = 65
#DIM CONST 気温_春_1T_13時 = 73
#DIM CONST 気温_春_1T_14時 = 75
#DIM CONST 気温_春_1T_15時 = 74
#DIM CONST 気温_春_1T_16時 = 67
#DIM CONST 気温_春_1T_17時 = 56
#DIM CONST 気温_春_1T_18時 = 44
#DIM CONST 気温_春_1T_19時 = 36
#DIM CONST 気温_春_1T_20時 = 30
#DIM CONST 気温_春_1T_21時 = 25
#DIM CONST 気温_春_1T_22時 = 21
#DIM CONST 気温_春_1T_23時 = 18

#DIM CONST 気温_春_2T_0時 = 35
#DIM CONST 気温_春_2T_1時 = 30
#DIM CONST 気温_春_2T_2時 = 26
#DIM CONST 気温_春_2T_3時 = 24
#DIM CONST 気温_春_2T_4時 = 21
#DIM CONST 気温_春_2T_5時 = 18
#DIM CONST 気温_春_2T_6時 = 17
#DIM CONST 気温_春_2T_7時 = 23
#DIM CONST 気温_春_2T_8時 = 36
#DIM CONST 気温_春_2T_9時 = 50
#DIM CONST 気温_春_2T_10時 = 66
#DIM CONST 気温_春_2T_11時 = 80
#DIM CONST 気温_春_2T_12時 = 92
#DIM CONST 気温_春_2T_13時 = 100
#DIM CONST 気温_春_2T_14時 = 103
#DIM CONST 気温_春_2T_15時 = 100
#DIM CONST 気温_春_2T_16時 = 93
#DIM CONST 気温_春_2T_17時 = 82
#DIM CONST 気温_春_2T_18時 = 69
#DIM CONST 気温_春_2T_19時 = 61
#DIM CONST 気温_春_2T_20時 = 54
#DIM CONST 気温_春_2T_21時 = 48
#DIM CONST 気温_春_2T_22時 = 44
#DIM CONST 気温_春_2T_23時 = 39

#DIM CONST 気温_春_3T_0時 = 66
#DIM CONST 気温_春_3T_1時 = 60
#DIM CONST 気温_春_3T_2時 = 56
#DIM CONST 気温_春_3T_3時 = 52
#DIM CONST 気温_春_3T_4時 = 49
#DIM CONST 気温_春_3T_5時 = 46
#DIM CONST 気温_春_3T_6時 = 46
#DIM CONST 気温_春_3T_7時 = 56
#DIM CONST 気温_春_3T_8時 = 71
#DIM CONST 気温_春_3T_9時 = 88
#DIM CONST 気温_春_3T_10時 = 105
#DIM CONST 気温_春_3T_11時 = 121
#DIM CONST 気温_春_3T_12時 = 132
#DIM CONST 気温_春_3T_13時 = 139
#DIM CONST 気温_春_3T_14時 = 141
#DIM CONST 気温_春_3T_15時 = 137
#DIM CONST 気温_春_3T_16時 = 129
#DIM CONST 気温_春_3T_17時 = 118
#DIM CONST 気温_春_3T_18時 = 105
#DIM CONST 気温_春_3T_19時 = 95
#DIM CONST 気温_春_3T_20時 = 88
#DIM CONST 気温_春_3T_21時 = 81
#DIM CONST 気温_春_3T_22時 = 76
#DIM CONST 気温_春_3T_23時 = 71

#DIM CONST 気温_春_4T_0時 = 99
#DIM CONST 気温_春_4T_1時 = 93
#DIM CONST 気温_春_4T_2時 = 89
#DIM CONST 気温_春_4T_3時 = 85
#DIM CONST 気温_春_4T_4時 = 81
#DIM CONST 気温_春_4T_5時 = 78
#DIM CONST 気温_春_4T_6時 = 81
#DIM CONST 気温_春_4T_7時 = 93
#DIM CONST 気温_春_4T_8時 = 109
#DIM CONST 気温_春_4T_9時 = 126
#DIM CONST 気温_春_4T_10時 = 143
#DIM CONST 気温_春_4T_11時 = 158
#DIM CONST 気温_春_4T_12時 = 169
#DIM CONST 気温_春_4T_13時 = 175
#DIM CONST 気温_春_4T_14時 = 177
#DIM CONST 気温_春_4T_15時 = 173
#DIM CONST 気温_春_4T_16時 = 164
#DIM CONST 気温_春_4T_17時 = 153
#DIM CONST 気温_春_4T_18時 = 140
#DIM CONST 気温_春_4T_19時 = 129
#DIM CONST 気温_春_4T_20時 = 121
#DIM CONST 気温_春_4T_21時 = 114
#DIM CONST 気温_春_4T_22時 = 108
#DIM CONST 気温_春_4T_23時 = 104

#DIM CONST 気温_春_5T_0時 = 126
#DIM CONST 気温_春_5T_1時 = 121
#DIM CONST 気温_春_5T_2時 = 116
#DIM CONST 気温_春_5T_3時 = 112
#DIM CONST 気温_春_5T_4時 = 109
#DIM CONST 気温_春_5T_5時 = 106
#DIM CONST 気温_春_5T_6時 = 111
#DIM CONST 気温_春_5T_7時 = 123
#DIM CONST 気温_春_5T_8時 = 138
#DIM CONST 気温_春_5T_9時 = 156
#DIM CONST 気温_春_5T_10時 = 173
#DIM CONST 気温_春_5T_11時 = 188
#DIM CONST 気温_春_5T_12時 = 199
#DIM CONST 気温_春_5T_13時 = 206
#DIM CONST 気温_春_5T_14時 = 207
#DIM CONST 気温_春_5T_15時 = 203
#DIM CONST 気温_春_5T_16時 = 194
#DIM CONST 気温_春_5T_17時 = 183
#DIM CONST 気温_春_5T_18時 = 170
#DIM CONST 気温_春_5T_19時 = 158
#DIM CONST 気温_春_5T_20時 = 149
#DIM CONST 気温_春_5T_21時 = 141
#DIM CONST 気温_春_5T_22時 = 136
#DIM CONST 気温_春_5T_23時 = 131

#DIM CONST 気温_春_6T_0時 = 150
#DIM CONST 気温_春_6T_1時 = 144
#DIM CONST 気温_春_6T_2時 = 140
#DIM CONST 気温_春_6T_3時 = 135
#DIM CONST 気温_春_6T_4時 = 132
#DIM CONST 気温_春_6T_5時 = 130
#DIM CONST 気温_春_6T_6時 = 136
#DIM CONST 気温_春_6T_7時 = 147
#DIM CONST 気温_春_6T_8時 = 162
#DIM CONST 気温_春_6T_9時 = 179
#DIM CONST 気温_春_6T_10時 = 194
#DIM CONST 気温_春_6T_11時 = 209
#DIM CONST 気温_春_6T_12時 = 219
#DIM CONST 気温_春_6T_13時 = 225
#DIM CONST 気温_春_6T_14時 = 225
#DIM CONST 気温_春_6T_15時 = 221
#DIM CONST 気温_春_6T_16時 = 213
#DIM CONST 気温_春_6T_17時 = 203
#DIM CONST 気温_春_6T_18時 = 191
#DIM CONST 気温_春_6T_19時 = 180
#DIM CONST 気温_春_6T_20時 = 172
#DIM CONST 気温_春_6T_21時 = 164
#DIM CONST 気温_春_6T_22時 = 159
#DIM CONST 気温_春_6T_23時 = 154

#DIM CONST 気温_夏_1T_0時 = 172
#DIM CONST 気温_夏_1T_1時 = 167
#DIM CONST 気温_夏_1T_2時 = 164
#DIM CONST 気温_夏_1T_3時 = 160
#DIM CONST 気温_夏_1T_4時 = 157
#DIM CONST 気温_夏_1T_5時 = 156
#DIM CONST 気温_夏_1T_6時 = 161
#DIM CONST 気温_夏_1T_7時 = 171
#DIM CONST 気温_夏_1T_8時 = 185
#DIM CONST 気温_夏_1T_9時 = 200
#DIM CONST 気温_夏_1T_10時 = 214
#DIM CONST 気温_夏_1T_11時 = 226
#DIM CONST 気温_夏_1T_12時 = 236
#DIM CONST 気温_夏_1T_13時 = 241
#DIM CONST 気温_夏_1T_14時 = 241
#DIM CONST 気温_夏_1T_15時 = 236
#DIM CONST 気温_夏_1T_16時 = 228
#DIM CONST 気温_夏_1T_17時 = 219
#DIM CONST 気温_夏_1T_18時 = 208
#DIM CONST 気温_夏_1T_19時 = 198
#DIM CONST 気温_夏_1T_20時 = 191
#DIM CONST 気温_夏_1T_21時 = 184
#DIM CONST 気温_夏_1T_22時 = 179
#DIM CONST 気温_夏_1T_23時 = 176

#DIM CONST 気温_夏_2T_0時 = 194
#DIM CONST 気温_夏_2T_1時 = 190
#DIM CONST 気温_夏_2T_2時 = 187
#DIM CONST 気温_夏_2T_3時 = 185
#DIM CONST 気温_夏_2T_4時 = 182
#DIM CONST 気温_夏_2T_5時 = 181
#DIM CONST 気温_夏_2T_6時 = 185
#DIM CONST 気温_夏_2T_7時 = 193
#DIM CONST 気温_夏_2T_8時 = 205
#DIM CONST 気温_夏_2T_9時 = 217
#DIM CONST 気温_夏_2T_10時 = 230
#DIM CONST 気温_夏_2T_11時 = 240
#DIM CONST 気温_夏_2T_12時 = 249
#DIM CONST 気温_夏_2T_13時 = 253
#DIM CONST 気温_夏_2T_14時 = 253
#DIM CONST 気温_夏_2T_15時 = 249
#DIM CONST 気温_夏_2T_16時 = 242
#DIM CONST 気温_夏_2T_17時 = 234
#DIM CONST 気温_夏_2T_18時 = 225
#DIM CONST 気温_夏_2T_19時 = 217
#DIM CONST 気温_夏_2T_20時 = 210
#DIM CONST 気温_夏_2T_21時 = 205
#DIM CONST 気温_夏_2T_22時 = 200
#DIM CONST 気温_夏_2T_23時 = 197

#DIM CONST 気温_夏_3T_0時 = 214
#DIM CONST 気温_夏_3T_1時 = 210
#DIM CONST 気温_夏_3T_2時 = 208
#DIM CONST 気温_夏_3T_3時 = 206
#DIM CONST 気温_夏_3T_4時 = 204
#DIM CONST 気温_夏_3T_5時 = 203
#DIM CONST 気温_夏_3T_6時 = 206
#DIM CONST 気温_夏_3T_7時 = 213
#DIM CONST 気温_夏_3T_8時 = 224
#DIM CONST 気温_夏_3T_9時 = 236
#DIM CONST 気温_夏_3T_10時 = 248
#DIM CONST 気温_夏_3T_11時 = 259
#DIM CONST 気温_夏_3T_12時 = 267
#DIM CONST 気温_夏_3T_13時 = 272
#DIM CONST 気温_夏_3T_14時 = 272
#DIM CONST 気温_夏_3T_15時 = 269
#DIM CONST 気温_夏_3T_16時 = 262
#DIM CONST 気温_夏_3T_17時 = 253
#DIM CONST 気温_夏_3T_18時 = 244
#DIM CONST 気温_夏_3T_19時 = 236
#DIM CONST 気温_夏_3T_20時 = 229
#DIM CONST 気温_夏_3T_21時 = 224
#DIM CONST 気温_夏_3T_22時 = 220
#DIM CONST 気温_夏_3T_23時 = 216

#DIM CONST 気温_夏_4T_0時 = 231
#DIM CONST 気温_夏_4T_1時 = 227
#DIM CONST 気温_夏_4T_2時 = 224
#DIM CONST 気温_夏_4T_3時 = 222
#DIM CONST 気温_夏_4T_4時 = 220
#DIM CONST 気温_夏_4T_5時 = 217
#DIM CONST 気温_夏_4T_6時 = 221
#DIM CONST 気温_夏_4T_7時 = 229
#DIM CONST 気温_夏_4T_8時 = 241
#DIM CONST 気温_夏_4T_9時 = 254
#DIM CONST 気温_夏_4T_10時 = 267
#DIM CONST 気温_夏_4T_11時 = 279
#DIM CONST 気温_夏_4T_12時 = 288
#DIM CONST 気温_夏_4T_13時 = 294
#DIM CONST 気温_夏_4T_14時 = 295
#DIM CONST 気温_夏_4T_15時 = 291
#DIM CONST 気温_夏_4T_16時 = 282
#DIM CONST 気温_夏_4T_17時 = 273
#DIM CONST 気温_夏_4T_18時 = 263
#DIM CONST 気温_夏_4T_19時 = 254
#DIM CONST 気温_夏_4T_20時 = 247
#DIM CONST 気温_夏_4T_21時 = 241
#DIM CONST 気温_夏_4T_22時 = 236
#DIM CONST 気温_夏_4T_23時 = 233

#DIM CONST 気温_夏_5T_0時 = 238
#DIM CONST 気温_夏_5T_1時 = 235
#DIM CONST 気温_夏_5T_2時 = 233
#DIM CONST 気温_夏_5T_3時 = 230
#DIM CONST 気温_夏_5T_4時 = 227
#DIM CONST 気温_夏_5T_5時 = 225
#DIM CONST 気温_夏_5T_6時 = 228
#DIM CONST 気温_夏_5T_7時 = 237
#DIM CONST 気温_夏_5T_8時 = 249
#DIM CONST 気温_夏_5T_9時 = 263
#DIM CONST 気温_夏_5T_10時 = 277
#DIM CONST 気温_夏_5T_11時 = 289
#DIM CONST 気温_夏_5T_12時 = 298
#DIM CONST 気温_夏_5T_13時 = 304
#DIM CONST 気温_夏_5T_14時 = 305
#DIM CONST 気温_夏_5T_15時 = 300
#DIM CONST 気温_夏_5T_16時 = 291
#DIM CONST 気温_夏_5T_17時 = 281
#DIM CONST 気温_夏_5T_18時 = 269
#DIM CONST 気温_夏_5T_19時 = 260
#DIM CONST 気温_夏_5T_20時 = 253
#DIM CONST 気温_夏_5T_21時 = 248
#DIM CONST 気温_夏_5T_22時 = 244
#DIM CONST 気温_夏_5T_23時 = 241

#DIM CONST 気温_夏_6T_0時 = 228
#DIM CONST 気温_夏_6T_1時 = 226
#DIM CONST 気温_夏_6T_2時 = 223
#DIM CONST 気温_夏_6T_3時 = 221
#DIM CONST 気温_夏_6T_4時 = 218
#DIM CONST 気温_夏_6T_5時 = 216
#DIM CONST 気温_夏_6T_6時 = 217
#DIM CONST 気温_夏_6T_7時 = 226
#DIM CONST 気温_夏_6T_8時 = 237
#DIM CONST 気温_夏_6T_9時 = 251
#DIM CONST 気温_夏_6T_10時 = 265
#DIM CONST 気温_夏_6T_11時 = 275
#DIM CONST 気温_夏_6T_12時 = 284
#DIM CONST 気温_夏_6T_13時 = 290
#DIM CONST 気温_夏_6T_14時 = 291
#DIM CONST 気温_夏_6T_15時 = 286
#DIM CONST 気温_夏_6T_16時 = 277
#DIM CONST 気温_夏_6T_17時 = 266
#DIM CONST 気温_夏_6T_18時 = 265
#DIM CONST 気温_夏_6T_19時 = 247
#DIM CONST 気温_夏_6T_20時 = 242
#DIM CONST 気温_夏_6T_21時 = 237
#DIM CONST 気温_夏_6T_22時 = 233
#DIM CONST 気温_夏_6T_23時 = 230

#DIM CONST 気温_秋_1T_0時 = 208
#DIM CONST 気温_秋_1T_1時 = 207
#DIM CONST 気温_秋_1T_2時 = 205
#DIM CONST 気温_秋_1T_3時 = 202
#DIM CONST 気温_秋_1T_4時 = 200
#DIM CONST 気温_秋_1T_5時 = 197
#DIM CONST 気温_秋_1T_6時 = 197
#DIM CONST 気温_秋_1T_7時 = 204
#DIM CONST 気温_秋_1T_8時 = 216
#DIM CONST 気温_秋_1T_9時 = 230
#DIM CONST 気温_秋_1T_10時 = 242
#DIM CONST 気温_秋_1T_11時 = 253
#DIM CONST 気温_秋_1T_12時 = 261
#DIM CONST 気温_秋_1T_13時 = 266
#DIM CONST 気温_秋_1T_14時 = 266
#DIM CONST 気温_秋_1T_15時 = 263
#DIM CONST 気温_秋_1T_16時 = 254
#DIM CONST 気温_秋_1T_17時 = 243
#DIM CONST 気温_秋_1T_18時 = 233
#DIM CONST 気温_秋_1T_19時 = 226
#DIM CONST 気温_秋_1T_20時 = 221
#DIM CONST 気温_秋_1T_21時 = 217
#DIM CONST 気温_秋_1T_22時 = 213
#DIM CONST 気温_秋_1T_23時 = 211

#DIM CONST 気温_秋_2T_0時 = 176
#DIM CONST 気温_秋_2T_1時 = 175
#DIM CONST 気温_秋_2T_2時 = 172
#DIM CONST 気温_秋_2T_3時 = 170
#DIM CONST 気温_秋_2T_4時 = 167
#DIM CONST 気温_秋_2T_5時 = 165
#DIM CONST 気温_秋_2T_6時 = 164
#DIM CONST 気温_秋_2T_7時 = 170
#DIM CONST 気温_秋_2T_8時 = 181
#DIM CONST 気温_秋_2T_9時 = 194
#DIM CONST 気温_秋_2T_10時 = 207
#DIM CONST 気温_秋_2T_11時 = 217
#DIM CONST 気温_秋_2T_12時 = 225
#DIM CONST 気温_秋_2T_13時 = 230
#DIM CONST 気温_秋_2T_14時 = 231
#DIM CONST 気温_秋_2T_15時 = 227
#DIM CONST 気温_秋_2T_16時 = 220
#DIM CONST 気温_秋_2T_17時 = 209
#DIM CONST 気温_秋_2T_18時 = 200
#DIM CONST 気温_秋_2T_19時 = 194
#DIM CONST 気温_秋_2T_20時 = 189
#DIM CONST 気温_秋_2T_21時 = 185
#DIM CONST 気温_秋_2T_22時 = 181
#DIM CONST 気温_秋_2T_23時 = 178

#DIM CONST 気温_秋_3T_0時 = 145
#DIM CONST 気温_秋_3T_1時 = 145
#DIM CONST 気温_秋_3T_2時 = 142
#DIM CONST 気温_秋_3T_3時 = 139
#DIM CONST 気温_秋_3T_4時 = 136
#DIM CONST 気温_秋_3T_5時 = 134
#DIM CONST 気温_秋_3T_6時 = 132
#DIM CONST 気温_秋_3T_7時 = 138
#DIM CONST 気温_秋_3T_8時 = 149
#DIM CONST 気温_秋_3T_9時 = 163
#DIM CONST 気温_秋_3T_10時 = 176
#DIM CONST 気温_秋_3T_11時 = 188
#DIM CONST 気温_秋_3T_12時 = 197
#DIM CONST 気温_秋_3T_13時 = 202
#DIM CONST 気温_秋_3T_14時 = 203
#DIM CONST 気温_秋_3T_15時 = 198
#DIM CONST 気温_秋_3T_16時 = 189
#DIM CONST 気温_秋_3T_17時 = 178
#DIM CONST 気温_秋_3T_18時 = 170
#DIM CONST 気温_秋_3T_19時 = 164
#DIM CONST 気温_秋_3T_20時 = 158
#DIM CONST 気温_秋_3T_21時 = 154
#DIM CONST 気温_秋_3T_22時 = 151
#DIM CONST 気温_秋_3T_23時 = 148

#DIM CONST 気温_秋_4T_0時 = 109
#DIM CONST 気温_秋_4T_1時 = 108
#DIM CONST 気温_秋_4T_2時 = 105
#DIM CONST 気温_秋_4T_3時 = 102
#DIM CONST 気温_秋_4T_4時 = 99
#DIM CONST 気温_秋_4T_5時 = 97
#DIM CONST 気温_秋_4T_6時 = 95
#DIM CONST 気温_秋_4T_7時 = 99
#DIM CONST 気温_秋_4T_8時 = 110
#DIM CONST 気温_秋_4T_9時 = 124
#DIM CONST 気温_秋_4T_10時 = 139
#DIM CONST 気温_秋_4T_11時 = 152
#DIM CONST 気温_秋_4T_12時 = 162
#DIM CONST 気温_秋_4T_13時 = 169
#DIM CONST 気温_秋_4T_14時 = 171
#DIM CONST 気温_秋_4T_15時 = 167
#DIM CONST 気温_秋_4T_16時 = 157
#DIM CONST 気温_秋_4T_17時 = 144
#DIM CONST 気温_秋_4T_18時 = 136
#DIM CONST 気温_秋_4T_19時 = 129
#DIM CONST 気温_秋_4T_20時 = 123
#DIM CONST 気温_秋_4T_21時 = 120
#DIM CONST 気温_秋_4T_22時 = 116
#DIM CONST 気温_秋_4T_23時 = 112

#DIM CONST 気温_秋_5T_0時 = 76
#DIM CONST 気温_秋_5T_1時 = 75
#DIM CONST 気温_秋_5T_2時 = 71
#DIM CONST 気温_秋_5T_3時 = 68
#DIM CONST 気温_秋_5T_4時 = 66
#DIM CONST 気温_秋_5T_5時 = 63
#DIM CONST 気温_秋_5T_6時 = 61
#DIM CONST 気温_秋_5T_7時 = 63
#DIM CONST 気温_秋_5T_8時 = 74
#DIM CONST 気温_秋_5T_9時 = 88
#DIM CONST 気温_秋_5T_10時 = 103
#DIM CONST 気温_秋_5T_11時 = 117
#DIM CONST 気温_秋_5T_12時 = 128
#DIM CONST 気温_秋_5T_13時 = 136
#DIM CONST 気温_秋_5T_14時 = 139
#DIM CONST 気温_秋_5T_15時 = 136
#DIM CONST 気温_秋_5T_16時 = 126
#DIM CONST 気温_秋_5T_17時 = 113
#DIM CONST 気温_秋_5T_18時 = 105
#DIM CONST 気温_秋_5T_19時 = 97
#DIM CONST 気温_秋_5T_20時 = 92
#DIM CONST 気温_秋_5T_21時 = 88
#DIM CONST 気温_秋_5T_22時 = 84
#DIM CONST 気温_秋_5T_23時 = 80

#DIM CONST 気温_秋_6T_0時 = 49
#DIM CONST 気温_秋_6T_1時 = 47
#DIM CONST 気温_秋_6T_2時 = 44
#DIM CONST 気温_秋_6T_3時 = 41
#DIM CONST 気温_秋_6T_4時 = 39
#DIM CONST 気温_秋_6T_5時 = 37
#DIM CONST 気温_秋_6T_6時 = 35
#DIM CONST 気温_秋_6T_7時 = 35
#DIM CONST 気温_秋_6T_8時 = 43
#DIM CONST 気温_秋_6T_9時 = 57
#DIM CONST 気温_秋_6T_10時 = 71
#DIM CONST 気温_秋_6T_11時 = 85
#DIM CONST 気温_秋_6T_12時 = 95
#DIM CONST 気温_秋_6T_13時 = 103
#DIM CONST 気温_秋_6T_14時 = 106
#DIM CONST 気温_秋_6T_15時 = 104
#DIM CONST 気温_秋_6T_16時 = 95
#DIM CONST 気温_秋_6T_17時 = 83
#DIM CONST 気温_秋_6T_18時 = 76
#DIM CONST 気温_秋_6T_19時 = 69
#DIM CONST 気温_秋_6T_20時 = 64
#DIM CONST 気温_秋_6T_21時 = 60
#DIM CONST 気温_秋_6T_22時 = 56
#DIM CONST 気温_秋_6T_23時 = 52

#DIM CONST 気温_冬_1T_0時 = 23
#DIM CONST 気温_冬_1T_1時 = 21
#DIM CONST 気温_冬_1T_2時 = 19
#DIM CONST 気温_冬_1T_3時 = 16
#DIM CONST 気温_冬_1T_4時 = 15
#DIM CONST 気温_冬_1T_5時 = 13
#DIM CONST 気温_冬_1T_6時 = 11
#DIM CONST 気温_冬_1T_7時 = 10
#DIM CONST 気温_冬_1T_8時 = 17
#DIM CONST 気温_冬_1T_9時 = 28
#DIM CONST 気温_冬_1T_10時 = 41
#DIM CONST 気温_冬_1T_11時 = 54
#DIM CONST 気温_冬_1T_12時 = 63
#DIM CONST 気温_冬_1T_13時 = 71
#DIM CONST 気温_冬_1T_14時 = 74
#DIM CONST 気温_冬_1T_15時 = 71
#DIM CONST 気温_冬_1T_16時 = 63
#DIM CONST 気温_冬_1T_17時 = 53
#DIM CONST 気温_冬_1T_18時 = 46
#DIM CONST 気温_冬_1T_19時 = 40
#DIM CONST 気温_冬_1T_20時 = 36
#DIM CONST 気温_冬_1T_21時 = 32
#DIM CONST 気温_冬_1T_22時 = 29
#DIM CONST 気温_冬_1T_23時 = 25

#DIM CONST 気温_冬_2T_0時 = 0
#DIM CONST 気温_冬_2T_1時 = -2
#DIM CONST 気温_冬_2T_2時 = -4
#DIM CONST 気温_冬_2T_3時 = -6
#DIM CONST 気温_冬_2T_4時 = -8
#DIM CONST 気温_冬_2T_5時 = -11
#DIM CONST 気温_冬_2T_6時 = -12
#DIM CONST 気温_冬_2T_7時 = -13
#DIM CONST 気温_冬_2T_8時 = -8
#DIM CONST 気温_冬_2T_9時 = 2
#DIM CONST 気温_冬_2T_10時 = 14
#DIM CONST 気温_冬_2T_11時 = 25
#DIM CONST 気温_冬_2T_12時 = 34
#DIM CONST 気温_冬_2T_13時 = 42
#DIM CONST 気温_冬_2T_14時 = 45
#DIM CONST 気温_冬_2T_15時 = 44
#DIM CONST 気温_冬_2T_16時 = 38
#DIM CONST 気温_冬_2T_17時 = 27
#DIM CONST 気温_冬_2T_18時 = 21
#DIM CONST 気温_冬_2T_19時 = 16
#DIM CONST 気温_冬_2T_20時 = 12
#DIM CONST 気温_冬_2T_21時 = 9
#DIM CONST 気温_冬_2T_22時 = 6
#DIM CONST 気温_冬_2T_23時 = 2

#DIM CONST 気温_冬_3T_0時 = -13
#DIM CONST 気温_冬_3T_1時 = -15
#DIM CONST 気温_冬_3T_2時 = -17
#DIM CONST 気温_冬_3T_3時 = -19
#DIM CONST 気温_冬_3T_4時 = -21
#DIM CONST 気温_冬_3T_5時 = -23
#DIM CONST 気温_冬_3T_6時 = -24
#DIM CONST 気温_冬_3T_7時 = -26
#DIM CONST 気温_冬_3T_8時 = -22
#DIM CONST 気温_冬_3T_9時 = -12
#DIM CONST 気温_冬_3T_10時 = 0
#DIM CONST 気温_冬_3T_11時 = 10
#DIM CONST 気温_冬_3T_12時 = 19
#DIM CONST 気温_冬_3T_13時 = 26
#DIM CONST 気温_冬_3T_14時 = 30
#DIM CONST 気温_冬_3T_15時 = 29
#DIM CONST 気温_冬_3T_16時 = 24
#DIM CONST 気温_冬_3T_17時 = 14
#DIM CONST 気温_冬_3T_18時 = 8
#DIM CONST 気温_冬_3T_19時 = 3
#DIM CONST 気温_冬_3T_20時 = -1
#DIM CONST 気温_冬_3T_21時 = -4
#DIM CONST 気温_冬_3T_22時 = -7
#DIM CONST 気温_冬_3T_23時 = -10

#DIM CONST 気温_冬_4T_0時 = -17
#DIM CONST 気温_冬_4T_1時 = -20
#DIM CONST 気温_冬_4T_2時 = -22
#DIM CONST 気温_冬_4T_3時 = -24
#DIM CONST 気温_冬_4T_4時 = -27
#DIM CONST 気温_冬_4T_5時 = -29
#DIM CONST 気温_冬_4T_6時 = -31
#DIM CONST 気温_冬_4T_7時 = -31
#DIM CONST 気温_冬_4T_8時 = -26
#DIM CONST 気温_冬_4T_9時 = -16
#DIM CONST 気温_冬_4T_10時 = -4
#DIM CONST 気温_冬_4T_11時 = 7
#DIM CONST 気温_冬_4T_12時 = 16
#DIM CONST 気温_冬_4T_13時 = 23
#DIM CONST 気温_冬_4T_14時 = 27
#DIM CONST 気温_冬_4T_15時 = 26
#DIM CONST 気温_冬_4T_16時 = 21
#DIM CONST 気温_冬_4T_17時 = 12
#DIM CONST 気温_冬_4T_18時 = 5
#DIM CONST 気温_冬_4T_19時 = 0
#DIM CONST 気温_冬_4T_20時 = -5
#DIM CONST 気温_冬_4T_21時 = -8
#DIM CONST 気温_冬_4T_22時 = -11
#DIM CONST 気温_冬_4T_23時 = -14

#DIM CONST 気温_冬_5T_0時 = -15
#DIM CONST 気温_冬_5T_1時 = -18
#DIM CONST 気温_冬_5T_2時 = -21
#DIM CONST 気温_冬_5T_3時 = -23
#DIM CONST 気温_冬_5T_4時 = -26
#DIM CONST 気温_冬_5T_5時 = -28
#DIM CONST 気温_冬_5T_6時 = -30
#DIM CONST 気温_冬_5T_7時 = -31
#DIM CONST 気温_冬_5T_8時 = -24
#DIM CONST 気温_冬_5T_9時 = -12
#DIM CONST 気温_冬_5T_10時 = 0
#DIM CONST 気温_冬_5T_11時 = 12
#DIM CONST 気温_冬_5T_12時 = 22
#DIM CONST 気温_冬_5T_13時 = 30
#DIM CONST 気温_冬_5T_14時 = 33
#DIM CONST 気温_冬_5T_15時 = 32
#DIM CONST 気温_冬_5T_16時 = 27
#DIM CONST 気温_冬_5T_17時 = 18
#DIM CONST 気温_冬_5T_18時 = 9
#DIM CONST 気温_冬_5T_19時 = 4
#DIM CONST 気温_冬_5T_20時 = -1
#DIM CONST 気温_冬_5T_21時 = -5
#DIM CONST 気温_冬_5T_22時 = -9
#DIM CONST 気温_冬_5T_23時 = -12

#DIM CONST 気温_冬_6T_0時 = -2
#DIM CONST 気温_冬_6T_1時 = -6
#DIM CONST 気温_冬_6T_2時 = -9
#DIM CONST 気温_冬_6T_3時 = -11
#DIM CONST 気温_冬_6T_4時 = -14
#DIM CONST 気温_冬_6T_5時 = -16
#DIM CONST 気温_冬_6T_6時 = -18
#DIM CONST 気温_冬_6T_7時 = -17
#DIM CONST 気温_冬_6T_8時 = -8
#DIM CONST 気温_冬_6T_9時 = 5
#DIM CONST 気温_冬_6T_10時 = 18
#DIM CONST 気温_冬_6T_11時 = 31
#DIM CONST 気温_冬_6T_12時 = 41
#DIM CONST 気温_冬_6T_13時 = 49
#DIM CONST 気温_冬_6T_14時 = 53
#DIM CONST 気温_冬_6T_15時 = 51
#DIM CONST 気温_冬_6T_16時 = 46
#DIM CONST 気温_冬_6T_17時 = 35
#DIM CONST 気温_冬_6T_18時 = 25
#DIM CONST 気温_冬_6T_19時 = 18
#DIM CONST 気温_冬_6T_20時 = 13
#DIM CONST 気温_冬_6T_21時 = 9
#DIM CONST 気温_冬_6T_22時 = 5
#DIM CONST 気温_冬_6T_23時 = 1

;------------------------------------
;色（気象関係）
;------------------------------------

#DIM CONST C_気象_注意報 = 0xf2e700
#DIM CONST C_気象_警報 = 0xff2800
#DIM CONST C_気象_土砂災害警戒情報 = 0xaa00aa
#DIM CONST C_気象_特別警報 = 0x0c000c

#DIM CONST C_気温_酷寒 = 0x002080
#DIM CONST C_気温_冬 = 0x0041ff
#DIM CONST C_気温_寒 = 0x0096ff
#DIM CONST C_気温_冷 = 0xb9ebff
#DIM CONST C_気温_涼 = 0xfffff0
#DIM CONST C_気温_温 = 0xffff96
#DIM CONST C_気温_暖 = 0xfaf500
#DIM CONST C_気温_夏 = 0xfa9900
#DIM CONST C_気温_真夏 = 0xff2800
#DIM CONST C_気温_猛暑 = 0xb40068

repo_name: DNS/eraTWKR

license: mit