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

Project1

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

[漢化]戰鬥中敵人加入血條

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-5-25
帖子
274
跳转到指定楼层
1
发表于 2008-6-12 00:36:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
这陣子我好象都是發一些沒啥用的帖
算了..看看能發布嗎??
  1. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2. #_/    ◆ 戰鬥中敵人加入血條 - KGC_OnScreenStatus ◆ VX ◆
  3. #_/    ◇ Last update : 2008/01/03 ◇
  4. #_/----------------------------------------------------------------------------
  5. #_/  在戰鬥的畫面上表示敵人的狀態。
  6. #_/
  7. #_/
  8. #_/  [[ 翻譯::雷特爾 ]]
  9. #_/
  10. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  11. #==============================================================================
  12. # ★ 自行定義之項目 ★
  13. #==============================================================================

  14. module KGC
  15. module OnScreenStatus
  16.   # ◆血條視窗的位置
  17.   #   0..左上角、1..上方正中央、2..右上堕
  18.   WINDOW_ALIGN    = 2
  19.   # ◆敵人血條視窗寛度
  20.   WIDTH_PER_ACTOR = 92

  21.   # ◆敵人 MP 表示開關(true為顯示)
  22.   SHOW_MP    = true
  23.   # ◆敵人狀態的顯示(true為顯示)
  24.   SHOW_STATE = false

  25.   # ◆反映敵人MP被消耗的時機(總覺得有點怪)
  26.   #   0..技能使用時  1..技能使用結束時
  27.   #  (如果 MP為0 時發生錯誤, 請在下方使用1)
  28.   SKILL_MP_COST_APPLY_TIMING = 0
  29. end
  30. end

  31. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  32. $imported = {} if $imported == nil
  33. $imported["OnScreenStatus"] = true

  34. #==============================================================================
  35. # ■ Window_OnScreenBattleStatus
  36. #------------------------------------------------------------------------------
  37. #  戦闘行動中にパーティメンバーのステータスを表示するウィンドウです。
  38. #==============================================================================

  39. class Window_OnScreenBattleStatus < Window_Selectable
  40.   #--------------------------------------------------------------------------
  41.   # ● オブジェクト初期化
  42.   #--------------------------------------------------------------------------
  43.   def initialize
  44.     wh = 32 + WLH * 2
  45.     wh += WLH if KGC::OnScreenStatus::SHOW_MP
  46.     wh += WLH if KGC::OnScreenStatus::SHOW_STATE
  47.     super(0, 0, 64, wh, 8)
  48.     @item_max = 0
  49.     @column_max = 1
  50.     refresh
  51.     self.back_opacity = 160
  52.     self.openness = 0
  53.     self.active = false
  54.   end
  55.   #--------------------------------------------------------------------------
  56.   # ● 名前の描画
  57.   #     actor : アクター
  58.   #     x     : 描画先 X 座標
  59.   #     y     : 描画先 Y 座標
  60.   #     width : 幅
  61.   #--------------------------------------------------------------------------
  62.   def draw_actor_name(actor, x, y, width = 108)
  63.     if defined?(draw_actor_od_gauge)
  64.       draw_actor_od_gauge(actor, x, y, width)
  65.     end
  66.     self.contents.font.color = hp_color(actor)
  67.     self.contents.draw_text(x, y, width, WLH, actor.name)
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ● 項目を描画する矩形の取得
  71.   #     index : 項目番号
  72.   #--------------------------------------------------------------------------
  73.   def item_rect(index)
  74.     rect = Rect.new(0, 0, KGC::OnScreenStatus::WIDTH_PER_ACTOR, height - 32)
  75.     rect.x = index % @column_max * (rect.width + @spacing)
  76.     return rect
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # ● リフレッシュ
  80.   #--------------------------------------------------------------------------
  81.   def refresh
  82.     last_item_max = @item_max
  83.     @item_max = $game_party.members.size
  84.     if @item_max != last_item_max
  85.       # メンバー数が変化したらウィンドウサイズ変更
  86.       self.width =
  87.         (KGC::OnScreenStatus::WIDTH_PER_ACTOR + @spacing) * @item_max + 32
  88.       @column_max = @item_max
  89.       create_contents
  90.     else
  91.       self.contents.clear
  92.     end
  93.     @item_max.times { |i| draw_item(i) }
  94.     # 表示座標調整
  95.     case KGC::OnScreenStatus::WINDOW_ALIGN
  96.     when 0
  97.       self.x = 0
  98.     when 1
  99.       self.x = (Graphics.width - self.width) / 2
  100.     when 2
  101.       self.x = Graphics.width - self.width
  102.     end
  103.   end
  104.   #--------------------------------------------------------------------------
  105.   # ● 項目の描画
  106.   #     index   : 項目番号
  107.   #--------------------------------------------------------------------------
  108.   def draw_item(index)
  109.     rect = item_rect(index)
  110.     self.contents.clear_rect(rect)
  111.     self.contents.font.color = normal_color
  112.     actor = $game_party.members[index]
  113.     cw = KGC::OnScreenStatus::WIDTH_PER_ACTOR
  114.     draw_actor_name(actor, rect.x, rect.y, cw)
  115.     rect.y += WLH
  116.     draw_actor_hp(actor, rect.x, rect.y, cw)
  117.     if KGC::OnScreenStatus::SHOW_MP
  118.       rect.y += WLH
  119.       draw_actor_mp(actor, rect.x, rect.y, cw)
  120.     end
  121.     if KGC::OnScreenStatus::SHOW_STATE
  122.       rect.y += WLH
  123.       draw_actor_state(actor, rect.x, rect.y, cw)
  124.     end
  125.   end
  126.   #--------------------------------------------------------------------------
  127.   # ● 再描画
  128.   #     actor : 対象アクター
  129.   #--------------------------------------------------------------------------
  130.   def redraw(actor)
  131.     draw_item(actor.index)
  132.   end
  133. end

  134. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  135. #==============================================================================
  136. # ■ Scene_Battle
  137. #==============================================================================

  138. class Scene_Battle < Scene_Base
  139.   #--------------------------------------------------------------------------
  140.   # ● 開始処理
  141.   #--------------------------------------------------------------------------
  142.   alias start_KGC_OnScreenStatus start
  143.   def start
  144.     # オンスクリーンウィンドウを作成
  145.     @onscreen_status_window = Window_OnScreenBattleStatus.new
  146.     @onscreen_status_refresh_request = false

  147.     start_KGC_OnScreenStatus
  148.   end
  149.   #--------------------------------------------------------------------------
  150.   # ● 終了処理
  151.   #--------------------------------------------------------------------------
  152.   alias terminate_KGC_OnScreenStatus terminate
  153.   def terminate
  154.     @onscreen_status_window.dispose

  155.     terminate_KGC_OnScreenStatus
  156.   end
  157.   #--------------------------------------------------------------------------
  158.   # ● 基本更新処理
  159.   #     main : メインの update メソッドからの呼び出し
  160.   #--------------------------------------------------------------------------
  161.   alias update_basic_KGC_OnScreenStatus update_basic
  162.   def update_basic(main = false)
  163.     update_basic_KGC_OnScreenStatus(main)

  164.     if $game_troop.interpreter.running?
  165.       @onscreen_status_window.close
  166.       @onscreen_status_refresh_request = true
  167.     end
  168.     @onscreen_status_window.update
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ● 戦闘処理の実行開始
  172.   #--------------------------------------------------------------------------
  173.   alias start_main_KGC_OnScreenStatus start_main
  174.   def start_main
  175.     @onscreen_status_window.refresh

  176.     start_main_KGC_OnScreenStatus
  177.   end
  178.   #--------------------------------------------------------------------------
  179.   # ● 戦闘行動の処理
  180.   #--------------------------------------------------------------------------
  181.   alias process_action_KGC_OnScreenStatus process_action
  182.   def process_action
  183.     if @onscreen_status_refresh_request
  184.       @onscreen_status_window.refresh
  185.       @onscreen_status_refresh_request = false
  186.     end
  187.     @onscreen_status_window.open

  188.     process_action_KGC_OnScreenStatus
  189.   end
  190.   #--------------------------------------------------------------------------
  191.   # ● ターン終了
  192.   #--------------------------------------------------------------------------
  193.   alias turn_end_KGC_OnScreenStatus turn_end
  194.   def turn_end
  195.     @onscreen_status_window.close

  196.     turn_end_KGC_OnScreenStatus
  197.   end
  198.   #--------------------------------------------------------------------------
  199.   # ● 戦闘行動の実行 : スキル
  200.   #--------------------------------------------------------------------------
  201.   alias execute_action_skill_KGC_OnScreenStatus execute_action_skill
  202.   def execute_action_skill
  203.     # 行動前に MP を反映する場合
  204.     if KGC::OnScreenStatus::SKILL_MP_COST_APPLY_TIMING == 0
  205.       # MP を仮消費してステータスを更新
  206.       last_mp = @active_battler.mp
  207.       skill = @active_battler.action.skill
  208.       @active_battler.mp -= @active_battler.calc_mp_cost(skill)
  209.       update_onscreen_status(@active_battler)
  210.       # 消費前に戻す
  211.       @active_battler.mp = last_mp
  212.     end

  213.     execute_action_skill_KGC_OnScreenStatus

  214.     # 行動後に MP を反映する場合
  215.     if KGC::OnScreenStatus::SKILL_MP_COST_APPLY_TIMING == 1
  216.       update_onscreen_status(@active_battler)
  217.     end
  218.   end
  219.   #--------------------------------------------------------------------------
  220.   # ● オンスクリーンステータスを更新
  221.   #     target : 対象者
  222.   #--------------------------------------------------------------------------
  223.   def update_onscreen_status(target)
  224.     if target.is_a?(Game_Actor)
  225.       @onscreen_status_window.redraw(target)
  226.     end
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ● HP ダメージ表示
  230.   #     target : 対象者
  231.   #     obj    : スキルまたはアイテム
  232.   #--------------------------------------------------------------------------
  233.   alias display_hp_damage_KGC_OnScreenStatus display_hp_damage
  234.   def display_hp_damage(target, obj = nil)
  235.     update_onscreen_status(target)
  236.     if target.absorbed
  237.       # 吸収の場合は行動者も更新
  238.       update_onscreen_status(@active_battler)
  239.     end

  240.     display_hp_damage_KGC_OnScreenStatus(target, obj)
  241.   end
  242.   #--------------------------------------------------------------------------
  243.   # ● MP ダメージ表示
  244.   #     target : 対象者
  245.   #     obj    : スキルまたはアイテム
  246.   #--------------------------------------------------------------------------
  247.   alias display_mp_damage_KGC_OnScreenStatus display_mp_damage
  248.   def display_mp_damage(target, obj = nil)
  249.     update_onscreen_status(target)
  250.     if target.absorbed
  251.       # 吸収の場合は行動者も更新
  252.       update_onscreen_status(@active_battler)
  253.     end

  254.     display_mp_damage_KGC_OnScreenStatus(target, obj)
  255.   end
  256.   #--------------------------------------------------------------------------
  257.   # ● ステート変化の表示
  258.   #     target : 対象者
  259.   #     obj    : スキルまたはアイテム
  260.   #--------------------------------------------------------------------------
  261.   alias display_state_changes_KGC_OnScreenStatus display_state_changes
  262.   def display_state_changes(target, obj = nil)
  263.     update_onscreen_status(target)

  264.     display_state_changes_KGC_OnScreenStatus(target, obj)
  265.   end
  266. end
复制代码


TO 流星大::
你在VX的問題收集帖也该更新了吧- -"
最萌琴美..KOTOMI..

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

2
发表于 2008-6-12 01:08:58 | 只看该作者
希望比赵云的好看并且可以用在横版行走图战斗里……
[LINE]1,#dddddd[/LINE]
这是血条么……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-5-25
帖子
274
3
 楼主| 发表于 2008-6-12 01:23:19 | 只看该作者
咦...奇怪....剛才行的- -"
算了
請BZ删了这帖吧

奇怪..
原站的图::
最萌琴美..KOTOMI..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

很傻很天真

梦石
0
星屑
55
在线时间
3 小时
注册时间
2007-3-13
帖子
3667
4
发表于 2008-6-12 02:31:38 | 只看该作者
看了一下...
好眼熟...
记起来了...
几个月前用过
不过报废 丢弃了...{/cy}
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

5
发表于 2008-6-12 02:59:49 | 只看该作者
莫非……

啊,对了。
以前用赵云的血条脚本一开始是那个样,后来变样了。
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-14
帖子
114
6
发表于 2008-6-12 08:16:34 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

7
发表于 2008-6-12 18:58:03 | 只看该作者
话说这个血条明显就是给敌人建立一个属性框……

看上去很不好看……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

很傻很天真

梦石
0
星屑
55
在线时间
3 小时
注册时间
2007-3-13
帖子
3667
8
发表于 2008-6-12 20:20:40 | 只看该作者
以下引用越前リョーマ于2008-6-12 10:58:02的发言:

话说这个血条明显就是给敌人建立一个属性框……

看上去很不好看……

我试了一下...
没效果.........应该是冲突了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
19 小时
注册时间
2008-8-25
帖子
68
9
发表于 2008-8-25 05:57:49 | 只看该作者
。。。这个不是给自己加个矩形血槽框么= =!
版主对此帖的评论:『挖坟』,积分『-10』。这些被扣积分的一半会用于对本帖正确答案的悬赏。
坑坑洼洼
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-8-10
帖子
273
10
发表于 2008-9-6 05:18:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-1 14:48

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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