赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 78 |
经验 | 15725 |
最后登录 | 2024-11-10 |
在线时间 | 1337 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7760
- 在线时间
- 1337 小时
- 注册时间
- 2015-8-15
- 帖子
- 751
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 金芒芒 于 2022-10-17 13:51 编辑
def shizi_board if Kboard.keyboard($R_Key_Q) return 1 elsif Kboard.keyboard($R_Key_W) return 2 elsif Kboard.keyboard($R_Key_A) return 3 elsif Kboard.keyboard($R_Key_S) return 4 elsif Kboard.keyboard($R_Key_D) return 5 end return end
def shizi_board
if Kboard.keyboard($R_Key_Q)
return 1
elsif Kboard.keyboard($R_Key_W)
return 2
elsif Kboard.keyboard($R_Key_A)
return 3
elsif Kboard.keyboard($R_Key_S)
return 4
elsif Kboard.keyboard($R_Key_D)
return 5
end
return
end
class ARPG def initialize @i1_window = Window_I1.new @i2_window = Window_I2.new @i3_window = Window_I3.new @i4_window = Window_I4.new end def dispose @i1_window.dispose @i2_window.dispose @i3_window.dispose @i4_window.dispose end def skill return @skill end ###################################################################### def update #========================================================================== #技能 #========================================================================== case shizi_board when 1 @skill = $data_skills[$game_variables[$变量段+1]] if $shizi_code[$game_variables[$变量段+1]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+1]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+1] == 0 Mess_Text.write ("该键位没有技能。") else Mess_Text.write ("技能还没冷却完毕。") end else $game_actors[1].sp -= @skill.sp_cost if @skill.scope >= 3 $game_actors[1].skill_effect($game_actors[1], @skill) $game_player.animation_id = @skill.animation1_id if @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id end # @skill.common_event_id > 0 if $data_skills[@skill.id].element_set != [] $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate end @i1_window.refresh end # @skill.scope >= 3 end # $shizi_code[@skill.id] != 0 when 2 @skill = $data_skills[$game_variables[$变量段+2]] if $shizi_code[$game_variables[$变量段+2]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+2]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+2] == 0 Mess_Text.write ("该键位没有技能。") else Mess_Text.write ("技能还没冷却完毕。") end else $game_actors[1].sp -= @skill.sp_cost if @skill.scope >= 3 $game_actors[1].skill_effect($game_actors[1], @skill) $game_player.animation_id = @skill.animation1_id if @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id end # @skill.common_event_id > 0 if $data_skills[@skill.id].element_set != [] $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate end @i1_window.refresh end # @skill.scope >= 3 end # $shizi_code[@skill.id] != 0 @i1_window.refresh when 3 @skill = $data_skills[$game_variables[$变量段+3]] if $shizi_code[$game_variables[$变量段+3]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+3]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+3] == 0 Mess_Text.write ("该键位没有技能。") else Mess_Text.write ("技能还没冷却完毕。") end else $game_actors[1].sp -= @skill.sp_cost if @skill.scope >= 3 $game_actors[1].skill_effect($game_actors[1], @skill) $game_player.animation_id = @skill.animation1_id if @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id end # @skill.common_event_id > 0 if $data_skills[@skill.id].element_set != [] $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate end @i1_window.refresh end # @skill.scope >= 3 end # $shizi_code[@skill.id] != 0 @i1_window.refresh when 4 @skill = $data_skills[$game_variables[$变量段+4]] if $shizi_code[$game_variables[$变量段+4]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+4]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+4] == 0 Mess_Text.write ("该键位没有技能。") else Mess_Text.write ("技能还没冷却完毕。") end else $game_actors[1].sp -= @skill.sp_cost if @skill.scope >= 3 $game_actors[1].skill_effect($game_actors[1], @skill) $game_player.animation_id = @skill.animation1_id if @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id end # @skill.common_event_id > 0 if $data_skills[@skill.id].element_set != [] $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate end @i1_window.refresh end # @skill.scope >= 3 end # $shizi_code[@skill.id] != 0 @i1_window.refresh when 5 @skill = $data_skills[$game_variables[$变量段+5]] if $shizi_code[$game_variables[$变量段+5]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+5]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+5] == 0 Mess_Text.write ("该键位没有技能。") else Mess_Text.write ("技能还没冷却完毕。") end else $game_actors[1].sp -= @skill.sp_cost if @skill.scope >= 3 $game_actors[1].skill_effect($game_actors[1], @skill) $game_player.animation_id = @skill.animation1_id if @skill.common_event_id > 0 $game_temp.common_event_id = @skill.common_event_id end # @skill.common_event_id > 0 if $data_skills[@skill.id].element_set != [] $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate end @i1_window.refresh end # @skill.scope >= 3 end # $shizi_code[@skill.id] != 0 @i1_window.refresh end #========================================================================== #技能冷却 #========================================================================== for i in 1...$shizi_code.size @刷新 = false @刷新 = true if $shizi_code[i] == 1 $shizi_code[i] -= 1 if $shizi_code[i] > 0 @i1_window.refresh if @刷新 == true end @i2_window.refresh_code #========================================================================== #物品 #========================================================================== case item_board when 1 if $shizi_code_item[$game_variables[$变量段+7]] != 0 or $game_party.item_can_use?($game_variables[$变量段+7]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+7] == 0 Mess_Text.write ("该键位没有物品。") else Mess_Text.write ("物品还没冷却完毕。") end else @item = $data_items[$game_variables[$变量段+7]] $game_actors[1].item_effect(@item) if @item.consumable $game_party.lose_item(@item.id, 1) end if @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id end $game_player.animation_id = @item.animation1_id if $data_items[@item.id].element_set != [] $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate end end @i1_window.refresh when 2 if $shizi_code_item[$game_variables[$变量段+8]] != 0 or $game_party.item_can_use?($game_variables[$变量段+8]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+7] == 0 Mess_Text.write ("该键位没有物品。") else Mess_Text.write ("物品还没冷却完毕。") end else @item = $data_items[$game_variables[$变量段+8]] $game_actors[1].item_effect(@item) if @item.consumable $game_party.lose_item(@item.id, 1) end if @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id end $game_player.animation_id = @item.animation1_id if $data_items[@item.id].element_set != [] $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate end end @i1_window.refresh when 3 if $shizi_code_item[$game_variables[$变量段+9]] != 0 or $game_party.item_can_use?($game_variables[$变量段+9]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+7] == 0 Mess_Text.write ("该键位没有物品。") else Mess_Text.write ("物品还没冷却完毕。") end else @item = $data_items[$game_variables[$变量段+9]] $game_actors[1].item_effect(@item) if @item.consumable $game_party.lose_item(@item.id, 1) end if @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id end $game_player.animation_id = @item.animation1_id if $data_items[@item.id].element_set != [] $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate end end @i1_window.refresh when 4 if $shizi_code_item[$game_variables[$变量段+10]] != 0 or $game_party.item_can_use?($game_variables[$变量段+10]) == false $game_system.se_play($data_system.buzzer_se) if $game_variables[$变量段+7] == 0 Mess_Text.write ("该键位没有物品。") else Mess_Text.write ("物品还没冷却完毕。") end else @item = $data_items[$game_variables[$变量段+10]] $game_actors[1].item_effect(@item) if @item.consumable $game_party.lose_item(@item.id, 1) end if @item.common_event_id > 0 $game_temp.common_event_id = @item.common_event_id end $game_player.animation_id = @item.animation1_id if $data_items[@item.id].element_set != [] $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate end end @i1_window.refresh end #========================================================================== #物品冷却 #========================================================================== for i in 1...$shizi_code_item.size @刷新 = false @刷新 = true if $shizi_code_item[i] == 1 $shizi_code_item[i] -= 1 if $shizi_code_item[i] > 0 @i1_window.refresh if @刷新 == true end @i4_window.refresh_code end ###################################################################### def update_menu @i1_window.refresh end #shizi end
class ARPG
def initialize
@i1_window = Window_I1.new
@i2_window = Window_I2.new
@i3_window = Window_I3.new
@i4_window = Window_I4.new
end
def dispose
@i1_window.dispose
@i2_window.dispose
@i3_window.dispose
@i4_window.dispose
end
def skill
return @skill
end
######################################################################
def update
#==========================================================================
#技能
#==========================================================================
case shizi_board
when 1
@skill = $data_skills[$game_variables[$变量段+1]]
if $shizi_code[$game_variables[$变量段+1]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+1]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+1] == 0
Mess_Text.write ("该键位没有技能。")
else
Mess_Text.write ("技能还没冷却完毕。")
end
else
$game_actors[1].sp -= @skill.sp_cost
if @skill.scope >= 3
$game_actors[1].skill_effect($game_actors[1], @skill)
$game_player.animation_id = @skill.animation1_id
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
end # @skill.common_event_id > 0
if $data_skills[@skill.id].element_set != []
$shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
end
@i1_window.refresh
end # @skill.scope >= 3
end # $shizi_code[@skill.id] != 0
when 2
@skill = $data_skills[$game_variables[$变量段+2]]
if $shizi_code[$game_variables[$变量段+2]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+2]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+2] == 0
Mess_Text.write ("该键位没有技能。")
else
Mess_Text.write ("技能还没冷却完毕。")
end
else
$game_actors[1].sp -= @skill.sp_cost
if @skill.scope >= 3
$game_actors[1].skill_effect($game_actors[1], @skill)
$game_player.animation_id = @skill.animation1_id
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
end # @skill.common_event_id > 0
if $data_skills[@skill.id].element_set != []
$shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
end
@i1_window.refresh
end # @skill.scope >= 3
end # $shizi_code[@skill.id] != 0
@i1_window.refresh
when 3
@skill = $data_skills[$game_variables[$变量段+3]]
if $shizi_code[$game_variables[$变量段+3]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+3]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+3] == 0
Mess_Text.write ("该键位没有技能。")
else
Mess_Text.write ("技能还没冷却完毕。")
end
else
$game_actors[1].sp -= @skill.sp_cost
if @skill.scope >= 3
$game_actors[1].skill_effect($game_actors[1], @skill)
$game_player.animation_id = @skill.animation1_id
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
end # @skill.common_event_id > 0
if $data_skills[@skill.id].element_set != []
$shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
end
@i1_window.refresh
end # @skill.scope >= 3
end # $shizi_code[@skill.id] != 0
@i1_window.refresh
when 4
@skill = $data_skills[$game_variables[$变量段+4]]
if $shizi_code[$game_variables[$变量段+4]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+4]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+4] == 0
Mess_Text.write ("该键位没有技能。")
else
Mess_Text.write ("技能还没冷却完毕。")
end
else
$game_actors[1].sp -= @skill.sp_cost
if @skill.scope >= 3
$game_actors[1].skill_effect($game_actors[1], @skill)
$game_player.animation_id = @skill.animation1_id
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
end # @skill.common_event_id > 0
if $data_skills[@skill.id].element_set != []
$shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
end
@i1_window.refresh
end # @skill.scope >= 3
end # $shizi_code[@skill.id] != 0
@i1_window.refresh
when 5
@skill = $data_skills[$game_variables[$变量段+5]]
if $shizi_code[$game_variables[$变量段+5]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+5]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+5] == 0
Mess_Text.write ("该键位没有技能。")
else
Mess_Text.write ("技能还没冷却完毕。")
end
else
$game_actors[1].sp -= @skill.sp_cost
if @skill.scope >= 3
$game_actors[1].skill_effect($game_actors[1], @skill)
$game_player.animation_id = @skill.animation1_id
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
end # @skill.common_event_id > 0
if $data_skills[@skill.id].element_set != []
$shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
end
@i1_window.refresh
end # @skill.scope >= 3
end # $shizi_code[@skill.id] != 0
@i1_window.refresh
end
#==========================================================================
#技能冷却
#==========================================================================
for i in 1...$shizi_code.size
@刷新 = false
@刷新 = true if $shizi_code[i] == 1
$shizi_code[i] -= 1 if $shizi_code[i] > 0
@i1_window.refresh if @刷新 == true
end
@i2_window.refresh_code
#==========================================================================
#物品
#==========================================================================
case item_board
when 1
if $shizi_code_item[$game_variables[$变量段+7]] != 0 or $game_party.item_can_use?($game_variables[$变量段+7]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+7] == 0
Mess_Text.write ("该键位没有物品。")
else
Mess_Text.write ("物品还没冷却完毕。")
end
else
@item = $data_items[$game_variables[$变量段+7]]
$game_actors[1].item_effect(@item)
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
end
$game_player.animation_id = @item.animation1_id
if $data_items[@item.id].element_set != []
$shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
end
end
@i1_window.refresh
when 2
if $shizi_code_item[$game_variables[$变量段+8]] != 0 or $game_party.item_can_use?($game_variables[$变量段+8]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+7] == 0
Mess_Text.write ("该键位没有物品。")
else
Mess_Text.write ("物品还没冷却完毕。")
end
else
@item = $data_items[$game_variables[$变量段+8]]
$game_actors[1].item_effect(@item)
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
end
$game_player.animation_id = @item.animation1_id
if $data_items[@item.id].element_set != []
$shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
end
end
@i1_window.refresh
when 3
if $shizi_code_item[$game_variables[$变量段+9]] != 0 or $game_party.item_can_use?($game_variables[$变量段+9]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+7] == 0
Mess_Text.write ("该键位没有物品。")
else
Mess_Text.write ("物品还没冷却完毕。")
end else
@item = $data_items[$game_variables[$变量段+9]]
$game_actors[1].item_effect(@item)
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
end
$game_player.animation_id = @item.animation1_id
if $data_items[@item.id].element_set != []
$shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
end
end
@i1_window.refresh
when 4
if $shizi_code_item[$game_variables[$变量段+10]] != 0 or $game_party.item_can_use?($game_variables[$变量段+10]) == false
$game_system.se_play($data_system.buzzer_se)
if $game_variables[$变量段+7] == 0
Mess_Text.write ("该键位没有物品。")
else
Mess_Text.write ("物品还没冷却完毕。")
end
else
@item = $data_items[$game_variables[$变量段+10]]
$game_actors[1].item_effect(@item)
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
end
$game_player.animation_id = @item.animation1_id
if $data_items[@item.id].element_set != []
$shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
end
end
@i1_window.refresh
end
#==========================================================================
#物品冷却
#==========================================================================
for i in 1...$shizi_code_item.size
@刷新 = false
@刷新 = true if $shizi_code_item[i] == 1
$shizi_code_item[i] -= 1 if $shizi_code_item[i] > 0
@i1_window.refresh if @刷新 == true
end
@i4_window.refresh_code
end
######################################################################
def update_menu
@i1_window.refresh
end
#shizi
end
$x = 60 #快捷键X坐标 $q = -280 #技能快捷键的坐标 $y = 410 #快捷键Y坐标 $w = 400 #快捷键窗口的大小 $f = 16 #字体大小 $o = 0 #透明度 $f_s = 40 #(Q,W,E,A,S,D)字体的width $f_w = 60 #(Q,W,E,A,S,D)字体的height $g = 12 #数量 花费SP 的字体大小 class Window_I3 < Window_Base def initialize super(-16, -16, 672, 640) self.contents = Bitmap.new("Graphics/Pictures/system_picture") self.z = 1 self.opacity = 0 end end class Window_I2 < Window_Base def initialize super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) self.z = 1002 self.opacity = 0 refresh_code end def refresh_code self.contents.clear if $game_variables[$变量段+1] != 0 and $data_skills[$game_variables[$变量段+1]].element_set != [] height_shizi = 24*$shizi_code[$game_variables[$变量段+1]]/$data_system.elements[$data_skills[$game_variables[$变量段+1]].element_set[0]].to_i/Graphics.frame_rate self.contents.fill_rect(377, 425, 24, height_shizi, Color.new(55,55,55,200)) end if $game_variables[$变量段+2] != 0 and $data_skills[$game_variables[$变量段+2]].element_set != [] height_shizi = 24*$shizi_code[$game_variables[$变量段+2]]/$data_system.elements[$data_skills[$game_variables[$变量段+2]].element_set[0]].to_i/Graphics.frame_rate self.contents.fill_rect(416, 425, 24, height_shizi, Color.new(55,55,55,200)) end if $game_variables[$变量段+3] != 0 and $data_skills[$game_variables[$变量段+3]].element_set != [] height_shizi = 24*$shizi_code[$game_variables[$变量段+3]]/$data_system.elements[$data_skills[$game_variables[$变量段+3]].element_set[0]].to_i/Graphics.frame_rate self.contents.fill_rect(455, 425, 24, height_shizi, Color.new(55,55,55,200)) end if $game_variables[$变量段+4] != 0 and $data_skills[$game_variables[$变量段+4]].element_set != [] height_shizi = 24*$shizi_code[$game_variables[$变量段+4]]/$data_system.elements[$data_skills[$game_variables[$变量段+4]].element_set[0]].to_i/Graphics.frame_rate self.contents.fill_rect(494, 425, 24, height_shizi,Color.new(55,55,55,200)) end if $game_variables[$变量段+5] != 0 and $data_skills[$game_variables[$变量段+5]].element_set != [] height_shizi = 24*$shizi_code[$game_variables[$变量段+5]]/$data_system.elements[$data_skills[$game_variables[$变量段+5]].element_set[0]].to_i/Graphics.frame_rate self.contents.fill_rect(533, 425, 24, height_shizi,Color.new(55,55,55,200)) end end end
$x = 60 #快捷键X坐标
$q = -280 #技能快捷键的坐标
$y = 410 #快捷键Y坐标
$w = 400 #快捷键窗口的大小
$f = 16 #字体大小
$o = 0 #透明度
$f_s = 40 #(Q,W,E,A,S,D)字体的width
$f_w = 60 #(Q,W,E,A,S,D)字体的height
$g = 12 #数量 花费SP 的字体大小
class Window_I3 < Window_Base
def initialize
super(-16, -16, 672, 640)
self.contents = Bitmap.new("Graphics/Pictures/system_picture")
self.z = 1
self.opacity = 0
end
end
class Window_I2 < Window_Base
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 1002
self.opacity = 0
refresh_code
end
def refresh_code
self.contents.clear
if $game_variables[$变量段+1] != 0 and $data_skills[$game_variables[$变量段+1]].element_set != []
height_shizi = 24*$shizi_code[$game_variables[$变量段+1]]/$data_system.elements[$data_skills[$game_variables[$变量段+1]].element_set[0]].to_i/Graphics.frame_rate
self.contents.fill_rect(377, 425, 24, height_shizi, Color.new(55,55,55,200))
end
if $game_variables[$变量段+2] != 0 and $data_skills[$game_variables[$变量段+2]].element_set != []
height_shizi = 24*$shizi_code[$game_variables[$变量段+2]]/$data_system.elements[$data_skills[$game_variables[$变量段+2]].element_set[0]].to_i/Graphics.frame_rate
self.contents.fill_rect(416, 425, 24, height_shizi, Color.new(55,55,55,200))
end
if $game_variables[$变量段+3] != 0 and $data_skills[$game_variables[$变量段+3]].element_set != []
height_shizi = 24*$shizi_code[$game_variables[$变量段+3]]/$data_system.elements[$data_skills[$game_variables[$变量段+3]].element_set[0]].to_i/Graphics.frame_rate
self.contents.fill_rect(455, 425, 24, height_shizi, Color.new(55,55,55,200))
end
if $game_variables[$变量段+4] != 0 and $data_skills[$game_variables[$变量段+4]].element_set != []
height_shizi = 24*$shizi_code[$game_variables[$变量段+4]]/$data_system.elements[$data_skills[$game_variables[$变量段+4]].element_set[0]].to_i/Graphics.frame_rate
self.contents.fill_rect(494, 425, 24, height_shizi,Color.new(55,55,55,200))
end
if $game_variables[$变量段+5] != 0 and $data_skills[$game_variables[$变量段+5]].element_set != []
height_shizi = 24*$shizi_code[$game_variables[$变量段+5]]/$data_system.elements[$data_skills[$game_variables[$变量段+5]].element_set[0]].to_i/Graphics.frame_rate
self.contents.fill_rect(533, 425, 24, height_shizi,Color.new(55,55,55,200))
end
end
end
class Window_I1 < Window_Base def initialize super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = $o self.z = 1001 refresh end def refresh self.contents.clear self.contents.font.size = $f
class Window_I1 < Window_Base
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = $o
self.z = 1001
refresh
end
def refresh
self.contents.clear
self.contents.font.size = $f
############################################################################ # 技能 # ############################################################################ if $game_variables[$变量段+1] != 0 @skill = $data_skills[$game_variables[$变量段+1]] bitmap = RPG::Cache.icon(@skill.icon_name) if $game_party.actors[0].skill_can_use?(@skill.id) self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),255) self.contents.font.color.set(255, 255, 255) self.contents.font.size = $g self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) else self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),160) self.contents.font.color.set(255, 255, 255,140) self.contents.font.size = $g self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) end end self.contents.font.size = $f self.contents.font.color.set( 250, 50, 50,255) ####################################################################### if $game_variables[$变量段+2] != 0 @skill = $data_skills[$game_variables[$变量段+2]] bitmap = RPG::Cache.icon(@skill.icon_name) if $game_party.actors[0].skill_can_use?(@skill.id) self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),255) self.contents.font.color.set(255, 255, 255) self.contents.font.size = $g self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) else self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),160) self.contents.font.color.set(255, 255, 255,140) self.contents.font.size = $g self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) end end self.contents.font.size = $f self.contents.font.color.set( 250, 50, 50,255) ######################################################################## if $game_variables[$变量段+3] != 0 @skill = $data_skills[$game_variables[$变量段+3]] bitmap = RPG::Cache.icon(@skill.icon_name) if $game_party.actors[0].skill_can_use?(@skill.id) self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),255) self.contents.font.color.set(255, 255, 255) self.contents.font.size = $g self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) else self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),160) self.contents.font.color.set(255, 255, 255,140) self.contents.font.size = $g self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) end end self.contents.font.size = $f self.contents.font.color.set( 250, 50, 50,255) ########################################################################## if $game_variables[$变量段+4] != 0 @skill = $data_skills[$game_variables[$变量段+4]] bitmap = RPG::Cache.icon(@skill.icon_name) if $game_party.actors[0].skill_can_use?(@skill.id) self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),255) self.contents.font.color.set(255, 255, 255) self.contents.font.size = $g self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) else self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),160) self.contents.font.color.set(255, 255, 255,140) self.contents.font.size = $g self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) end end self.contents.font.size = $f self.contents.font.color.set( 250, 50, 50,255) ############################################################################ if $game_variables[$变量段+5] != 0 @skill = $data_skills[$game_variables[$变量段+5]] bitmap = RPG::Cache.icon(@skill.icon_name) if $game_party.actors[0].skill_can_use?(@skill.id) self.contents.blt(534, 425, bitmap, Rect.new(0, 0, 24, 24),255) self.contents.font.color.set(255, 255, 255) self.contents.font.size = $g self.contents.draw_text(531, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0) else self.contents.blt(534, 425, bitmap, Rect.new(0, 0, 24, 24),160)[pre lang="ruby"]
############################################################################
# 技能 #
############################################################################
if $game_variables[$变量段+1] != 0
@skill = $data_skills[$game_variables[$变量段+1]]
bitmap = RPG::Cache.icon(@skill.icon_name)
if $game_party.actors[0].skill_can_use?(@skill.id)
self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),255)
self.contents.font.color.set(255, 255, 255)
self.contents.font.size = $g
self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
else
self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),160)
self.contents.font.color.set(255, 255, 255,140)
self.contents.font.size = $g
self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
end
end
self.contents.font.size = $f
self.contents.font.color.set( 250, 50, 50,255)
#######################################################################
if $game_variables[$变量段+2] != 0
@skill = $data_skills[$game_variables[$变量段+2]]
bitmap = RPG::Cache.icon(@skill.icon_name)
if $game_party.actors[0].skill_can_use?(@skill.id)
self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),255)
self.contents.font.color.set(255, 255, 255)
self.contents.font.size = $g
self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
else
self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),160)
self.contents.font.color.set(255, 255, 255,140)
self.contents.font.size = $g
self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
end
end
self.contents.font.size = $f
self.contents.font.color.set( 250, 50, 50,255)
########################################################################
if $game_variables[$变量段+3] != 0
@skill = $data_skills[$game_variables[$变量段+3]]
bitmap = RPG::Cache.icon(@skill.icon_name)
if $game_party.actors[0].skill_can_use?(@skill.id)
self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),255)
self.contents.font.color.set(255, 255, 255)
self.contents.font.size = $g
self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
else
self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),160)
self.contents.font.color.set(255, 255, 255,140)
self.contents.font.size = $g
self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
end
end
self.contents.font.size = $f
self.contents.font.color.set( 250, 50, 50,255)
##########################################################################
if $game_variables[$变量段+4] != 0
@skill = $data_skills[$game_variables[$变量段+4]]
bitmap = RPG::Cache.icon(@skill.icon_name)
if $game_party.actors[0].skill_can_use?(@skill.id)
self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),255)
self.contents.font.color.set(255, 255, 255)
self.contents.font.size = $g
self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
else
self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),160)
self.contents.font.color.set(255, 255, 255,140)
self.contents.font.size = $g
self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
end
end
self.contents.font.size = $f
self.contents.font.color.set( 250, 50, 50,255)
############################################################################
if $game_variables[$变量段+5] != 0
@skill = $data_skills[$game_variables[$变量段+5]]
bitmap = RPG::Cache.icon(@skill.icon_name)
if $game_party.actors[0].skill_can_use?(@skill.id)
self.contents.blt(534, 425, bitmap, Rect.new(0, 0, 24, 24),255)
self.contents.font.color.set(255, 255, 255)
self.contents.font.size = $g
self.contents.draw_text(531, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
else
self.contents.blt(534, 425, bitmap, Rect.new(0, 0, 24, 24),160)[pre lang="ruby"]
self.contents.font.color.set(255, 255, 255,140)
self.contents.font.size = $g
self.contents.draw_text(531, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
end
end
self.contents.font.size = $f
self.contents.font.color.set( 250, 50, 50,255)[/pre]
def skill_旋舞斩 for enemy in $game_map.events.values next if enemy.return_erased2 next if enemy.list == nil next if enemy.list[0].code != 108 next if enemy.list[1].parameters[0] != "敌人" px = $game_player.x py = $game_player.y if (px - enemy.x).abs <= 2 and (py - enemy.y).abs <= 1 case rand(10) when 0..8 enemy.damage = $data_skills[@skill.id].power enemy.damage_pop = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end when 9 enemy.damage = $data_skills[@skill.id].power*2 enemy.damage_pop = true enemy.critical = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end end Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。") end #伤害范围 end #定义event end #旋舞斩技能 #-------------------------------------------------------------------------- # ● 定义圣光 #-------------------------------------------------------------------------- def skill_圣光 for enemy in $game_map.events.values next if enemy.return_erased2 next if enemy.list == nil next if enemy.list[0].code != 108 next if enemy.list[1].parameters[0] != "敌人" px = $game_player.x py = $game_player.y if (px - enemy.x).abs <= 4 and (py - enemy.y).abs <= 2 case rand(10) when 0..8 enemy.damage = $data_skills[@skill.id].power enemy.damage_pop = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end when 9 enemy.damage = $data_skills[@skill.id].power*2 enemy.damage_pop = true enemy.critical = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end end Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。") end #伤害范围 end #定义event end #圣光技能 #------------------------------------------------
def skill_旋舞斩
for enemy in $game_map.events.values
next if enemy.return_erased2
next if enemy.list == nil
next if enemy.list[0].code != 108
next if enemy.list[1].parameters[0] != "敌人"
px = $game_player.x
py = $game_player.y
if (px - enemy.x).abs <= 2 and (py - enemy.y).abs <= 1
case rand(10)
when 0..8
enemy.damage = $data_skills[@skill.id].power
enemy.damage_pop = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
when 9
enemy.damage = $data_skills[@skill.id].power*2
enemy.damage_pop = true
enemy.critical = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
end
Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。")
end #伤害范围
end #定义event
end #旋舞斩技能
#--------------------------------------------------------------------------
# ● 定义圣光
#--------------------------------------------------------------------------
def skill_圣光
for enemy in $game_map.events.values
next if enemy.return_erased2
next if enemy.list == nil
next if enemy.list[0].code != 108
next if enemy.list[1].parameters[0] != "敌人"
px = $game_player.x
py = $game_player.y
if (px - enemy.x).abs <= 4 and (py - enemy.y).abs <= 2
case rand(10)
when 0..8
enemy.damage = $data_skills[@skill.id].power
enemy.damage_pop = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
when 9
enemy.damage = $data_skills[@skill.id].power*2
enemy.damage_pop = true
enemy.critical = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
end
Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。")
end #伤害范围
end #定义event
end #圣光技能
#------------------------------------------------
进入新地图就自动按快捷键依次是Q W A S D,自动释放技能不要人工操作
|
|