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

Project1

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

[已经解决] SUP技能升级VA版怎样去掉技能评分以后的无限个小数?

[复制链接]

Lv2.观梦者

梦石
0
星屑
589
在线时间
332 小时
注册时间
2011-11-19
帖子
194
跳转到指定楼层
1
发表于 2015-2-15 13:36:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
所用脚本:https://rpg.blue/thread-235344-1-1.html
RT,用这个脚本后调了很多次,用了一些渣渣方法,可是没法子达到理想效果:技能评分后面只有一个小数位数,而不是有时候乱七八糟的无限小数
呃,在此诚心请教,数据库的方法我都差不多用尽了,有没有哪位大哥大姐提一提好方法?
感激不尽!{:2_280:}
支持《彼岸之光》系列!加油!

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
20965
在线时间
9334 小时
注册时间
2012-6-19
帖子
7106

开拓者短篇九导演组冠军

2
发表于 2015-2-15 13:50:55 | 只看该作者
把这段代码扔到这个脚本的最后
  1. class SUP_Window_Info
  2.   def draw2(skill,x,y)
  3.     #名称---------------------------------------------
  4.     draw_item_name(skill, x, y)
  5.     #魔力值消耗---------------------------------------
  6.     draw_text(x, y + line_height, 280, line_height,
  7.     "魔力值消耗:")
  8.     w = 200 ; h = 15
  9.     b = skill.mp_cost.to_f / 9999
  10.     c1 = Color.new(128,155,122,255)
  11.     c2 = Color.new(25,55,155,255)
  12.     flii(x+120, y + line_height + 3, w, h, b, SUP::NEG_COLOR1, SUP::NEG_COLOR2)
  13.     draw_current_and_max_values(x+40, y + line_height, 280, skill.mp_cost, 9999,
  14.     text_color(0), text_color(0))
  15.     #特技值消耗---------------------------------------
  16.     draw_text(x, y + line_height * 2, 280, line_height,
  17.     "特技值消耗:")
  18.     w = 200 ; h = 15
  19.     b = skill.tp_cost.to_f / 100
  20.     flii(x+120, y + line_height * 2 + 3, w, h, b, SUP::NEG_COLOR1, SUP::NEG_COLOR2)
  21.     draw_current_and_max_values(x+40, y + line_height * 2, 280, skill.tp_cost, 100,
  22.     text_color(0), text_color(0))
  23.     #特技值获得---------------------------------------
  24.     draw_text(x, y + line_height * 3, 280, line_height,
  25.     "特技值获得:")
  26.     w = 200 ; h = 15
  27.     b = skill.tp_gain.to_f / 100
  28.     flii(x+120, y + line_height * 3 + 3, w, h, b, SUP::POS_COLOR1, SUP::POS_COLOR2)
  29.     draw_current_and_max_values(x+40, y + line_height * 3, 280, skill.tp_gain, 100,
  30.     text_color(0), text_color(0))
  31.     #攻击次数-----------------------------------------
  32.     draw_text(x, y + line_height * 4, 280, line_height,
  33.     "攻击次数:")
  34.     w = 200 ; h = 15
  35.     b = skill.repeats.to_f / 9
  36.     flii(x+120, y + line_height * 4 + 3, w, h, b, SUP::POS_COLOR1, SUP::POS_COLOR2)
  37.     draw_current_and_max_values(x+40, y + line_height * 4, 280, skill.repeats, 9,
  38.     text_color(0), text_color(0))
  39.     #成功几率-----------------------------------------
  40.     draw_text(x, y + line_height * 5, 280, line_height,
  41.     "成功几率:")
  42.     w = 200 ; h = 15
  43.     b = skill.success_rate.to_f / 100
  44.     flii(x+120, y + line_height * 5 + 3, w, h, b, SUP::POS_COLOR1, SUP::POS_COLOR2)
  45.     draw_current_and_max_values(x+40, y + line_height * 5, 280, skill.success_rate, 100,
  46.     text_color(0), text_color(0))
  47.     #输出评分-----------------------------------------
  48.     draw_text(x, y + line_height * 6, 280, line_height,
  49.     "输出评分:")
  50.     pf = scpf(skill)
  51.     w = 200 ; h = 15
  52.     b = [pf.to_f / SUP::PFX, 1.0].min
  53.     type = skill.damage.type
  54.     pf = sprintf("%.1f",pf)
  55.     case type
  56.     when 0
  57.       draw_text(x+150, y + line_height * 6, 280, line_height,
  58.     "此技能没有输出。")
  59.     when 1, 2, 5, 6
  60.       flii(x+120, y + line_height * 6 + 3, w, h, b, SUP::NEG_COLOR1, SUP::NEG_COLOR2)
  61.       draw_current_and_max_values(x+40, y + line_height * 6, 280, pf, SUP::PFX,
  62.       text_color(0), text_color(0))
  63.     when 3, 4
  64.       flii(x+120, y + line_height * 6 + 3, w, h, b, SUP::POS_COLOR1, SUP::POS_COLOR2)
  65.       draw_current_and_max_values(x+40, y + line_height * 6, 280, pf, SUP::PFX,
  66.       text_color(0), text_color(0))
  67.     end
  68.   end
  69. end
复制代码

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
589
在线时间
332 小时
注册时间
2011-11-19
帖子
194
3
 楼主| 发表于 2015-2-15 15:41:36 | 只看该作者
喵呜喵5 发表于 2015-2-15 13:50
把这段代码扔到这个脚本的最后

喵呜喵5大神问题解决了
大人好棒哦……
话说我可是你的一个小粉丝哦~
你的脚本被我拉回去改了一些………………不介意吧……………………
不过肯定保留了您的名字
谢谢
支持《彼岸之光》系列!加油!
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
589
在线时间
332 小时
注册时间
2011-11-19
帖子
194
4
 楼主| 发表于 2015-2-16 17:04:05 | 只看该作者
版主结贴吧,已经解决!谢谢大家了!
支持《彼岸之光》系列!加油!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-28 17:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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