| 
 
| 赞 | 6 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 11 |  
| 经验 | 0 |  
| 最后登录 | 2022-3-24 |  
| 在线时间 | 26 小时 |  
 Lv3.寻梦者 
	梦石0 星屑1122 在线时间26 小时注册时间2021-2-19帖子30 | 
| 你这个数字是用图片显示的,所以你得做一张???的图片 复制代码YAMI_NEED2HIDE = [1,2] #角色id
YAMI_REPLACE_TEXT = "???"
YAMI_REPLACE_TEXT_PIC = "popup_maxhp_remove_small"#图片名
class CAO::CM::Canvas
  alias yami_draw_actor_level draw_actor_level
  alias yami_draw_actor_level_g draw_actor_level_g
  alias yami_draw_actor_hp draw_actor_hp
  alias yami_draw_actor_mp draw_actor_mp
  alias yami_draw_actor_param draw_actor_param
  def draw_actor_level(actor, x, y, width = 64)
    if VISIBLE_SYSTEM
      change_color(system_color)
      draw_text(x, y, 32, line_height, Vocab::level_a)
    end
    change_color(normal_color)
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_text(x + width - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end
    draw_text(x + width - 32, y, 32, line_height, actor.level, 2)
  end
  def draw_actor_level_g(actor, x, y, width = 64)
    draw_gauge(x,y,width,actor.cm_exp_rate,exp_gauge_color1,exp_gauge_color2)
    if VISIBLE_SYSTEM
      change_color(system_color)
      draw_text(x, y, 32, line_height, Vocab::level_a)
    end
    change_color(tp_color(actor))
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_text(x +  width - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end   
    draw_text(x + width - 32, y, 32, line_height, actor.level, 2)
  end
  def draw_actor_hp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
    if VISIBLE_SYSTEM
      change_color(system_color)
      draw_text(x, y, 30, line_height, Vocab::hp_a)
    end
     if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_current_and_max_values(x, y, width, YAMI_REPLACE_TEXT, YAMI_REPLACE_TEXT,
        hp_color(actor), normal_color)
      return
    end       
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color)
  end
  def draw_actor_mp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
    if VISIBLE_SYSTEM
      change_color(system_color)
      draw_text(x, y, 30, line_height, Vocab::mp_a)
    end
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_current_and_max_values(x, y, width, YAMI_REPLACE_TEXT, YAMI_REPLACE_TEXT,
        mp_color(actor), normal_color)
      return
    end   
    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
   end
  def draw_actor_param(actor, x, y, param_id, width = 124)
    if param_id < 0 || param_id > 7
      raise ArgumentError, "能力値の ID は 0 から 7 までの数値です。"
    end
    if VISIBLE_SYSTEM
      change_color(system_color)
      draw_text(x, y, width, line_height, Vocab::param(param_id))
    end
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_text(x, y,text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end
    change_color(normal_color)
    draw_text(x, y, width, line_height, actor.param(param_id), 2)
  end
end
class Window_Base
  def draw_actor_level(actor, x, y)
    change_color(system_color)
    draw_text(x, y, 32, line_height, Vocab::level_a)
    change_color(normal_color)
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_text(x + 32 + 24 - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end
    draw_text(x + 32, y, 24, line_height, actor.level, 2)
  end
  def draw_actor_hp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::hp_a)
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_current_and_max_values(x, y, width, YAMI_REPLACE_TEXT, YAMI_REPLACE_TEXT,
        hp_color(actor), normal_color)
      return
    end    
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color)
  end
  def draw_actor_mp(actor, x, y, width = 124)
    draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::mp_a)
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_current_and_max_values(x, y, width, YAMI_REPLACE_TEXT, YAMI_REPLACE_TEXT,
        mp_color(actor), normal_color)
      return
    end        
    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
  end
  def draw_actor_param(actor, x, y, param_id)
    change_color(system_color)
    draw_text(x, y, 120, line_height, Vocab::param(param_id))
    change_color(normal_color)
    if YAMI_NEED2HIDE.include?(actor.actor.id)
      draw_text(x + 120 + 36 - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end
    draw_text(x + 120, y, 36, line_height, actor.param(param_id), 2)
  end
end
class Window_EquipStatus
  def draw_current_param(x, y, param_id)
    change_color(normal_color)
    if YAMI_NEED2HIDE.include?(@actor.actor.id)
      draw_text(x + 32 - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end
    draw_text(x, y, 32, line_height, @actor.param(param_id), 2)
  end
  def draw_new_param(x, y, param_id)
    new_value = @temp_actor.param(param_id)
    change_color(param_change_color(new_value - @actor.param(param_id)))
    if YAMI_NEED2HIDE.include?(@actor.actor.id)
      draw_text(x + 32 - text_size(YAMI_REPLACE_TEXT).width * 2, y, text_size(YAMI_REPLACE_TEXT).width * 2, line_height, YAMI_REPLACE_TEXT, 2)
      return
    end    
    draw_text(x, y, 32, line_height, new_value, 2)
  end
end
class Spriteset_BattleStatus
  def create_number(num, max, format)
    return nil unless format[:enabled]
    if @battler.is_a?(Game_Actor) and YAMI_NEED2HIDE.include?(@battler.actor.id) and format != TP_NUMBER_FORMAT
    sprite = Sprite_Hide.new(format, @viewport) 
    else
    sprite = Sprite_Number.new(num, max, format, @viewport)
    end
    move(sprite, format)
    return sprite
  end
end
class Sprite_Hide < Sprite_Number 
  def initialize(format, viewport = nil)
    super(9999,9999,format,viewport)
    @src_bitmap = Cache.system(YAMI_REPLACE_TEXT_PIC)
    self.bitmap = @src_bitmap
  end  
  def update
  end
end
 | 
 |