戦闘練習ができるキャストイベント
置き場所:キャストイベント
備考:UDIさんの「UxAnswer」が必要です。
get UxAnswer( "練習機械初級「ドノれべるデノ訓練ヲ開始シマスカ?」","Lv1・1体,Lv1・3体,Lv3・1体,Lv3・3体,Lv5・1体,Lv5・3体,キャンセル" )
if it is "Lv1・1体" then
EventFight 1,0,0,1,1,1,2 --ここは、Timpani内で編集します。
else if it is "Lv1・3体" then
EventFight 1,1,1,1,1,1,2
else if it is "Lv3・1体" then
EventFight 1,0,0,3,1,1,2
else if it is "Lv3・3体" then
EventFight 1,1,1,3,3,3,2
else if it is "Lv5・1体" then
EventFight 1,0,0,5,1,1,2
else if it is "Lv5・3体" then
EventFight 1,1,1,5,5,5,2
else if it is "キャンセル" then
castTell "清火「今はいいか……。」",0,11002
end if
|
|
ステータス変化系魔法の上限を決めるためのスクリプト改造
作者:S口さん
オリジナルスクリプト:スタックスクリプト
on ReMultiplyST what,Num --かける
global gcount,MDATA
get item Num of ",,,9999,,9999,45,70,54,58,9999,9999,9999,9999,9999,63" --この数字を、ステータス書式に合わせて書き換えます。ステータス書式は、「TimpaniBase」スタック中、「高度な情報」にあります。
put min((item (Num) of line (gcount) of MDATA)*what,it) into item (Num) of line (gcount) of MDATA
end ReMultiplyST
|
|
戦闘のあと、所得金額とアイテムが表示されないようにするスクリプト改造
作者:名取さん
置き場所:マップバックグラウンドスクリプト
WinFightハンドラ中、
「--レベルチェック」
というコメントの直後の
「show cd fld id 15」
を削除、または注釈に変更
|
|
魔法や召喚を含む、攻撃によるダメージに、山なりの偏差をつけるスクリプト改造
オリジナルスクリプト:戦闘カードバックグラウンドスクリプト
「ShokanAtk1」ハンドラ、「HiddenAtk1」ハンドラそれぞれ全体を、次のものに置き換えます。
ダメージにランダム要素を付け加えるというアイデアは、S口さんから頂きました。本当にありがとうございました。
on ShokanAtk1 MagN,StOffset,Dchar,Ochar --召喚は相手の物理/魔法平均防御、回避を使う
global gcount,gDchar,MDATA,gAtkFlg
if Dchar is empty then put gDchar into Dchar else put Dchar into gDchar
if Ochar is empty then put gcount into Ochar
if MagN is empty then put 1 into MagN
if item 3 of line Dchar of MDATA <= 0 then
put empty into line Dchar of gAtkFlg
else
--攻撃がヒットしたら
if the random of 100 < (100*item (11+2) of (line Ochar of MDATA)/((item 12 of line Dchar of MDATA)+(item 14 of line Dchar of MDATA))*2) then
--ダメージ算出
put any item of "-4,-3,-3,-2,-2,-2,-1,-1,-1,-1,0,0,0,0,0,1,1,1,1,2,2,2,3,3,4" into R -- 改造分
-- 「""」内の数字の数をコントロールすることによって、山の形の乱数を制御します。
-- 『HyperPiece++』中、UDIさんの「偏った乱数」の項を参考にしました。
-- put round(-MagN*((item (7+2) of line Ochar of MDATA)^2/((item 8 of line Dchar of MDATA)+(item 10 of line Dchar of MDATA))*2)) into line Dchar of gAtkFlg
-- ↑元のスクリプトです
put round(-MagN*((item (7+2) of line Ochar of MDATA)^2/((item 8 of line Dchar of MDATA)+(item 10 of line Dchar of MDATA))*2)) into A -- 改造分
put A+R into line Dchar of gAtkFlg -- 改造分
else --攻撃をミスったら
put "Miss!" into line Dchar of gAtkFlg
end if
end if
end ShokanAtk1
--統合攻撃ハンドラ。内部演算と画像表示が分離しており、魔法攻撃も統合したもの。
--StOffsetに2を入れると魔法攻撃、空なら物理攻撃
on HiddenAtk1 MagN,StOffset,Dchar,Ochar --特技などで使うサンドイッチの前部分
global gcount,gDchar,MDATA,gAtkFlg
if Dchar is empty then put gDchar into Dchar else put Dchar into gDchar
if Ochar is empty then put gcount into Ochar
if MagN is empty then put 1 into MagN
if item 3 of line Dchar of MDATA <= 0 then
put empty into line Dchar of gAtkFlg
else
--攻撃がヒットしたら
if the random of 100 < (100*item (11+StOffset) of (line Ochar of MDATA)/item (12+StOffset) of line Dchar of MDATA) then
--ダメージ算出
put any item of "-4,-3,-3,-2,-2,-2,-1,-1,-1,-1,0,0,0,0,0,1,1,1,1,2,2,2,3,3,4" into R -- 改造分。
-- 「""」内の数字の数をコントロールすることによって、山の形の乱数を制御します。
-- 『HyperPiece++』中、UDIさんの「偏った乱数」の項を参考にしました。
-- put round(-MagN*((item (7+StOffset) of line Ochar of MDATA)^2/item (8+StOffset) of line Dchar of MDATA)) into line Dchar of gAtkFlg
-- ↑元のスクリプトです
put round(-MagN*((item (7+StOffset) of line Ochar of MDATA)^2/item (8+StOffset) of line Dchar of MDATA)) into A -- 改造分
put A+R into line Dchar of gAtkFlg -- 改造分
else --攻撃をミスったら
put "Miss!" into line Dchar of gAtkFlg
end if
end if
end HiddenAtk1
|
|
戦闘によるアイテム所得にランダム要素を付け加えるスクリプト
オリジナルスクリプト:戦闘カードバックグラウンドスクリプト
「WinFight」ハンドラ全体を、次のものに置き換えます。
on WinFight
global MDATA,gcount,GTconsItems,GTWeapItems,GTProtItems,GTAcceItems
--見事に勝利
--経験値
put (item 20 of line 4 of MDATA)+(item 20 of line 5 of MDATA)+(item 20 of line 6 of MDATA) into Exp
put 0 into MemN --頭数は?
repeat with i=1 to 3
if first item of line i of MDATA is not empty then add 1 to MemN
end repeat
--金、アイテム
put (item 35 of line 4 of MDATA)+(item 35 of line 5 of MDATA)+(item 35 of line 6 of MDATA) into Money
put empty into SoItems
repeat with i=1 to 3
get the random of 3 -- ここから改造スクリプト。ここではアイテム所得率を三分の一にします
if it is not 1 then
next repeat
end if -- 改造スクリプトはここまで
put item 27 of line i+3 of MDATA into kind
put item 28 of line i+3 of MDATA into what
if kind is not empty then
getItem kind,what
get offset(RETURN&kind&","&what,RETURN&SoItems)
put number of lines of char 1 to it of SoItems into LN
if it is not 0 then
add 1 to item 3 of line LN of SoItems
else put kind&","&what&",1" into line (number of lines of SoItems)+1 of SoItems
end if
end repeat
if Money > 0 then
setflg 1,ReadFlg(1)+Money
get "敵の所持金"&Money&"を手に入れた!"&RETURN&RETURN
else get "敵の所持金は手に入らなかった!"&RETURN&RETURN
if SoItems is not empty then
put empty into TempDATA
repeat with i=1 to number of lines of SoItems
put item 1 of line (item 2 of line i of SoItems) of the value of (item (item 1 of line i of SoItems) of "GTconsItems,GTweapItems,GTprotItems,GTacceItems")~
into line i of TempDATA
if (item 3 of line i of SoItems) > 1 then put " x"&(item 3 of line i of SoItems) after line i of TempDATA
end repeat
put "手に入れたアイテム:"&RETURN&RETURN&TempDATA after it
else put "アイテムは手に入らなかった。" after it
set height of cd fld id 15 to 16*(number of lines of it)+16
put it into cd fld id 15
-- 本番行きまーす
PlaySnd 5
--レベルチェック
show cd fld id 15
repeat with i=1 to 3
if item 3 of line i of MDATA > 0 then
add round(Exp/MemN) to item 20 of line i of MDATA
put round(100*(1.3)^(item 21 of line i of MDATA)) into REXP
if (item 20 of line i of MDATA) >= REXP then
--レベルアップだ
numdisp i,"LEVEL UP!"
subtract REXP from item 20 of line i of MDATA
add 1 to item 21 of line i of MDATA
multiply item 3 of line i of MDATA by 1.1
multiply item 5 of line i of MDATA by 1.1
else numdisp i,"Exp:"&round(Exp/MemN)
end if
end repeat
wait 30
hidem
end WinFight
|
|