--1.15 on mouseUp global gcount,MDATA,gwait,GTmagics -- lock error dialogs hide me --if what is not empty then if gcount < 4 and (item 15 of line gcount of MDATA)<=0 then Turning gcount --end if repeat put (item 15 of line 1 of MDATA)&",7" into PreCount repeat with i=1 to 6 if line i of MDATA is not empty and item 3 of line i of MDATA >0 then get (item 15 of line i of MDATA) / (item 16 of line i of MDATA) if it < item 1 of PreCount then put it&","&i into PreCount end if end repeat repeat with i=1 to 6 if line i of MDATA is not empty and item 3 of line i of MDATA >0 then if i=(item 2 of PreCount) then put 0 into item 15 of line i of MDATA else subtract abs(item 16 of line i of MDATA)*(item 1 of PreCount) from item 15 of line i of MDATA end if end repeat if item 2 of Precount > 6 then put 1 into item 2 of Precount put item 2 of Precount into gcount if gcount < 4 then --ターン通知 --play "Crystal" charJump gcount put loc of cd btn ID gcount into btnLoc set loc of me to (item 1 of btnLoc)+54,(item 2 of btnLoc) set loc of cd btn id 13 to (item 1 of btnLoc)+54-136,(item 2 of btnLoc) put "攻撃"&RETURN&"アイテム"&RETURN&"逃げる" into me --魔法リストアップ put empty into TempDATA put empty into TempDATA2 repeat with i=38 to number of items of line gcount of MDATA put line (item i of line gcount of MDATA)*20-19 to (item i of line gcount of MDATA)*20 of GTmagics into MAGs repeat with j=1 to 20 if item 1 of line j of MAGS is not empty then put line j of MAGS into MAG if (item 21 of line gcount of MDATA) >= (item 5 of MAG) and (item 5 of line gcount of MDATA) >= (item 4 of MAG) then put (item 1 of MAG)&" -"&(item 4 of MAG) into line (number of lines of TempDATA)+1 of TempDATA put j+((item i of line gcount of MDATA)-1)*20 into line (number of lines of TempDATA) of TempDATA2 end if else exit repeat end repeat end repeat if TempDATA is not empty then put RETURN&"--"&RETURN&TempDATA after me put TempDATA2 into cd btn id gcount end if select line 1 of me show me get the mouseclick exit to hypercard else if gcount < 7 then ToMP 8 Turning gcount end if end repeat end mouseUp on Turning i global gcount,gDchar,MDATA,gwait,GTmagics,GTconsItems,BGMDATA add (10*item 16 of line 1 of MDATA) to item 15 of line gcount of MDATA if gcount > 3 then --敵側の処理 charJump gcount repeat with j=1 to 3 if item 3 of line j of MDATA >0 then put j after MA end repeat put any char of MA into gDchar --sendm (item 1 of line i of MDATA)&"の攻撃!" get (the random of 5)+37 if item it of line i of MDATA is not empty then put line (item it of line i of MDATA) of GTmagics into MAG if (item 21 of line i of MDATA) >= (item 5 of MAG) and (item 5 of line i of MDATA) >= (item 4 of MAG) then showm (item 1 of MAG) useTech item it of line i of MDATA else NormalAtk i,gDchar end if else NormalAtk i,gDchar end if else --ここから、味方側の処理 get word 2 of the selectedline of me if it is 1 then hide cd btn id 13 put SelectChar() into gDchar if gDchar is empty or gDchar is gcount then show me exit to hypercard end if get the random of 15 if it is 1 then put 2 into MagN else put 1 into MagN NormalAtk i,gDchar,MagN else if it is 2 then --アイテム使用 put empty into cd btn id 13 put empty into TempDATA put empty into TempDATA2 repeat with j=27 to number of lines of MDATA if item 1 of line j of MDATA = 1 then if item 3 of line (item 2 of line j of MDATA) of GTconsItems is empty then put item 1 of line (item 2 of line j of MDATA) of GTconsItems into line (number of lines of TempDATA)+1 of TempDATA put line j of MDATA into line (number of lines of TempDATA) of TempDATA2 if (item 3 of line j of MDATA) > 1 then put " x"&(item 3 of line j of MDATA) after last line of TempDATA end if end if else exit repeat end repeat if TempDATA is not empty then put TempDATA into cd btn id 13 put TempDATA2 into cd btn id (i+3) show cd btn id 13 end if show cd btn id 8 exit to hypercard else if it is 3 then --逃げる hide cd btn id 13 if ReadSubflg(3,2) is not empty then sendm "ここで逃げるわけには行かない!" show me exit to HyperCard else if CanRunAway() then sendm "逃げ切った!" --playBGM "",0 send GoTop to window (line 2 of BGMDATA) send "Play" to window (line 1 of BGMDATA) endFight else add (10*item 16 of line 1 of MDATA) to item 15 of line i of MDATA sendm "逃亡失敗!" exit Turning end if end if else if it >= 5 then --特技、魔法など hide cd btn id 13 put SelectChar() into gDchar if gDchar is empty then show me exit to hypercard end if put line it-4 of cd btn id i into MAGN showm (item 1 of line MAGN of GTmagics) useTech MAGN end if end if --end if --add (10*item 16 of line 1 of MDATA) to item 15 of line gcount of MDATA end Turning function CanRunAway global MDATA put empty into TempDATA put empty into TempDATA2 repeat with i=1 to 3 if item 3 of line i of MDATA > 0 then put item 16 of line i of MDATA into item (number of items of TempDATA)+1 of TempDATA if item 3 of line i+3 of MDATA > 0 then put item 16 of line i+3 of MDATA into item (number of items of TempDATA2)+1 of TempDATA2 end repeat return ((the random of (average(TempDATA))*2) < average(TempDATA2)) end CanRunAway