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

Project1

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

[已经过期] 为什么横版战斗的伤害达到上千时,伤害显示只有千位数

[复制链接]

Lv1.梦旅人

梦石
0
星屑
82
在线时间
69 小时
注册时间
2012-6-3
帖子
24
跳转到指定楼层
1
发表于 2012-7-3 13:29:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 路过的恶魔 于 2012-7-3 13:32 编辑

比如说1000点的伤害,它只显示1。。。{:2_254:}

以下是脚本。。。

#==============================================================================
#
# ▼ Yanfly Engine Ace - Battle Engine Add-On: Elemental Popups v1.00
# -- Last Updated: 2011.12.26
# -- Level: Normal
# -- Requires: YEA - Ace Battle Engine v1.08+
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-ElementalPopups"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.26 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script colour-coded element popups as they appear in battle for any kind
# of HP damage dealt. This does not include healing popups, MP damage popups,
# only HP damage dealt. Colour-coded element popups help the player quickly
# identify what kind of damage is dealt and streamlines the delivery of battle
# information to the audience.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# If you are using elements other than the default set of elements that came
# with a default project of RPG Maker VX Ace, adjust the element colours in the
# module below.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
# This script requires Yanfly Engine Ace - Ace Battle Engine v1.08+ and the
# script must be placed under Ace Battle Engine in the script listing.
#
#==============================================================================

module YEA
  module ELEMENT_POPUPS
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Setting -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Description
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This is the default font used for the popups. Adjust them accordingly
    # or even add new ones.
    DEFAULT = ["VL Gothic", "Verdana", "Arial", "Courier"]
   
    # The following are the various rules that govern the individual popup
    # types that will appear. Adjust them accordingly. Here is a list of what
    # each category does.
    #   Zoom1    The zoom the popup starts at. Values over 2.0 may cause lag.
    #   Zoom2    The zoom the popup goes to. Values over 2.0 may cause lag.
    #   Sz       The font size used for the popup text.
    #   Bold     Applying bold for the popup text.
    #   Italic   Applying italic for the popup text.
    #   Red      The red value of the popup text.
    #   Grn      The green value of the popup text.
    #   Blu      The blue value of the popup text.
    #   Font     The font used for the popup text.
    #
    # Note that if an element doesn't appear here, it'll use the DEFAULT
    # ruleset from Ace Battle Engine.
    COLOURS ={
    # ElementID => [ Zoom1, Zoom2, Sz, Bold, Italic, Red, Grn, Blu, Font]
              3 => [   2.0,   1.0, 36, true,  false, 240,  60,  60, DEFAULT],
              4 => [   2.0,   1.0, 36, true,  false, 100, 200, 246, DEFAULT],
              5 => [   2.0,   1.0, 36, true,  false, 255, 255, 160, DEFAULT],
              6 => [   2.0,   1.0, 36, true,  false,   0, 115, 180, DEFAULT],
              7 => [   2.0,   1.0, 36, true,  false, 240, 135,  80, DEFAULT],
              8 => [   2.0,   1.0, 36, true,  false,  60, 180,  75, DEFAULT],
              9 => [   2.0,   1.0, 36, true,  false, 175, 210, 255, DEFAULT],
             10 => [   2.0,   1.0, 36, true,  false, 110,  80, 130, DEFAULT],
    } # Do not remove this.
   
  end # ELEMENT_POPUPS
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

if $imported["YEA-BattleEngine"]
  
module YEA
  module BATTLE
    module_function
    #--------------------------------------------------------------------------
    # add_element_popups
    #--------------------------------------------------------------------------
    def add_element_popups(hash)
      for key in YEA::ELEMENT_POPUPS::COLOURS
        string = sprintf("ELEMENT_%d", key[0])
        hash[string] = key[1]
      end
      return hash
    end
    #--------------------------------------------------------------------------
    # converted_contants
    #--------------------------------------------------------------------------
    POPUP_RULES = add_element_popups(POPUP_RULES)
  end # BATTLE
end # YEA

#==============================================================================
# ■ Game_BattlerBase
#==============================================================================

class Game_BattlerBase
  
  #--------------------------------------------------------------------------
  # alias method: create_popup
  #--------------------------------------------------------------------------
  alias game_battlerbase_create_popup_elepop create_popup
  def create_popup(value, rules = "DEFAULT", flags = [])
    rules = @element_popup_tag if rules == "HP_DMG" && !@element_popup_tag.nil?
    game_battlerbase_create_popup_elepop(value, rules, flags)
  end
  
end # Game_BattlerBase

#==============================================================================
# ■ Game_Battler
#==============================================================================

class Game_Battler < Game_BattlerBase
  
  #--------------------------------------------------------------------------
  # alias method: item_apply
  #--------------------------------------------------------------------------
  alias game_battler_item_apply_elepop item_apply
  def item_apply(user, item)
    @element_popup_tag = element_popup_tag?(user, item)
    game_battler_item_apply_elepop(user, item)
    @element_popup_tag = nil
  end
  
  #--------------------------------------------------------------------------
  # new method: element_popup_tag?
  #--------------------------------------------------------------------------
  def element_popup_tag?(user, item)
    return "HP_DMG" if item.nil?
    text = "ELEMENT_"
    if item.damage.element_id < 0
      return "HP_DMG" if user.atk_elements.empty?
      rate = elements_max_rate(user.atk_elements)
      for i in user.atk_elements
        next unless element_rate(i) == rate
        text += i.to_s
        break
      end
    else
      text += item.damage.element_id.to_s
    end
    text = "HP_DMG" unless YEA::BATTLE::POPUP_RULES.include?(text)
    return text
  end
  
end # Game_Battler
  
end # $imported["YEA-BattleEngine"]

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

点评

上工程,我用的和你一样的脚本表示没问题  发表于 2012-7-3 14:23

Lv1.梦旅人

梦石
0
星屑
50
在线时间
201 小时
注册时间
2012-4-8
帖子
466
2
发表于 2012-7-3 17:09:26 | 只看该作者
是这段代码么?直接测试没有问题诶(都不是横版)
看一看伤害数字图片素材
义三国系统更改中,预计长期坑化
好游戏的标准:
创意,完整度,人性化,独立性
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-23 11:34

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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