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

Project1

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

[已经解决] 【ACE】绝对命中/绝对回避脚本的一些疑惑,希望有大佬解答

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1985
在线时间
176 小时
注册时间
2022-6-24
帖子
176
跳转到指定楼层
1
发表于 2022-7-4 05:24:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
RUBY 代码复制
  1. #==============================================================================
  2. # ■ RGSS3 絶対命中/絶対回避特徴&アイテム/スキル Ver1.00 by 星潟
  3. #------------------------------------------------------------------------------
  4. # 命中タイプ別、もしくは全てのアイテムについて
  5. # 絶対命中/絶対回避化させる特徴を作成する事ができるようになります。
  6. # また、絶対命中するアイテム/スキルの作成も可能になります。
  7. # 命中/回避関連の全てのスクリプトよりも下に配置される事をお勧めします。
  8. #==============================================================================
  9. # ★ 设置示例(设置在角色、敌人、状态、装备的备注栏)
  10. #------------------------------------------------------------------------------
  11. # <全絶対命中>
  12. #
  13. # このキャラクターによる全てのスキル/アイテムが絶対に命中します。
  14. #------------------------------------------------------------------------------
  15. # <必中絶対命中>
  16. #
  17. # このキャラクターによる命中タイプ:必中のスキル/アイテムが絶対に命中します。
  18. #------------------------------------------------------------------------------
  19. # <物理絶対命中>
  20. #
  21. # このキャラクターによる命中タイプ:物理のスキル/アイテムが絶対に命中します。
  22. #------------------------------------------------------------------------------
  23. # <魔法絶対命中>
  24. #
  25. # このキャラクターによる命中タイプ:魔法のスキル/アイテムが絶対に命中します。
  26. #------------------------------------------------------------------------------
  27. # <全絶対回避>
  28. #
  29. # このキャラクターが受ける全てのスキル/アイテムを絶対に回避します。
  30. #------------------------------------------------------------------------------
  31. # <必中絶対回避>
  32. #
  33. # このキャラクターが受ける命中タイプ:必中のスキル/アイテムを絶対に回避します。
  34. #------------------------------------------------------------------------------
  35. # <物理絶対回避>
  36. #
  37. # このキャラクターが受ける命中タイプ:物理のスキル/アイテムを絶対に回避します。
  38. #------------------------------------------------------------------------------
  39. # <魔法絶対回避>
  40. #
  41. # このキャラクターが受ける命中タイプ:魔法のスキル/アイテムを絶対に回避します。
  42. #==============================================================================
  43. # ★設定例(物品・技能的备忘录里)
  44. #------------------------------------------------------------------------------
  45. # <絶対命中>
  46. #
  47. # このスキル/アイテムは絶対に命中します。
  48. #==============================================================================
  49. module CertaintyHit
  50.  
  51.   #当同时计算绝对命中和绝对回避时
  52.   #判断优先绝对命中还是绝对回避。
  53.   #0 的情况下,优先考虑命中。
  54.   #1的情况下,优先回避。
  55.   #2的情况下,假定没有绝对命中或绝对回避,并进行原始处理。
  56.  
  57.   Type  = 2
  58.  
  59.   #特徴用の絶対命中化用キーワードを指定します。
  60.  
  61.   Words1 = ["必中絶対命中","物理絶対命中","魔法絶対命中","全絶対命中"]
  62.  
  63.   #特徴用の絶対回避化用キーワードを指定します。
  64.  
  65.   Words2 = ["必中絶対回避","物理絶対回避","魔法絶対回避","全絶対回避"]
  66.  
  67.   #スキル/アイテム用の絶対命中化用キーワードを指定します。
  68.  
  69.   Word = "絶対命中"
  70.  
  71.   #絶対命中時/絶対回避処理用の命中率及び回避率を設定します。
  72.   #絶対命中の場合は、命中に前者、回避に後者、
  73.   #絶対回避の場合は、命中に後者、回避に前者を使用します。
  74.  
  75.   Value = [9.99, -9.99]
  76.  
  77.   #--------------------------------------------------------------------------
  78.   # キーワード配列
  79.   #--------------------------------------------------------------------------
  80.   def self.words(type)
  81.     type ? Words1 : Words2
  82.   end
  83. end
  84. class Game_Battler < Game_BattlerBase
  85.   #--------------------------------------------------------------------------
  86.   # スキル/アイテムの命中率計算
  87.   #--------------------------------------------------------------------------
  88.   alias item_hit_certainty item_hit
  89.   def item_hit(user, item)
  90.  
  91.     #設定別に処理。
  92.  
  93.     case CertaintyHit::Type
  94.  
  95.     #絶対命中を優先する場合。
  96.  
  97.     when 0
  98.  
  99.       #絶対命中の場合は絶対命中用の値を返す。
  100.  
  101.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item)
  102.  
  103.       #絶対回避の場合は絶対回避用の値を返す。
  104.  
  105.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item)
  106.  
  107.     #絶対回避を優先する場合。
  108.  
  109.     when 1
  110.  
  111.       #絶対回避の場合は絶対回避用の値を返す。
  112.  
  113.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item)
  114.  
  115.       #絶対命中の場合は絶対命中用の値を返す。
  116.  
  117.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item)
  118.  
  119.     #絶対命中と絶対回避が打ち消し合う場合。
  120.  
  121.     when 2
  122.  
  123.       #絶対命中かつ絶対回避ではない場合は絶対命中用の値を返す。
  124.  
  125.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item) && !certainty_eva_execute(user, item)
  126.  
  127.       #絶対回避かつ絶対命中ではない場合は絶対回避用の値を返す。
  128.  
  129.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item) && !certainty_hit_execute(user, item)
  130.  
  131.     end
  132.  
  133.     #本来の処理を実行。
  134.  
  135.     item_hit_certainty(user, item)
  136.  
  137.   end
  138.   #--------------------------------------------------------------------------
  139.   # スキル/アイテムの回避率計算
  140.   #--------------------------------------------------------------------------
  141.   alias item_eva_certainty item_eva
  142.   def item_eva(user, item)
  143.  
  144.     #設定別に処理。
  145.  
  146.     case CertaintyHit::Type
  147.  
  148.     #絶対命中を優先する場合。
  149.  
  150.     when 0
  151.  
  152.       #絶対命中の場合は絶対命中用の値を返す。
  153.  
  154.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item)
  155.  
  156.       #絶対回避の場合は絶対回避用の値を返す。
  157.  
  158.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item)
  159.  
  160.     #絶対回避を優先する場合。
  161.  
  162.     when 1
  163.  
  164.       #絶対回避の場合は絶対回避用の値を返す。
  165.  
  166.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item)
  167.  
  168.       #絶対命中の場合は絶対命中用の値を返す。
  169.  
  170.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item)
  171.  
  172.     #絶対命中と絶対回避が打ち消し合う場合。
  173.  
  174.     when 2
  175.  
  176.       #絶対命中かつ絶対回避ではない場合は絶対命中用の値を返す。
  177.  
  178.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item) && !certainty_eva_execute(user, item)
  179.  
  180.       #絶対回避かつ絶対命中ではない場合は絶対回避用の値を返す。
  181.  
  182.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item) && !certainty_hit_execute(user, item)
  183.  
  184.     end
  185.  
  186.     #本来の処理を実行。
  187.  
  188.     item_eva_certainty(user, item)
  189.  
  190.   end
  191.   #--------------------------------------------------------------------------
  192.   # 絶対命中
  193.   #--------------------------------------------------------------------------
  194.   def certainty_hit_execute(user, item)
  195.  
  196.     #絶対命中スキル/アイテムの場合はtrueを返す。
  197.  
  198.     return true if item.certainty_hit_item
  199.  
  200.     #全絶対命中の場合はtrueを返す。
  201.  
  202.     return true if user.certainty_hit(3) or user.certainty_hit(item.hit_type)
  203.  
  204.     #falseを返す。
  205.  
  206.     false
  207.  
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # 絶対回避
  211.   #--------------------------------------------------------------------------
  212.   def certainty_eva_execute(user, item)
  213.  
  214.     #味方へのスキルの場合は絶対回避は行わない。
  215.     #スキルが味方対象かつ敵対象ではなく
  216.     #使用者がアクターであり対象がアクターであるか
  217.     #使用者がエネミーであり対象がエネミーである場合はfalseとする。
  218.     #(無意味な処理に見えるかもしれませんが、主に競合対策の処理です)
  219.  
  220.     return false if item.for_friend? && !item.for_opponent? && user.actor? == self.actor?
  221.  
  222.     #全絶対回避の場合はtrueを返す。
  223.  
  224.     return true if certainty_eva(3) or certainty_eva(item.hit_type)
  225.  
  226.     #falseを返す。
  227.  
  228.     false
  229.  
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # 絶対命中データを取得
  233.   #--------------------------------------------------------------------------
  234.   def certainty_hit(type)
  235.     feature_objects.any? {|f| f.certainty_hit_array[type]}
  236.   end
  237.   #--------------------------------------------------------------------------
  238.   # 絶対回避データを取得
  239.   #--------------------------------------------------------------------------
  240.   def certainty_eva(type)
  241.     feature_objects.any? {|f| f.certainty_eva_array[type]}
  242.   end
  243. end
  244. class RPG::BaseItem
  245.   #--------------------------------------------------------------------------
  246.   # 絶対命中配列を取得
  247.   #--------------------------------------------------------------------------
  248.   def certainty_hit_array
  249.     @certainty_hit_array ||= create_certainty_hit_eva_array(true)
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # 絶対回避配列を取得
  253.   #--------------------------------------------------------------------------
  254.   def certainty_eva_array
  255.     @certainty_eva_array ||= create_certainty_hit_eva_array(false)
  256.   end
  257.   #--------------------------------------------------------------------------
  258.   # 絶対命中/回避配列を作成
  259.   #--------------------------------------------------------------------------
  260.   def create_certainty_hit_eva_array(type)
  261.     CertaintyHit.words(type).inject([]) {|r,t| r.push(/<#{t}>/ =~ note)}
  262.   end
  263. end
  264. class RPG::UsableItem < RPG::BaseItem
  265.   #--------------------------------------------------------------------------
  266.   # 絶対命中アイテム
  267.   #--------------------------------------------------------------------------
  268.   def certainty_hit_item
  269.     (@certainty_hit_item ||= /<#{CertaintyHit::Word}>/ =~ note ? 1 : 0) == 1
  270.   end
  271. end


这个脚本的已经差不多是会用了(机翻注释加尝试),但是还是有两个不理解的地方,就是最下方放在技能里的绝对命中,他是怎么判断有绝对回避时的情况呢?还有Value(76行)里面的作用是什么?是否是判断绝对命中的?
在尝试做游戏了,但还是个菜狗(结果现在编程,音乐和剧情设计没开始学,画画也暂时没时间学了(;д;))

(个人精神状况不是很好,有时会说出一些奇怪且根本没法理解意思的话,直接无视就好,如果说出的话不小心冒犯到你,我会在精神状况良好时和你道歉的(`・ω・´)(不过一般在感觉到不适时会直接下线,请勿过于担心))

Lv3.寻梦者

梦石
0
星屑
1985
在线时间
176 小时
注册时间
2022-6-24
帖子
176
2
 楼主| 发表于 2022-7-4 05:47:23 | 只看该作者
  1. #==============================================================================
  2. # ■ RGSS3 絶対命中/絶対回避特徴&アイテム/スキル Ver1.00 by 星潟
  3. #------------------------------------------------------------------------------
  4. # 命中タイプ別、もしくは全てのアイテムについて
  5. # 絶対命中/絶対回避化させる特徴を作成する事ができるようになります。
  6. # また、絶対命中するアイテム/スキルの作成も可能になります。
  7. # 命中/回避関連の全てのスクリプトよりも下に配置される事をお勧めします。
  8. #==============================================================================
  9. # ★設定例(アクター・エネミー・ステート・装備品のメモ欄に設定)
  10. #------------------------------------------------------------------------------
  11. # <全絶対命中>
  12. #
  13. # このキャラクターによる全てのスキル/アイテムが絶対に命中します。
  14. #------------------------------------------------------------------------------
  15. # <必中絶対命中>
  16. #
  17. # このキャラクターによる命中タイプ:必中のスキル/アイテムが絶対に命中します。
  18. #------------------------------------------------------------------------------
  19. # <物理絶対命中>
  20. #
  21. # このキャラクターによる命中タイプ:物理のスキル/アイテムが絶対に命中します。
  22. #------------------------------------------------------------------------------
  23. # <魔法絶対命中>
  24. #
  25. # このキャラクターによる命中タイプ:魔法のスキル/アイテムが絶対に命中します。
  26. #------------------------------------------------------------------------------
  27. # <全絶対回避>
  28. #
  29. # このキャラクターが受ける全てのスキル/アイテムを絶対に回避します。
  30. #------------------------------------------------------------------------------
  31. # <必中絶対回避>
  32. #
  33. # このキャラクターが受ける命中タイプ:必中のスキル/アイテムを絶対に回避します。
  34. #------------------------------------------------------------------------------
  35. # <物理絶対回避>
  36. #
  37. # このキャラクターが受ける命中タイプ:物理のスキル/アイテムを絶対に回避します。
  38. #------------------------------------------------------------------------------
  39. # <魔法絶対回避>
  40. #
  41. # このキャラクターが受ける命中タイプ:魔法のスキル/アイテムを絶対に回避します。
  42. #==============================================================================
  43. # ★設定例(アイテム・スキルのメモ欄に設定)
  44. #------------------------------------------------------------------------------
  45. # <絶対命中>
  46. #
  47. # このスキル/アイテムは絶対に命中します。
  48. #==============================================================================
  49. module CertaintyHit
  50.   
  51.   #絶対命中と絶対回避が同時に計算される場合
  52.   #絶対命中と絶対回避のどちらを優先するかを決定します。
  53.   #0の場合は命中を優先します。
  54.   #1の場合は回避を優先します。
  55.   #2の場合は絶対命中も絶対回避もなかったことにして本来の処理を行います。
  56.   
  57.   Type  = 0
  58.   
  59.   #特徴用の絶対命中化用キーワードを指定します。
  60.   
  61.   Words1 = ["必中絶対命中","物理絶対命中","魔法絶対命中","全絶対命中"]
  62.   
  63.   #特徴用の絶対回避化用キーワードを指定します。
  64.   
  65.   Words2 = ["必中絶対回避","物理絶対回避","魔法絶対回避","全絶対回避"]
  66.   
  67.   #スキル/アイテム用の絶対命中化用キーワードを指定します。
  68.   
  69.   Word = "絶対命中"
  70.   
  71.   #絶対命中時/絶対回避処理用の命中率及び回避率を設定します。
  72.   #絶対命中の場合は、命中に前者、回避に後者、
  73.   #絶対回避の場合は、命中に後者、回避に前者を使用します。
  74.   
  75.   Value = [9.99, -9.99]
  76.   
  77.   #--------------------------------------------------------------------------
  78.   # キーワード配列
  79.   #--------------------------------------------------------------------------
  80.   def self.words(type)
  81.     type ? Words1 : Words2
  82.   end
  83. end
  84. class Game_Battler < Game_BattlerBase
  85.   #--------------------------------------------------------------------------
  86.   # スキル/アイテムの命中率計算
  87.   #--------------------------------------------------------------------------
  88.   alias item_hit_certainty item_hit
  89.   def item_hit(user, item)
  90.    
  91.     #設定別に処理。
  92.    
  93.     case CertaintyHit::Type
  94.    
  95.     #絶対命中を優先する場合。
  96.    
  97.     when 0
  98.       
  99.       #絶対命中の場合は絶対命中用の値を返す。
  100.       
  101.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item)
  102.       
  103.       #絶対回避の場合は絶対回避用の値を返す。
  104.       
  105.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item)
  106.    
  107.     #絶対回避を優先する場合。
  108.    
  109.     when 1
  110.       
  111.       #絶対回避の場合は絶対回避用の値を返す。
  112.       
  113.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item)
  114.       
  115.       #絶対命中の場合は絶対命中用の値を返す。
  116.       
  117.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item)
  118.    
  119.     #絶対命中と絶対回避が打ち消し合う場合。
  120.    
  121.     when 2
  122.       
  123.       #絶対命中かつ絶対回避ではない場合は絶対命中用の値を返す。
  124.       
  125.       return CertaintyHit::Value[0] if certainty_hit_execute(user, item) && !certainty_eva_execute(user, item)
  126.       
  127.       #絶対回避かつ絶対命中ではない場合は絶対回避用の値を返す。
  128.       
  129.       return CertaintyHit::Value[1] if certainty_eva_execute(user, item) && !certainty_hit_execute(user, item)
  130.       
  131.     end
  132.    
  133.     #本来の処理を実行。
  134.    
  135.     item_hit_certainty(user, item)
  136.    
  137.   end
  138.   #--------------------------------------------------------------------------
  139.   # スキル/アイテムの回避率計算
  140.   #--------------------------------------------------------------------------
  141.   alias item_eva_certainty item_eva
  142.   def item_eva(user, item)
  143.    
  144.     #設定別に処理。
  145.    
  146.     case CertaintyHit::Type
  147.    
  148.     #絶対命中を優先する場合。
  149.    
  150.     when 0
  151.       
  152.       #絶対命中の場合は絶対命中用の値を返す。
  153.       
  154.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item)
  155.       
  156.       #絶対回避の場合は絶対回避用の値を返す。
  157.       
  158.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item)
  159.    
  160.     #絶対回避を優先する場合。
  161.    
  162.     when 1
  163.       
  164.       #絶対回避の場合は絶対回避用の値を返す。
  165.       
  166.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item)
  167.       
  168.       #絶対命中の場合は絶対命中用の値を返す。
  169.       
  170.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item)
  171.    
  172.     #絶対命中と絶対回避が打ち消し合う場合。
  173.    
  174.     when 2
  175.       
  176.       #絶対命中かつ絶対回避ではない場合は絶対命中用の値を返す。
  177.       
  178.       return CertaintyHit::Value[1] if certainty_hit_execute(user, item) && !certainty_eva_execute(user, item)
  179.       
  180.       #絶対回避かつ絶対命中ではない場合は絶対回避用の値を返す。
  181.       
  182.       return CertaintyHit::Value[0] if certainty_eva_execute(user, item) && !certainty_hit_execute(user, item)
  183.       
  184.     end
  185.    
  186.     #本来の処理を実行。
  187.    
  188.     item_eva_certainty(user, item)
  189.    
  190.   end
  191.   #--------------------------------------------------------------------------
  192.   # 絶対命中
  193.   #--------------------------------------------------------------------------
  194.   def certainty_hit_execute(user, item)
  195.    
  196.     #絶対命中スキル/アイテムの場合はtrueを返す。
  197.    
  198.     return true if item.certainty_hit_item
  199.    
  200.     #全絶対命中の場合はtrueを返す。
  201.    
  202.     return true if user.certainty_hit(3) or user.certainty_hit(item.hit_type)
  203.    
  204.     #falseを返す。
  205.    
  206.     false
  207.    
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # 絶対回避
  211.   #--------------------------------------------------------------------------
  212.   def certainty_eva_execute(user, item)
  213.    
  214.     #味方へのスキルの場合は絶対回避は行わない。
  215.     #スキルが味方対象かつ敵対象ではなく
  216.     #使用者がアクターであり対象がアクターであるか
  217.     #使用者がエネミーであり対象がエネミーである場合はfalseとする。
  218.     #(無意味な処理に見えるかもしれませんが、主に競合対策の処理です)
  219.    
  220.     return false if item.for_friend? && !item.for_opponent? && user.actor? == self.actor?
  221.    
  222.     #全絶対回避の場合はtrueを返す。
  223.    
  224.     return true if certainty_eva(3) or certainty_eva(item.hit_type)
  225.    
  226.     #falseを返す。
  227.    
  228.     false
  229.    
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # 絶対命中データを取得
  233.   #--------------------------------------------------------------------------
  234.   def certainty_hit(type)
  235.     feature_objects.any? {|f| f.certainty_hit_array[type]}
  236.   end
  237.   #--------------------------------------------------------------------------
  238.   # 絶対回避データを取得
  239.   #--------------------------------------------------------------------------
  240.   def certainty_eva(type)
  241.     feature_objects.any? {|f| f.certainty_eva_array[type]}
  242.   end
  243. end
  244. class RPG::BaseItem
  245.   #--------------------------------------------------------------------------
  246.   # 絶対命中配列を取得
  247.   #--------------------------------------------------------------------------
  248.   def certainty_hit_array
  249.     @certainty_hit_array ||= create_certainty_hit_eva_array(true)
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # 絶対回避配列を取得
  253.   #--------------------------------------------------------------------------
  254.   def certainty_eva_array
  255.     @certainty_eva_array ||= create_certainty_hit_eva_array(false)
  256.   end
  257.   #--------------------------------------------------------------------------
  258.   # 絶対命中/回避配列を作成
  259.   #--------------------------------------------------------------------------
  260.   def create_certainty_hit_eva_array(type)
  261.     CertaintyHit.words(type).inject([]) {|r,t| r.push(/<#{t}>/ =~ note)}
  262.   end
  263. end
  264. class RPG::UsableItem < RPG::BaseItem
  265.   #--------------------------------------------------------------------------
  266.   # 絶対命中アイテム
  267.   #--------------------------------------------------------------------------
  268.   def certainty_hit_item
  269.     (@certainty_hit_item ||= /<#{CertaintyHit::Word}>/ =~ note ? 1 : 0) == 1
  270.   end
  271. end
复制代码


为了防止被我的机翻误导,这里是原代码
在尝试做游戏了,但还是个菜狗(结果现在编程,音乐和剧情设计没开始学,画画也暂时没时间学了(;д;))

(个人精神状况不是很好,有时会说出一些奇怪且根本没法理解意思的话,直接无视就好,如果说出的话不小心冒犯到你,我会在精神状况良好时和你道歉的(`・ω・´)(不过一般在感觉到不适时会直接下线,请勿过于担心))
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
24337
在线时间
5053 小时
注册时间
2016-3-8
帖子
1621
3
发表于 2022-7-4 09:40:14 | 只看该作者
本帖最后由 alexncf125 于 2022-7-4 09:57 编辑

放在技能里的绝对命中,
放了后, 第269行就会返回true, 那么198行也会返回true,
93行及146行的case CertaintyHit::Type, 根据其数值模式,
item_hit返回经该模式判定后的9.99或-9.99
item_eva返回经该模式判定后的9.99或-9.99
得出的item_hit跟item_eva用来参与Game_Battler第502-503行的计算

例子1.
假如 CertaintyHit::Type是0 且 技能里放了绝对命中, 且 对方有绝对回避,
则item_hit在第101行返回9.99, item_eva在第154行返回-9.99

例子2.
假如 CertaintyHit::Type是1 且 技能里放了绝对命中 且 对方有绝对回避,
则item_hit在第113行返回-9.99, item_eva在第166行返回9.99

例子3.
假如 CertaintyHit::Type是2 且 技能里放了绝对命中 且 对方有绝对回避,
则item_hit在第135行返回原始计算, item_eva在第188行返回原始计算



Value = [9.99, -9.99]是用来参与Game_Battler第502-503行计算
  1.     @result.missed = (@result.used && rand >= item_hit(user, item))
  2.     @result.evaded = ([email protected] && rand < item_eva(user, item))
复制代码

评分

参与人数 2+2 收起 理由
ACRI + 1 认可答案
百里_飞柳 + 1 我很赞同

查看全部评分

回复 支持 2 反对 0

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1985
在线时间
176 小时
注册时间
2022-6-24
帖子
176
4
 楼主| 发表于 2022-7-4 20:40:12 | 只看该作者
alexncf125 发表于 2022-7-4 09:40
放在技能里的绝对命中,
放了后, 第269行就会返回true, 那么198行也会返回true,
93行及146行的case Certai ...

感谢老哥,也就是说Type值决定一切,技能使用的绝对命中并不单独有设置,已经理解了,再次感谢

评分

参与人数 1星屑 +50 +1 收起 理由
alexncf125 + 50 + 1 塞糖

查看全部评分

在尝试做游戏了,但还是个菜狗(结果现在编程,音乐和剧情设计没开始学,画画也暂时没时间学了(;д;))

(个人精神状况不是很好,有时会说出一些奇怪且根本没法理解意思的话,直接无视就好,如果说出的话不小心冒犯到你,我会在精神状况良好时和你道歉的(`・ω・´)(不过一般在感觉到不适时会直接下线,请勿过于担心))
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-30 14:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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