Project1
标题:
撤退成功率问题。
[打印本页]
作者:
白魔导师宝儿
时间:
2014-3-12 13:20
标题:
撤退成功率问题。
请问如果队伍中有1号角色的话,撤退成功为80%
如果队伍没有没有1号角色的话,再按默认的成功率计算
请问要怎么做
作者:
彭格列第XI代
时间:
2014-3-12 17:57
在撤退判断的代码那加入判断,判断1号角色是否在队伍中
作者:
正太君
时间:
2014-3-12 20:51
#--------------------------------------------------------------------------
# ● 逃跑处理
#--------------------------------------------------------------------------
def process_escape
@info_viewport.visible = false
@message_window.visible = true
text = sprintf(Vocab::EscapeStart, $game_party.name)
$game_message.texts.push(text)
if $game_troop.preemptive
success = true
else
success = (rand(100) < @escape_ratio)
# 加下面一句就行了
success = (rand(100) < 80) if $game_party.members.include?($game_actors[1])
end
Sound.play_escape
if success
wait_for_message
battle_end(1)
else
@escape_ratio += 10
$game_message.texts.push('\.' + Vocab::EscapeFailure)
wait_for_message
$game_party.clear_actions
start_main
end
end
复制代码
作者:
白魔导师宝儿
时间:
2014-3-14 12:48
正太君 发表于 2014-3-12 20:51
多谢测试可行{:7_305:}
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1