Project1

标题: 给喵5的「技能冷却」添上进度条 [打印本页]

作者: alexncf125    时间: 2020-9-8 15:18
标题: 给喵5的「技能冷却」添上进度条
本帖最后由 alexncf125 于 2024-1-25 01:49 编辑

https://rpg.blue/home.php?mod=sp ... o=blog&id=14838

贴一下成果好了
  1. class Window_SkillList < Window_Selectable
  2.   alias m5_20160124_draw_item draw_item
  3.   def draw_item(index)
  4.     skill = @data[index]
  5.     if skill && @actor
  6.       @data.each_with_index do |s, i|
  7.         next if M5ST20160127::RECOVER && !$game_party.in_battle
  8.         next unless s && (time = @actor.m5_20160127_skill[s.id])
  9.         if s.id == skill.id && time >= 0
  10.           rect = item_rect(index)
  11.           time_cost = s.m5note('冷却时间',nil).to_i
  12.           w = (time_cost - time - 1).to_f / time_cost
  13.           draw_gauge(rect.x, rect.y, rect.width, w, text_color(5), text_color(13))
  14.         end
  15.       end
  16.     end
  17.     m5_20160124_draw_item(index)
  18.   end
  19. end
复制代码


https://rpg.blue/thread-225758-1-1.html

作者: 喵呜喵5    时间: 2020-9-8 18:08
都用这脚本了,那肯定有我的基础脚本了,可以直接用

skill.m5note('冷却时间',nil)

读取备注




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1