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

Project1

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

[有事请教] VA扩散技能脚本如何转换成MVZ插件

[复制链接]

Lv5.捕梦者

梦石
0
星屑
24287
在线时间
5046 小时
注册时间
2016-3-8
帖子
1618
跳转到指定楼层
1
发表于 2020-1-25 21:53:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 alexncf125 于 2024-1-25 01:45 编辑

另外,敵人不都有個編號
我想技能註解加入了<Neighbor_of_Target_Skill:擴散技能ID>時

如果隨機單個目標是3號,則2,4號再受到擴散技能ID攻擊

如果隨機三個目標是2,4,5號,則1,3,3,5,4,6號再受到一次擴散技能ID攻擊
即3號會受到2次擴散技能ID攻擊
4號會受到1次原本施放於目標的技能攻擊,1次擴散技能ID攻擊
  1. #encoding:utf-8

  2. =begin
  3. *******************************************************************************************
  4.    * 擴散技能 *for RGSS3 Ver 1.0.0
  5.    功能:特定技能可造成目標敵方與剩餘敵方不同的技能效果
  6.    使用方法:
  7.         將需要擁有擴散效果的技能註解中加入<Out_of_Target_Skill:擴散技能ID>
  8.         即可讓目標以外的剩餘敵人受到擴散技能效果
  9.         (目標本身並不會受影響,只會受到原本施放於目標的技能)
  10.    注意事項:
  11.         此腳本中直接改寫了Scene_Battle中的use_item方法,
  12.         插入其他腳本時請注意相依性
  13.     摘要:此腳本修改或重新定義以下類別:
  14.              ■ Scene_Battle
  15. *******************************************************************************************
  16. =end

  17. #encoding:utf-8
  18. #==============================================================================
  19. # ■ Scene_Battle
  20. #------------------------------------------------------------------------------
  21. #  戰斗畫面
  22. #==============================================================================

  23. class Scene_Battle < Scene_Base
  24.   #--------------------------------------------------------------------------
  25.   # ● 使用技能/物品 (修改)
  26.   #--------------------------------------------------------------------------
  27.   def use_item
  28.     item = @subject.current_action.item
  29.     @log_window.display_use_item(@subject, item)
  30.     @subject.use_item(item)
  31.     refresh_status
  32.     targets = @subject.current_action.make_targets.compact
  33.     if item.is_a?(RPG::Skill) && item.note =~ /<Out_of_Target_Skill:(\d+)>/i
  34.       all_targets = @subject.current_action.opponents_unit.alive_members
  35.       side_targets = all_targets - targets
  36.       side_item = $data_skills[$1.to_i]
  37.       show_animation_no_wait(targets, item.animation_id)
  38.       show_animation(side_targets, side_item.animation_id)
  39.       targets.each {|target| item.repeats.times { invoke_item(target, item) } }
  40.       side_targets.each {|target| side_item.repeats.times { invoke_item(target, side_item) } }
  41.     else
  42.       show_animation(targets, item.animation_id)
  43.       targets.each {|target| item.repeats.times { invoke_item(target, item) } }
  44.     end
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # ● 顯示動畫(不等待)
  48.   #     targets      : 目標的數組
  49.   #     animation_id : 動畫 ID(-1: 與普通攻擊一樣)
  50.   #--------------------------------------------------------------------------
  51.   def show_animation_no_wait(targets, animation_id)
  52.     if animation_id < 0
  53.       show_attack_animation(targets)
  54.     else
  55.       show_normal_animation(targets, animation_id)
  56.     end
  57.   end
  58. end
复制代码
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-4-26 13:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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