设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1718|回复: 0
打印 上一主题 下一主题

[已经过期] 能在地图上事件依次自动执行快捷Q W A S D

[复制链接]

Lv4.逐梦者

梦石
0
星屑
7802
在线时间
1343 小时
注册时间
2015-8-15
帖子
752
跳转到指定楼层
1
发表于 2022-10-17 13:34:46 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 金芒芒 于 2022-10-17 13:51 编辑

RUBY 代码复制
  1. def shizi_board
  2.   if Kboard.keyboard($R_Key_Q)
  3.     return 1
  4.   elsif Kboard.keyboard($R_Key_W)
  5.     return 2
  6.   elsif Kboard.keyboard($R_Key_A)
  7.     return 3
  8.   elsif Kboard.keyboard($R_Key_S)
  9.     return 4
  10.   elsif Kboard.keyboard($R_Key_D)
  11.     return 5
  12.   end
  13.   return
  14. end


RUBY 代码复制
  1. class ARPG
  2.   def initialize
  3.     @i1_window = Window_I1.new
  4.     @i2_window = Window_I2.new
  5.     @i3_window = Window_I3.new
  6.     @i4_window = Window_I4.new
  7.   end
  8.   def dispose
  9.     @i1_window.dispose
  10.     @i2_window.dispose
  11.     @i3_window.dispose
  12.     @i4_window.dispose
  13.   end
  14.   def skill
  15.     return @skill
  16.   end
  17. ######################################################################
  18.  
  19.   def update
  20.     #==========================================================================
  21.     #技能
  22.     #==========================================================================
  23.     case shizi_board
  24.     when 1
  25.       @skill = $data_skills[$game_variables[$变量段+1]]
  26.       if $shizi_code[$game_variables[$变量段+1]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+1]) == false
  27.         $game_system.se_play($data_system.buzzer_se)
  28.         if $game_variables[$变量段+1] == 0
  29.           Mess_Text.write ("该键位没有技能。")
  30.         else
  31.           Mess_Text.write ("技能还没冷却完毕。")
  32.         end
  33.       else
  34.         $game_actors[1].sp -= @skill.sp_cost
  35.         if @skill.scope >= 3
  36.           $game_actors[1].skill_effect($game_actors[1], @skill)
  37.           $game_player.animation_id = @skill.animation1_id
  38.           if @skill.common_event_id > 0
  39.             $game_temp.common_event_id = @skill.common_event_id
  40.           end # @skill.common_event_id > 0
  41.           if $data_skills[@skill.id].element_set != []
  42.             $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
  43.           end
  44.           @i1_window.refresh
  45.         end # @skill.scope >= 3
  46.       end # $shizi_code[@skill.id] != 0
  47.     when 2
  48.       @skill = $data_skills[$game_variables[$变量段+2]]
  49.       if $shizi_code[$game_variables[$变量段+2]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+2]) == false
  50.         $game_system.se_play($data_system.buzzer_se)
  51.         if $game_variables[$变量段+2] == 0
  52.           Mess_Text.write ("该键位没有技能。")
  53.         else
  54.           Mess_Text.write ("技能还没冷却完毕。")
  55.         end
  56.       else
  57.         $game_actors[1].sp -= @skill.sp_cost
  58.         if @skill.scope >= 3
  59.           $game_actors[1].skill_effect($game_actors[1], @skill)
  60.           $game_player.animation_id = @skill.animation1_id
  61.           if @skill.common_event_id > 0
  62.             $game_temp.common_event_id = @skill.common_event_id
  63.           end # @skill.common_event_id > 0
  64.           if $data_skills[@skill.id].element_set != []
  65.             $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
  66.           end
  67.           @i1_window.refresh
  68.         end # @skill.scope >= 3
  69.       end # $shizi_code[@skill.id] != 0
  70.       @i1_window.refresh
  71.     when 3
  72.       @skill = $data_skills[$game_variables[$变量段+3]]
  73.       if $shizi_code[$game_variables[$变量段+3]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+3]) == false
  74.         $game_system.se_play($data_system.buzzer_se)
  75.         if $game_variables[$变量段+3] == 0
  76.           Mess_Text.write ("该键位没有技能。")
  77.         else
  78.           Mess_Text.write ("技能还没冷却完毕。")
  79.         end
  80.       else
  81.         $game_actors[1].sp -= @skill.sp_cost
  82.         if @skill.scope >= 3
  83.           $game_actors[1].skill_effect($game_actors[1], @skill)
  84.           $game_player.animation_id = @skill.animation1_id
  85.           if @skill.common_event_id > 0
  86.             $game_temp.common_event_id = @skill.common_event_id
  87.           end # @skill.common_event_id > 0
  88.           if $data_skills[@skill.id].element_set != []
  89.             $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
  90.           end
  91.           @i1_window.refresh
  92.         end # @skill.scope >= 3
  93.       end # $shizi_code[@skill.id] != 0
  94.       @i1_window.refresh
  95.     when 4
  96.       @skill = $data_skills[$game_variables[$变量段+4]]
  97.       if $shizi_code[$game_variables[$变量段+4]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+4]) == false
  98.         $game_system.se_play($data_system.buzzer_se)
  99.         if $game_variables[$变量段+4] == 0
  100.           Mess_Text.write ("该键位没有技能。")
  101.         else
  102.           Mess_Text.write ("技能还没冷却完毕。")
  103.         end
  104.       else
  105.         $game_actors[1].sp -= @skill.sp_cost
  106.         if @skill.scope >= 3
  107.           $game_actors[1].skill_effect($game_actors[1], @skill)
  108.           $game_player.animation_id = @skill.animation1_id
  109.           if @skill.common_event_id > 0
  110.             $game_temp.common_event_id = @skill.common_event_id
  111.           end # @skill.common_event_id > 0
  112.           if $data_skills[@skill.id].element_set != []
  113.             $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
  114.           end
  115.           @i1_window.refresh
  116.         end # @skill.scope >= 3
  117.       end # $shizi_code[@skill.id] != 0
  118.       @i1_window.refresh
  119.     when 5
  120.       @skill = $data_skills[$game_variables[$变量段+5]]
  121.       if $shizi_code[$game_variables[$变量段+5]] != 0 or $game_actors[1].skill_can_use?($game_variables[$变量段+5]) == false
  122.         $game_system.se_play($data_system.buzzer_se)
  123.         if $game_variables[$变量段+5] == 0
  124.           Mess_Text.write ("该键位没有技能。")
  125.         else
  126.           Mess_Text.write ("技能还没冷却完毕。")
  127.         end
  128.       else
  129.         $game_actors[1].sp -= @skill.sp_cost
  130.         if @skill.scope >= 3
  131.           $game_actors[1].skill_effect($game_actors[1], @skill)
  132.           $game_player.animation_id = @skill.animation1_id
  133.           if @skill.common_event_id > 0
  134.             $game_temp.common_event_id = @skill.common_event_id
  135.           end # @skill.common_event_id > 0
  136.           if $data_skills[@skill.id].element_set != []
  137.             $shizi_code[@skill.id] = $data_system.elements[$data_skills[@skill.id].element_set[0]].to_i * Graphics.frame_rate
  138.           end
  139.           @i1_window.refresh
  140.         end # @skill.scope >= 3
  141.       end # $shizi_code[@skill.id] != 0
  142.       @i1_window.refresh
  143.     end
  144.     #==========================================================================
  145.     #技能冷却
  146.     #==========================================================================
  147.     for i in 1...$shizi_code.size
  148.       @刷新 = false
  149.       @刷新 = true if $shizi_code[i] == 1
  150.       $shizi_code[i] -= 1 if $shizi_code[i] > 0
  151.       @i1_window.refresh if @刷新 == true
  152.     end
  153.     @i2_window.refresh_code
  154.     #==========================================================================
  155.     #物品
  156.     #==========================================================================
  157.     case item_board
  158.     when 1
  159.       if $shizi_code_item[$game_variables[$变量段+7]] != 0 or $game_party.item_can_use?($game_variables[$变量段+7]) == false
  160.         $game_system.se_play($data_system.buzzer_se)
  161.         if $game_variables[$变量段+7] == 0
  162.           Mess_Text.write ("该键位没有物品。")
  163.         else
  164.           Mess_Text.write ("物品还没冷却完毕。")
  165.         end
  166.       else
  167.         @item = $data_items[$game_variables[$变量段+7]]
  168.         $game_actors[1].item_effect(@item)
  169.         if @item.consumable
  170.           $game_party.lose_item(@item.id, 1)
  171.         end
  172.         if @item.common_event_id > 0
  173.           $game_temp.common_event_id = @item.common_event_id
  174.         end
  175.         $game_player.animation_id = @item.animation1_id
  176.         if $data_items[@item.id].element_set != []
  177.           $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
  178.         end
  179.       end
  180.       @i1_window.refresh
  181.     when 2
  182.       if $shizi_code_item[$game_variables[$变量段+8]] != 0 or $game_party.item_can_use?($game_variables[$变量段+8]) == false
  183.         $game_system.se_play($data_system.buzzer_se)
  184.         if $game_variables[$变量段+7] == 0
  185.           Mess_Text.write ("该键位没有物品。")
  186.         else
  187.           Mess_Text.write ("物品还没冷却完毕。")
  188.         end
  189.       else
  190.         @item = $data_items[$game_variables[$变量段+8]]
  191.         $game_actors[1].item_effect(@item)
  192.         if @item.consumable
  193.           $game_party.lose_item(@item.id, 1)
  194.         end
  195.         if @item.common_event_id > 0
  196.           $game_temp.common_event_id = @item.common_event_id
  197.         end
  198.         $game_player.animation_id = @item.animation1_id
  199.         if $data_items[@item.id].element_set != []
  200.           $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
  201.         end
  202.       end
  203.       @i1_window.refresh
  204.     when 3
  205.       if $shizi_code_item[$game_variables[$变量段+9]] != 0 or $game_party.item_can_use?($game_variables[$变量段+9]) == false
  206.         $game_system.se_play($data_system.buzzer_se)
  207.         if $game_variables[$变量段+7] == 0
  208.           Mess_Text.write ("该键位没有物品。")
  209.         else
  210.           Mess_Text.write ("物品还没冷却完毕。")
  211.         end      else
  212.         @item = $data_items[$game_variables[$变量段+9]]
  213.         $game_actors[1].item_effect(@item)
  214.         if @item.consumable
  215.           $game_party.lose_item(@item.id, 1)
  216.         end
  217.         if @item.common_event_id > 0
  218.           $game_temp.common_event_id = @item.common_event_id
  219.         end
  220.         $game_player.animation_id = @item.animation1_id
  221.         if $data_items[@item.id].element_set != []
  222.           $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
  223.         end
  224.       end
  225.       @i1_window.refresh
  226.     when 4
  227.       if $shizi_code_item[$game_variables[$变量段+10]] != 0 or $game_party.item_can_use?($game_variables[$变量段+10]) == false
  228.         $game_system.se_play($data_system.buzzer_se)
  229.         if $game_variables[$变量段+7] == 0
  230.           Mess_Text.write ("该键位没有物品。")
  231.         else
  232.           Mess_Text.write ("物品还没冷却完毕。")
  233.         end
  234.       else
  235.         @item = $data_items[$game_variables[$变量段+10]]
  236.         $game_actors[1].item_effect(@item)
  237.         if @item.consumable
  238.           $game_party.lose_item(@item.id, 1)
  239.         end
  240.         if @item.common_event_id > 0
  241.           $game_temp.common_event_id = @item.common_event_id
  242.         end
  243.         $game_player.animation_id = @item.animation1_id
  244.         if $data_items[@item.id].element_set != []
  245.           $shizi_code_item[@item.id] = $data_system.elements[$data_items[@item.id].element_set[0]].to_i * Graphics.frame_rate
  246.         end
  247.       end
  248.       @i1_window.refresh
  249.     end
  250.     #==========================================================================
  251.     #物品冷却
  252.     #==========================================================================
  253.     for i in 1...$shizi_code_item.size
  254.       @刷新 = false
  255.       @刷新 = true if $shizi_code_item[i] == 1
  256.       $shizi_code_item[i] -= 1 if $shizi_code_item[i] > 0
  257.       @i1_window.refresh if @刷新 == true
  258.     end
  259.     @i4_window.refresh_code
  260.   end
  261. ######################################################################
  262.   def update_menu
  263.     @i1_window.refresh
  264.   end
  265.   #shizi
  266. end



RUBY 代码复制
  1. $x = 60  #快捷键X坐标
  2. $q = -280 #技能快捷键的坐标
  3. $y = 410 #快捷键Y坐标
  4. $w = 400 #快捷键窗口的大小
  5. $f = 16  #字体大小
  6. $o = 0   #透明度
  7. $f_s = 40 #(Q,W,E,A,S,D)字体的width
  8. $f_w = 60 #(Q,W,E,A,S,D)字体的height
  9. $g = 12   #数量 花费SP 的字体大小
  10. class Window_I3 < Window_Base
  11.   def initialize
  12.     super(-16, -16, 672, 640)
  13.     self.contents = Bitmap.new("Graphics/Pictures/system_picture")
  14.     self.z = 1
  15.     self.opacity = 0
  16.   end
  17. end
  18. class Window_I2 < Window_Base
  19.   def initialize
  20.     super(0, 0, 640, 480)
  21.     self.contents = Bitmap.new(width - 32, height - 32)
  22.     self.z = 1002
  23.     self.opacity = 0
  24.     refresh_code
  25.   end
  26.   def refresh_code
  27.     self.contents.clear
  28.     if $game_variables[$变量段+1] != 0 and $data_skills[$game_variables[$变量段+1]].element_set != []
  29.       height_shizi = 24*$shizi_code[$game_variables[$变量段+1]]/$data_system.elements[$data_skills[$game_variables[$变量段+1]].element_set[0]].to_i/Graphics.frame_rate
  30.       self.contents.fill_rect(377, 425, 24, height_shizi, Color.new(55,55,55,200))
  31.     end
  32.     if $game_variables[$变量段+2] != 0 and $data_skills[$game_variables[$变量段+2]].element_set != []
  33.       height_shizi = 24*$shizi_code[$game_variables[$变量段+2]]/$data_system.elements[$data_skills[$game_variables[$变量段+2]].element_set[0]].to_i/Graphics.frame_rate
  34.       self.contents.fill_rect(416, 425, 24, height_shizi, Color.new(55,55,55,200))
  35.     end
  36.     if $game_variables[$变量段+3] != 0 and $data_skills[$game_variables[$变量段+3]].element_set != []
  37.       height_shizi = 24*$shizi_code[$game_variables[$变量段+3]]/$data_system.elements[$data_skills[$game_variables[$变量段+3]].element_set[0]].to_i/Graphics.frame_rate
  38.       self.contents.fill_rect(455, 425, 24, height_shizi, Color.new(55,55,55,200))
  39.     end
  40.     if $game_variables[$变量段+4] != 0 and $data_skills[$game_variables[$变量段+4]].element_set != []
  41.       height_shizi = 24*$shizi_code[$game_variables[$变量段+4]]/$data_system.elements[$data_skills[$game_variables[$变量段+4]].element_set[0]].to_i/Graphics.frame_rate
  42.       self.contents.fill_rect(494, 425, 24, height_shizi,Color.new(55,55,55,200))
  43.     end
  44.     if $game_variables[$变量段+5] != 0 and $data_skills[$game_variables[$变量段+5]].element_set != []
  45.       height_shizi = 24*$shizi_code[$game_variables[$变量段+5]]/$data_system.elements[$data_skills[$game_variables[$变量段+5]].element_set[0]].to_i/Graphics.frame_rate
  46.       self.contents.fill_rect(533, 425, 24, height_shizi,Color.new(55,55,55,200))
  47.     end
  48.   end
  49. end










RUBY 代码复制
  1. class Window_I1  < Window_Base
  2.   def initialize
  3.     super(0, 0, 640, 480)
  4.     self.contents = Bitmap.new(width - 32, height - 32)
  5.     self.opacity = $o
  6.     self.z = 1001
  7.     refresh
  8.   end
  9.   def refresh
  10.     self.contents.clear
  11.     self.contents.font.size = $f

RUBY 代码复制
  1. ############################################################################
  2. #                                 技能                                     #
  3. ############################################################################
  4.     if $game_variables[$变量段+1] != 0
  5.         @skill = $data_skills[$game_variables[$变量段+1]]
  6.         bitmap = RPG::Cache.icon(@skill.icon_name)
  7.         if $game_party.actors[0].skill_can_use?(@skill.id)
  8.           self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),255)
  9.           self.contents.font.color.set(255, 255, 255)
  10.           self.contents.font.size = $g
  11.           self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  12.         else
  13.           self.contents.blt(378, 425, bitmap, Rect.new(0, 0, 24, 24),160)
  14.           self.contents.font.color.set(255, 255, 255,140)
  15.           self.contents.font.size = $g
  16.           self.contents.draw_text(375, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  17.         end
  18.       end
  19.       self.contents.font.size = $f
  20.       self.contents.font.color.set( 250, 50, 50,255)
  21.     #######################################################################
  22.     if $game_variables[$变量段+2] != 0
  23.         @skill = $data_skills[$game_variables[$变量段+2]]
  24.         bitmap = RPG::Cache.icon(@skill.icon_name)
  25.         if $game_party.actors[0].skill_can_use?(@skill.id)
  26.           self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),255)
  27.           self.contents.font.color.set(255, 255, 255)
  28.           self.contents.font.size = $g
  29.           self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  30.         else
  31.           self.contents.blt(417, 425, bitmap, Rect.new(0, 0, 24, 24),160)
  32.           self.contents.font.color.set(255, 255, 255,140)
  33.           self.contents.font.size = $g
  34.           self.contents.draw_text(414, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  35.         end
  36.       end
  37.       self.contents.font.size = $f
  38.       self.contents.font.color.set( 250, 50, 50,255)
  39.    ########################################################################
  40.        if $game_variables[$变量段+3] != 0
  41.         @skill = $data_skills[$game_variables[$变量段+3]]
  42.         bitmap = RPG::Cache.icon(@skill.icon_name)
  43.         if $game_party.actors[0].skill_can_use?(@skill.id)
  44.           self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),255)
  45.           self.contents.font.color.set(255, 255, 255)
  46.           self.contents.font.size = $g
  47.           self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  48.         else
  49.           self.contents.blt(456, 425, bitmap, Rect.new(0, 0, 24, 24),160)
  50.           self.contents.font.color.set(255, 255, 255,140)
  51.           self.contents.font.size = $g
  52.           self.contents.draw_text(453, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  53.         end
  54.       end
  55.       self.contents.font.size = $f
  56.       self.contents.font.color.set( 250, 50, 50,255)
  57.   ##########################################################################
  58.          if $game_variables[$变量段+4] != 0
  59.         @skill = $data_skills[$game_variables[$变量段+4]]
  60.         bitmap = RPG::Cache.icon(@skill.icon_name)
  61.         if $game_party.actors[0].skill_can_use?(@skill.id)
  62.           self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),255)
  63.           self.contents.font.color.set(255, 255, 255)
  64.           self.contents.font.size = $g
  65.           self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  66.         else
  67.           self.contents.blt(456+39, 425, bitmap, Rect.new(0, 0, 24, 24),160)
  68.           self.contents.font.color.set(255, 255, 255,140)
  69.           self.contents.font.size = $g
  70.           self.contents.draw_text(456+36, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  71.         end
  72.       end
  73.       self.contents.font.size = $f
  74.       self.contents.font.color.set( 250, 50, 50,255)
  75. ############################################################################
  76.          if $game_variables[$变量段+5] != 0
  77.         @skill = $data_skills[$game_variables[$变量段+5]]
  78.         bitmap = RPG::Cache.icon(@skill.icon_name)
  79.         if $game_party.actors[0].skill_can_use?(@skill.id)
  80.           self.contents.blt(534, 425, bitmap, Rect.new(0, 0, 24, 24),255)
  81.           self.contents.font.color.set(255, 255, 255)
  82.           self.contents.font.size = $g
  83.           self.contents.draw_text(531, 427, 100, 32, @skill.sp_cost.to_s+"SP", 0)
  84.         else
  85.           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]

RUBY 代码复制
  1. def skill_旋舞斩
  2.   for enemy in $game_map.events.values
  3.     next if enemy.return_erased2
  4.     next if enemy.list == nil
  5.     next if enemy.list[0].code != 108
  6.     next if enemy.list[1].parameters[0] != "敌人"
  7. px = $game_player.x
  8. py = $game_player.y
  9. if (px - enemy.x).abs <= 2 and (py - enemy.y).abs <= 1
  10. case rand(10)  
  11. when 0..8
  12.       enemy.damage = $data_skills[@skill.id].power
  13.       enemy.damage_pop = true
  14. case $game_player.direction
  15.     when 2
  16.     enemy.jump(0, 1)
  17.     when 4
  18.     enemy.jump(-1, 0)
  19.     when 6
  20.     enemy.jump(1, 0)
  21.     when 8
  22.     enemy.jump(0, -1)
  23.     end
  24. when 9
  25.       enemy.damage = $data_skills[@skill.id].power*2
  26.       enemy.damage_pop = true
  27.       enemy.critical = true
  28. case $game_player.direction
  29.     when 2
  30.     enemy.jump(0, 1)
  31.     when 4
  32.     enemy.jump(-1, 0)
  33.     when 6
  34.     enemy.jump(1, 0)
  35.     when 8
  36.     enemy.jump(0, -1)
  37.     end
  38.     end
  39. Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。")
  40.       end #伤害范围
  41.     end #定义event
  42. end #旋舞斩技能
  43. #--------------------------------------------------------------------------
  44. # ● 定义圣光
  45. #--------------------------------------------------------------------------
  46. def skill_圣光
  47.   for enemy in $game_map.events.values
  48.     next if enemy.return_erased2
  49.     next if enemy.list == nil
  50.     next if enemy.list[0].code != 108
  51.     next if enemy.list[1].parameters[0] != "敌人"
  52. px = $game_player.x
  53. py = $game_player.y
  54. if (px - enemy.x).abs <= 4 and (py - enemy.y).abs <= 2
  55.   case rand(10)  
  56.     when 0..8
  57.     enemy.damage = $data_skills[@skill.id].power
  58.     enemy.damage_pop = true
  59.     case $game_player.direction
  60.     when 2
  61.     enemy.jump(0, 1)
  62.     when 4
  63.     enemy.jump(-1, 0)
  64.     when 6
  65.     enemy.jump(1, 0)
  66.     when 8
  67.     enemy.jump(0, -1)
  68.     end
  69.     when 9
  70.     enemy.damage = $data_skills[@skill.id].power*2
  71.     enemy.damage_pop = true
  72.     enemy.critical = true
  73.     case $game_player.direction
  74.     when 2
  75.     enemy.jump(0, 1)
  76.     when 4
  77.     enemy.jump(-1, 0)
  78.     when 6
  79.     enemy.jump(1, 0)
  80.     when 8
  81.     enemy.jump(0, -1)
  82.     end
  83.   end
  84. Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。")
  85.       end #伤害范围
  86.     end #定义event
  87.   end #圣光技能
  88. #------------------------------------------------


进入新地图就自动按快捷键依次是Q W A S D,自动释放技能不要人工操作

快捷方式.png (78.47 KB, 下载次数: 18)

快捷方式.png

按键.png (64.22 KB, 下载次数: 15)

按键.png
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-22 05:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表