[PR]今日のニュースは
「Infoseek モバイル」

;はじめに:勝負は、最初にまず乱数を発生し、1(グー),2(チョキ),3(パー)をそれぞれ乱数に割り当て
;例えばコンピュータ1(グー)、プレーヤー3(パー)ならば、1(グー)の分岐に飛び、そこで引き算して
;3−1=−2の結果を得て、その答え(ここでは−2:パーの勝ち)で勝敗を判断しています。
*start
[cm]

;ogg_pluginのロード(音楽にogg形式のファイルを使用するため)。
[loadplugin module=wuvorbis.dll]

;代数dice_playerに0を代入、代数dice_comに0を代入。
[eval exp="f.dice_player=0"]
[eval exp="f.dice_com=0"]

じゃんけん勝負![l][r]

;BGMの開始
;[playbgm storage="fight00"]

最初はグー![l][r]
ジャーンケーン、ホイ!![l][r]

;ジャンケンの乱数の発生(1(グー),2(チョキ),3(パー))
[eval exp="f.dice_player=intrandom(1,3)"]
[eval exp="f.dice_com=intrandom(1,3)"]

;条件「乱数が3(パー)なら*select3へジャンプ」
[if exp="f.dice_com==3 "]
[jump target=*select3]
[endif]

;条件「乱数が2(チョキ)なら*select2へジャンプ」
[if exp="f.dice_com==2 "]
[jump target=*select2]
[endif]

;条件「乱数が1(グー)なら*select1へジャンプ」
[if exp="f.dice_com==1 "]
[jump target=*select1]
[endif]

;----------------------------------------------------------------------------------
;dice_com=3(パー)の時の相手の手(2,1又は3)の条件式。
*select3
[cm]
;条件「3−1=2ならパーの勝ち」
[if exp="f.dice_com-f.dice_player==2"]
コンピューター:パー。プレーヤー:グー。
paa win![l][r]
[endif]

;条件「3−2=1ならチョキの勝ち」
[if exp="f.dice_com-f.dice_player==1"]
コンピューター:パー。プレーヤー:チョキ。
choki win![l][r]
[endif]

;条件「3−3=0ならあいこ」
[if exp="f.dice_com-f.dice_player==0"]
コンピューター:パー。プレーヤー:パー。
aiko![l][r]
[endif]

;ジャンプ命令「*atogakiへ」
[jump target=*atogaki]

;----------------------------------------------------------------------------------
;dice_com=2(チョキ)の時の相手の手(3,1又は2)の条件式。
*select2
[cm]
;条件「2−3=−1ならパーの勝ち」
[if exp="f.dice_com-f.dice_player==-1"]
コンピューター:チョキ。プレーヤー:パー。
choki win![l][r]
[endif]

;条件「2−1=1ならグーに勝ち」
[if exp="f.dice_com-f.dice_player==1"]
コンピューター:チョキ。プレーヤー:グー。
goo win![l][r]
[endif]

;条件「2−2=0ならあいこ」
[if exp="f.dice_com-f.dice_player==0"]
コンピューター:チョキ。プレイヤー:チョキ。
aiko![l][r]
[endif]

;ジャンプ命令「*atogakiへ」
[jump target=*atogaki]

;----------------------------------------------------------------------------------
;dice_com=1(グー)の時の相手の手(2,3又は1)の条件式。
*select1
[cm]
;条件「1−2=−1ならグーの勝ち」
[if exp="f.dice_com-f.dice_player==-1"]
コンピューター:グー。プレーヤー:チョキ。
goo win![l][r]
[endif]

;条件「1−3=−2ならパーの勝ち」
[if exp="f.dice_com-f.dice_player==-2"]
コンピューター:グー。プレーヤー:パー。
paa win![l][r]
[endif]

;条件「1−1=0ならあいこ」
[if exp="f.dice_com-f.dice_player==0"]
コンピューター:グー。プレイヤー:グー。
aiko![l][r]
[endif]

;ジャンプ命令「*atogakiへ」
[jump target=*atogaki]

;---------------------------------------------------------------------------------
*atogaki

;BGMの停止
;[stopbgm]

;リンク命令「*startへ」
[link target=*start]もう一度やる[endlink]