Project1
标题:
无盾牌时战斗中“防御”选项无效。
[打印本页]
作者:
he11120
时间:
2012-4-14 19:44
标题:
无盾牌时战斗中“防御”选项无效。
求解做法。 dsu_plus_rewardpost_czw
作者:
hys111111
时间:
2012-4-14 19:59
从Scene_Battle3那里的第137行到when 3那里开始改成如下:
when 2 # 防御
# 演奏确定 SE
if $game_actors[@actor_index].armor != nil
$game_system.se_play($data_system.decision_se)
# 设置行动
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
# 转向下一位角色的指令输入
phase3_next_actor
else
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
end
when 3 # 物品
复制代码
作者:
忧雪の伤
时间:
2012-4-14 20:05
本帖最后由 忧雪の伤 于 2012-4-14 20:14 编辑
class Scene_Battle
alias yukinoshyan_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window *args
yukinoshyan_phase3_setup_command_window *args
if @active_battler.armor1_id.zero?
@actor_command_window.disable_item 2
else
@actor_command_window.refresh
end
end
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
if Input.trigger?(Input::C)
case @actor_command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
if @active_battler.armor1_id.zero?
return $game_system.se_play($data_system.buzzer_se)
end
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
end
return
end
end
end
复制代码
作者:
he11120
时间:
2012-4-14 22:10
本帖最后由 he11120 于 2012-4-14 22:10 编辑
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# 选项动态加强
# 作者:carol3
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
# 一般的命令选择行窗口。
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# width : 窗口的宽
# commands : 命令字符串序列
#--------------------------------------------------------------------------
def initialize(width, commands)
# 由命令的个数计算出窗口的高
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
@item = []
self.index = 0
refresh
@oldindex = 0
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
if i != self.index
draw_item_dis(i)
else
draw_item_active(i,@item[i])
end
end
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目编号
# color : 文字色
#--------------------------------------------------------------------------
def draw_item_dis(index)
self.contents.font.size -= 2
self.contents.font.color = disabled_color
rect = Rect.new(4+5, 32 * index, self.contents.width - 24, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
self.contents.font.size += 2
end
def draw_item_active(index, type)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(5,32*index+1,self.contents.width,32, @commands[index])
if type==1
self.contents.font.color = disabled_color
else
self.contents.font.color = Color.new(255,255,0,255)
end
self.contents.draw_text(4,32*index,self.contents.width,32, @commands[index])
end
#--------------------------------------------------------------------------
# ● 项目无效化
# index : 项目编号
#--------------------------------------------------------------------------
def disable_item(index)
@item[index] = 1
end
#--------------------------------------------------------------------------
# ● 刷新方法更新
#--------------------------------------------------------------------------
def update
super
#——这里使用的刷新方法比直接refresh节约很多内存
if self.index != @oldindex
@oldindex = self.index
refresh
end
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
我用了这个动态菜单选项的,选项灰度有点问题。(如果一个角色有盾牌,另一个没有,第二轮(同一场战斗)有盾牌的“防御”选项也变成灰的.(但还可以用)
作者:
忧雪の伤
时间:
2012-4-15 09:50
本帖最后由 忧雪の伤 于 2012-4-15 09:53 编辑
he11120 发表于 2012-4-14 22:10
我用了这个动态菜单选项的,选项灰度有点问题。(如果一个角色有盾牌,另一个没有,第二轮(同一场战斗)有 ...
class Scene_Battle
alias yukinoshyan_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window *args
@actor_command_window.instance_variable_get(:@item)[2] = 0
yukinoshyan_phase3_setup_command_window *args
if @active_battler.armor1_id.zero? || @active_battler.mp < 30
@actor_command_window.disable_item 2
else
@actor_command_window.refresh
end
end
def update_phase3_basic_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
phase3_prior_actor
return
end
if Input.trigger?(Input::C)
case @actor_command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
start_enemy_select
when 1
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 1
start_skill_select
when 2
if @active_battler.armor1_id.zero? || @active_battler.mp < 30
return $game_system.se_play($data_system.buzzer_se)
end
$game_system.se_play($data_system.decision_se)
@active_battler.mp = @active_battler.mp - 30
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 1
phase3_next_actor
when 3
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 2
start_item_select
end
return
end
end
end
复制代码
作者:
TCRL
时间:
2012-4-15 09:54
能冒昧问句:你这防御能减少多少伤害?要不然我们防御还打算回血回魔的,你这里还掉魔。
(善意提醒,可以无视,哈)
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1