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

Project1

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

[已经解决] 关于横版战斗

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
30 小时
注册时间
2010-12-7
帖子
17
跳转到指定楼层
1
发表于 2011-7-14 17:33:07 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
哪位大侠能帮我把这个45度角战斗的脚本改成横版战斗的啊!
也就是《幻想人物动画素材(鲁鲁版)》的那个脚本!


改成这样子最好了:



由于附件太大了所以上传不了! 脚本.rar (250.32 KB, 下载次数: 127) 这个是那个数据的附件!
各位大侠可以新建一个工程,然后把这个里面的东西放到DATA的文件夹里!
在打开工程修改脚本!
在这先谢谢给位大侠了!!

Lv1.梦旅人

梦石
0
星屑
50
在线时间
257 小时
注册时间
2007-6-6
帖子
219
2
发表于 2011-7-15 01:16:51 | 只看该作者
改改坐标就行了,敌人位置自己在数据库里拖,主角位置在45度战斗那个脚本改,CP条位置在即时战斗里改,图标式战斗同样。。。
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
30 小时
注册时间
2010-12-7
帖子
17
3
 楼主| 发表于 2011-7-15 12:27:47 | 只看该作者
改改坐标就行了,敌人位置自己在数据库里拖,主角位置在45度战斗那个脚本改,CP条位置在即时战斗里改,图标式战斗同样。。。

还是不会啊?数据库的会,改脚本的句啊?
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 1. CP制導入 ver..23 ▼▲▼
  6. # by 桜雅 在土, 和希

  7. #==============================================================================
  8. # □ カスタマイズポイント
  9. #==============================================================================
  10. module XRXS_BP1
  11. #
  12. # 对齐方式。0:左 1:中央 2:右
  13. #
  14. ALIGN = 0
  15. #
  16. # 人数
  17. #
  18. MAX = 4
  19. end
  20. class Scene_Battle_CP
  21. #
  22. # 战斗速度
  23. #
  24. BATTLE_SPEED = 2.0
  25. #
  26. # 战斗开始的时候气槽百分比
  27. #
  28. START_CP_PERCENT = 0
  29. end

  30. class Scene_Battle

  31. # 效果音效,可以自己添加
  32. DATA_SYSTEM_COMMAND_UP_SE = ""

  33. # 各项数值功能消耗的CP值
  34. CP_COST_BASIC_ACTIONS = 0 # 基础共同
  35. CP_COST_SKILL_ACTION = 65535 # 技能
  36. CP_COST_ITEM_ACTION = 65535 # 物品
  37. CP_COST_THROW_ACTION = 65535 # 投掷
  38. CP_COST_BASIC_ATTACK = 65535 # 攻撃
  39. CP_COST_BASIC_GUARD = 32768 # 防御
  40. CP_COST_BASIC_NOTHING = 65535 # 不做任何事情
  41. CP_COST_BASIC_ESCAPE = 65535 # 逃跑
  42. end

  43. #==============================================================================
  44. # --- XRXS.コマンドウィンドウ?コマンド追加機構 ---
  45. #------------------------------------------------------------------------------
  46. # Window_Commandクラスに add_command メソッドを追加します。
  47. #==============================================================================
  48. module XRXS_Window_Command_Add_Command
  49. #--------------------------------------------------------------------------
  50. # ○ コマンドを追加
  51. #--------------------------------------------------------------------------
  52. def add_command(command)
  53. # 初期化されていない場合、無効化判別用の配列 @disabled の初期化
  54. #
  55. if @disabled == nil
  56. @disabled = []
  57. end
  58. if @commands.size != @disabled.size
  59. for i in [email protected]
  60. @disabled[i] = false
  61. end
  62. end
  63. #
  64. # 追加
  65. #
  66. #@commands.push(command)
  67. @disabled.push(false)
  68. @item_max = @commands.size
  69. self.y -= 32
  70. self.height += 32
  71. self.contents.dispose
  72. self.contents = nil
  73. self.contents = Bitmap.new(self.width - 32, @item_max * 32)
  74. refresh
  75. for i in [email protected]
  76. if @disabled[i]
  77. disable_item(i)
  78. end
  79. end
  80. end
  81. #--------------------------------------------------------------------------
  82. # ○ 項目の無効化
  83. # index : 項目番号
  84. #--------------------------------------------------------------------------
  85. def disable_item(index)
  86. if @disabled == nil
  87. @disabled = []
  88. end
  89. @disabled[index] = true
  90. draw_item(index, disabled_color)
  91. end
  92. end
  93. class Window_Command < Window_Selectable
  94. #--------------------------------------------------------------------------
  95. # ○ インクルード
  96. #--------------------------------------------------------------------------
  97. include XRXS_Window_Command_Add_Command
  98. #--------------------------------------------------------------------------
  99. # ● 項目の無効化
  100. # index : 項目番号
  101. #--------------------------------------------------------------------------
  102. def disable_item(index)
  103. super
  104. end
  105. end
  106. #==============================================================================
  107. # □ Scene_Battle_CP
  108. #==============================================================================
  109. class Scene_Battle_CP
  110. #--------------------------------------------------------------------------
  111. # ○ 公開インスタンス変数
  112. #--------------------------------------------------------------------------
  113. attr_accessor :stop # CP加算ストップ
  114. #----------------------------------------------------------------------------
  115. # ○ オブジェクトの初期化
  116. #----------------------------------------------------------------------------
  117. def initialize
  118. @battlers = []
  119. @cancel = false
  120. @stop = false
  121. @agi_total = 0
  122. # 配列 count_battlers を初期化
  123. count_battlers = []
  124. # エネミーを配列 count_battlers に追加
  125. for enemy in $game_troop.enemies
  126. count_battlers.push(enemy)
  127. end
  128. # アクターを配列 count_battlers に追加
  129. for actor in $game_party.actors
  130. count_battlers.push(actor)
  131. end
  132. for battler in count_battlers
  133. @agi_total += battler.agi
  134. end
  135. for battler in count_battlers
  136. battler.cp = [[65535 * START_CP_PERCENT * (rand(15) + 85) * 4 * battler.agi / @agi_total / 10000, 0].max, 65535].min
  137. end
  138. end
  139. #----------------------------------------------------------------------------
  140. # ○ CPカウントアップ
  141. #----------------------------------------------------------------------------
  142. def update
  143. # ストップされているならリターン
  144. return if @stop
  145. #
  146. for battler in $game_party.actors + $game_troop.enemies
  147. # 行動出来なければ無視
  148. if battler.dead? == true
  149. battler.cp = 0
  150. next
  151. end
  152. battler.cp = [[battler.cp + BATTLE_SPEED * 4096 * battler.agi / @agi_total, 0].max, 65535].min
  153. end
  154. end
  155. #----------------------------------------------------------------------------
  156. # ○ CPカウントの開始
  157. #----------------------------------------------------------------------------
  158. def stop
  159. @cancel = true
  160. if @cp_thread != nil then
  161. @cp_thread.join
  162. @cp_thread = nil
  163. end
  164. end
  165. end

  166. #==============================================================================
  167. # ■ Game_Battler
  168. #==============================================================================
  169. class Game_Battler
  170. attr_accessor :now_guarding # 現在防御中フラグ
  171. attr_accessor :cp # 現在CP
  172. attr_accessor :slip_state_update_ban # スリップ?ステート自動処理の禁止
  173. #--------------------------------------------------------------------------
  174. # ○ CP の変更
  175. #--------------------------------------------------------------------------
  176. def cp=(p)
  177. @cp = [[p, 0].max, 65535].min
  178. end
  179. #--------------------------------------------------------------------------
  180. # ● 防御中判定 [ 再定義 ]
  181. #--------------------------------------------------------------------------
  182. def guarding?
  183. return @now_guarding
  184. end
  185. #--------------------------------------------------------------------------
  186. # ● コマンド入力可能判定
  187. #--------------------------------------------------------------------------
  188. alias xrxs_bp1_inputable? inputable?
  189. def inputable?
  190. bool = xrxs_bp1_inputable?
  191. return (bool and (@cp >= 65535))
  192. end
  193. #--------------------------------------------------------------------------
  194. # ● ステート自然解除 (ターンごとに呼び出し)
  195. #--------------------------------------------------------------------------
  196. alias xrxs_bp1_remove_states_auto remove_states_auto
  197. def remove_states_auto
  198.   return if @slip_state_update_ban
  199.   xrxs_bp1_remove_states_auto
  200. end
  201. end
  202. #==============================================================================
  203. # ■ Game_Actor
  204. #==============================================================================
  205. class Game_Actor < Game_Battler
  206. #--------------------------------------------------------------------------
  207. # ● セットアップ
  208. #--------------------------------------------------------------------------
  209. alias xrxs_bp1_setup setup
  210.   def setup(actor_id)
  211.     xrxs_bp1_setup(actor_id)
  212.     @cp = 0
  213.     @now_guarding = false
  214.     @slip_state_update_ban = false
  215.   end
  216. end
  217. #==============================================================================
  218. # ■ Game_Enemy
  219. #==============================================================================
  220. class Game_Enemy < Game_Battler
  221. #--------------------------------------------------------------------------
  222. # ● オブジェクト初期化
  223. #--------------------------------------------------------------------------
  224. alias xrxs_bp1_initialize initialize
  225.   def initialize(troop_id, member_index)
  226.     xrxs_bp1_initialize(troop_id, member_index)
  227.     @cp = 0
  228.     @now_guarding = false
  229.     @slip_state_update_ban = false
  230.   end
  231. end
  232. #==============================================================================
  233. # ■ Window_All
  234. #==============================================================================
  235. class Window_All < Window_Base
  236.   def initialize
  237.     #super(0,0,640,480)
  238.     #..........................................................................
  239.     @enemy_cp_sprite = []
  240.     @enemy_cp_sprite_back = []
  241.     @enemy_cp_sprite_count = []
  242.     for actor in $game_troop.enemies
  243.       next if !actor.exist?
  244.       @enemy_cp_sprite_count.push(actor.index)
  245.       @enemy_cp_sprite[actor.index] = Sprite.new
  246.       @enemy_cp_sprite[actor.index].bitmap = Bitmap.new("Graphics/system/battle/hmcp/sprite/" + actor.name)
  247.       @enemy_cp_sprite[actor.index].x = 450
  248.       @enemy_cp_sprite[actor.index].y = 25 + 11
  249.       @enemy_cp_sprite[actor.index].z = 102
  250.       @enemy_cp_sprite_back[actor.index] = Sprite.new
  251.       @enemy_cp_sprite_back[actor.index].bitmap = Bitmap.new("Graphics/system/battle/hmcp/cp_sprite")
  252.       @enemy_cp_sprite_back[actor.index].x = 450
  253.       @enemy_cp_sprite_back[actor.index].y = 25
  254.       @enemy_cp_sprite_back[actor.index].z = 102
  255.     end
  256.     refresh
  257.   end
  258.   def dispose
  259.     for actor_index in @enemy_cp_sprite_count
  260.       @enemy_cp_sprite[actor_index].bitmap.dispose
  261.       @enemy_cp_sprite[actor_index].dispose
  262.       @enemy_cp_sprite_back[actor_index].bitmap.dispose
  263.       @enemy_cp_sprite_back[actor_index].dispose
  264.     end
  265.   end
  266.   def refresh
  267.     for actor in $game_troop.enemies
  268.       next if !actor.exist?
  269.       if actor.cp == nil
  270.         actor.cp = 0
  271.       end
  272.       @enemy_cp_sprite[actor.index].x = 450 + actor.cp * 140 /65535
  273.       @enemy_cp_sprite_back[actor.index].x = 450 + actor.cp * 140 /65535
  274.     end
  275.   end
  276. end

  277. #==============================================================================
  278. # ■ Window_BattleStatus
  279. #==============================================================================
  280. class Window_BattleStatus < Window_Base
  281.   #--------------------------------------------------------------------------
  282.   # ○ 公開インスタンス変数
  283.   #--------------------------------------------------------------------------
  284.   attr_accessor :update_cp_only # CPメーターのみの更新
  285.   #--------------------------------------------------------------------------
  286.   # ● オブジェクト初期化
  287.   #--------------------------------------------------------------------------
  288.   alias xrxs_bp1_initialize initialize
  289.   def initialize
  290.     @update_cp_only = false
  291.     @wall = Window_All.new
  292.     xrxs_bp1_initialize
  293.    
  294.   end
  295.   def dispose
  296.     super
  297.     @wall.dispose
  298.     @hp_bitmap.dispose
  299.     @mp_bitmap.dispose
  300.     @cp_bitmap.dispose
  301.     @cp_back_bar.dispose
  302.     for actor in $game_party.actors
  303.       @actor_cp_sprite[actor.index].bitmap.dispose
  304.       @actor_cp_sprite[actor.index].dispose
  305.       @actor_cp_sprite_back[actor.index].bitmap.dispose
  306.       @actor_cp_sprite_back[actor.index].dispose
  307.     end
  308.     for actor_index in 1..$game_party.actors.size
  309.       @sta_back[actor_index].bitmap.dispose
  310.       @sta_back[actor_index].dispose
  311.       @sta_output[actor_index].bitmap.dispose
  312.       @sta_output[actor_index].dispose
  313.       @cp_output[actor_index].bitmap.dispose
  314.       @cp_output[actor_index].dispose
  315.     end
  316.   end
  317.   #--------------------------------------------------------------------------
  318.   # ● リフレッシュ
  319.   #--------------------------------------------------------------------------
  320.   alias xrxs_bp1_refresh refresh
  321.   def refresh
  322.     unless @update_cp_only
  323.       xrxs_bp1_refresh
  324.     end
  325.     refresh_cp
  326.     @wall.refresh
  327.   end
  328.   #--------------------------------------------------------------------------
  329.   # ○ リフレッシュ(CPのみ)
  330.   #--------------------------------------------------------------------------
  331.   def refresh_cp
  332.     #........................................................................
  333.     for actor in $game_party.actors
  334.       next if !actor.exist?
  335.       if actor.cp == nil
  336.         actor.cp = 0
  337.       end
  338.       @actor_cp_sprite[actor.index].x = 450 + actor.cp * 140 /65535
  339.       @actor_cp_sprite_back[actor.index].x = 450 + actor.cp * 140 /65535
  340.     end
  341.     for i in 0...$game_party.actors.size
  342.       actor = $game_party.actors[i]
  343.       if actor.cp == nil
  344.         actor.cp = 0
  345.       end
  346.       @cp_output[i + 1].bitmap.clear
  347.       @cp_output[i + 1].bitmap.font.size = 11
  348.       @cp_output[i + 1].bitmap.font.name = "宋体"
  349.       @cp_output[i + 1].bitmap.font.color.set(50, 50, 50)
  350.       cp_height = actor.cp * @cp_bitmap.height / 65535
  351.       cp_rect = Rect.new(0, @cp_bitmap.height - cp_height, @cp_bitmap.width, cp_height)
  352.       @cp_output[i + 1].bitmap.blt(9, 6 + @cp_bitmap.height - cp_height, @cp_bitmap, cp_rect)
  353.     end
  354.     #........................................................................
  355.   end
  356. end
  357. #==============================================================================
  358. # ■ Scene_Battle
  359. #==============================================================================
  360. class Scene_Battle
  361. #--------------------------------------------------------------------------
  362. # ● フレーム更新
  363. #--------------------------------------------------------------------------
  364. alias xrxs_bp1_update update
  365. def update
  366. xrxs_bp1_update
  367. # CP更新
  368. @cp_thread.update
  369. end
  370. #--------------------------------------------------------------------------
  371. # ● バトル終了
  372. # result : 結果 (0:勝利 1:敗北 2:逃走)
  373. #--------------------------------------------------------------------------
  374. alias xrxs_bp1_battle_end battle_end
  375. def battle_end(result)
  376. # CPカウントを停止する
  377. @cp_thread.stop
  378. # 呼び戻す
  379. xrxs_bp1_battle_end(result)
  380. end
  381. #--------------------------------------------------------------------------
  382. # ● プレバトルフェーズ開始
  383. #--------------------------------------------------------------------------
  384. alias xrxs_bp1_start_phase1 start_phase1
  385. def start_phase1
  386. @agi_total = 0
  387. # CP加算を開始する
  388. @cp_thread = Scene_Battle_CP.new
  389. # インデックスを計算
  390. @cp_escape_actor_command_index = @actor_command_window.height/32 - 1
  391. # アクターコマンドウィンドウに追加
  392. #@actor_command_window.add_command("逃跑")
  393. if !$game_temp.battle_can_escape
  394. #@actor_command_window.disable_item(@cp_escape_actor_command_index)
  395. end
  396. # 呼び戻す
  397. xrxs_bp1_start_phase1
  398. end
  399. #--------------------------------------------------------------------------
  400. # ● パーティコマンドフェーズ開始
  401. #--------------------------------------------------------------------------
  402. alias xrxs_bp1_start_phase2 start_phase2
  403. def start_phase2
  404. xrxs_bp1_start_phase2
  405. @party_command_window.active = false
  406. @party_command_window.visible = false
  407. # CP加算を再開する
  408. @cp_thread.stop = false
  409. # 次へ
  410. start_phase3
  411. end
  412. #--------------------------------------------------------------------------
  413. # ● アクターコマンドウィンドウのセットアップ
  414. #--------------------------------------------------------------------------
  415. alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
  416. def phase3_setup_command_window
  417. # CPスレッドを一時停止する
  418. @cp_thread.stop = true
  419. # ウィンドウのCP更新
  420. @status_window.refresh_cp
  421. # @active_battlerの防御を解除
  422. @active_battler.now_guarding = false
  423. # 効果音の再生
  424. Audio.se_play(DATA_SYSTEM_COMMAND_UP_SE) if DATA_SYSTEM_COMMAND_UP_SE != ""
  425. # 呼び戻す
  426. xrxs_bp1_phase3_setup_command_window
  427. end
  428. #--------------------------------------------------------------------------
  429. # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  430. #--------------------------------------------------------------------------
  431. alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
  432. def update_phase3_basic_command
  433. # C ボタンが押された場合
  434. if Input.trigger?(Input::C)
  435. # アクターコマンドウィンドウのカーソル位置で分岐
  436. case @actor_command_window.index
  437. when @cp_escape_actor_command_index # 逃げる
  438. if $game_temp.battle_can_escape
  439. # 決定 SE を演奏
  440. $game_system.se_play($data_system.decision_se)
  441. # アクションを設定
  442. @active_battler.current_action.kind = 0
  443. @active_battler.current_action.basic = 4
  444. # 次のアクターのコマンド入力へ
  445. end_atk(@active_battler.index)
  446. phase3_next_actor
  447. else
  448. # ブザー SE を演奏
  449. $game_system.se_play($data_system.buzzer_se)
  450. end
  451. return
  452. end
  453. end
  454. xrxs_bsp1_update_phase3_basic_command
  455. end
  456. #--------------------------------------------------------------------------
  457. # ● メインフェーズ開始
  458. #--------------------------------------------------------------------------
  459. alias xrxs_bp1_start_phase4 start_phase4
  460. def start_phase4
  461. # 呼び戻す
  462. xrxs_bp1_start_phase4
  463. # CPスレッドを一時停止する
  464. unless @action_battlers.empty?
  465. @cp_thread.stop = true
  466. end
  467. end
  468. #--------------------------------------------------------------------------
  469. # ● 行動順序作成
  470. #--------------------------------------------------------------------------
  471. alias xrxs_bp1_make_action_orders make_action_orders
  472. def make_action_orders
  473.   xrxs_bp1_make_action_orders
  474.   # 全員のCPを確認
  475.   exclude_battler = []
  476.   for battler in @action_battlers
  477.   # CPが不足している場合は @action_battlers から除外する
  478.     if battler.cp < 65535
  479.     exclude_battler.push(battler)
  480.     end
  481.   end
  482.   @action_battlers -= exclude_battler
  483. end
  484. #--------------------------------------------------------------------------
  485. # ● フレーム更新 (メインフェーズ ステップ 1 : アクション準備)
  486. #--------------------------------------------------------------------------
  487. alias xrxs_bp1_update_phase4_step1 update_phase4_step1
  488. def update_phase4_step1
  489. # 初期化
  490. @phase4_act_continuation = 0
  491. # 勝敗判定
  492. if judge
  493. @cp_thread.stop
  494. # 勝利または敗北の場合 : メソッド終了
  495. return
  496. end
  497. # 未行動バトラー配列の先頭から取得
  498. @active_battler = @action_battlers[0]
  499. # ステータス更新をCPだけに限定。
  500. @status_window.update_cp_only = true
  501. # ステート更新を禁止。
  502. # 戻す
  503. xrxs_bp1_update_phase4_step1
  504. # @status_windowがリフレッシュされなかった場合は手動でリフレッシュ(CPのみ)
  505. if @phase4_step != 2
  506. # リフレッシュ
  507. @status_window.refresh
  508. # 軽量化:たったコレだけΣ(?w?
  509. Graphics.frame_reset
  510. end
  511. # 禁止を解除
  512. @status_window.update_cp_only = false
  513. end
  514. #--------------------------------------------------------------------------
  515. # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  516. #--------------------------------------------------------------------------
  517. alias xrxs_bp1_update_phase4_step2 update_phase4_step2
  518. def update_phase4_step2
  519. # 強制アクションでなければ
  520. unless @active_battler.current_action.forcing
  521. # 制約が [敵を通常攻撃する] か [味方を通常攻撃する] の場合
  522. if @active_battler.restriction == 2 or @active_battler.restriction == 3
  523. # アクションに攻撃を設定
  524. @active_battler.current_action.kind = 0
  525. @active_battler.current_action.basic = 0
  526. end
  527. # 制約が [行動できない] の場合
  528. if @active_battler.restriction == 4
  529. # アクション強制対象のバトラーをクリア
  530. $game_temp.forcing_battler = nil
  531. if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
  532. # ステート自然解除
  533. @active_battler.remove_states_auto
  534. # CP消費
  535. @active_battler.cp -= 65535
  536. # ステータスウィンドウをリフレッシュ
  537. @status_window.refresh
  538. end
  539. # ステップ 1 に移行
  540. @phase4_step = 1
  541. return
  542. end
  543. end
  544. # アクションの種別で分岐
  545. case @active_battler.current_action.kind
  546. when 0
  547. # 攻撃?防御?逃げる?何もしない時の共通消費CP
  548. @active_battler.cp -= CP_COST_BASIC_ACTIONS if @phase4_act_continuation == 0
  549. when 1
  550. # スキル使用時の消費CP
  551. @active_battler.cp -= CP_COST_SKILL_ACTION if @phase4_act_continuation == 0
  552. when 2
  553. # アイテム使用時の消費CP
  554. @active_battler.cp -= CP_COST_ITEM_ACTION if @phase4_act_continuation == 0
  555. when 11
  556. @active_battler.cp -= CP_COST_THROW_ACTION if @phase4_act_continuation == 0
  557. end
  558. # ステート自然解除
  559. @active_battler.remove_states_auto
  560. # 呼び戻す
  561. xrxs_bp1_update_phase4_step2
  562. end
  563.   #--------------------------------------------------------------------------
  564.   # ● 基本アクション 結果作成
  565.   #--------------------------------------------------------------------------
  566.   alias xrxs_bp1_make_basic_action_result make_basic_action_result
  567.   def make_basic_action_result
  568.     # 攻撃の場合
  569.     if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
  570.       @active_battler.cp -= CP_COST_BASIC_ATTACK # 攻撃時のCP消費
  571.     end
  572.     # 防御の場合
  573.     if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
  574.       @active_battler.cp -= CP_COST_BASIC_GUARD # 防御時のCP消費
  575.       # @active_battlerの防御をON
  576.       @active_battler.now_guarding = true
  577.     end
  578.     # 敵の逃げるの場合
  579.     if @active_battler.is_a?(Game_Enemy) and
  580.       @active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
  581.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  582.     end
  583.     # 何もしないの場合
  584.     if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
  585.       @active_battler.cp -= CP_COST_BASIC_NOTHING # 何もしない時のCP消費
  586.     end
  587.     # 逃げるの場合
  588.     if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
  589.       @active_battler.cp -= CP_COST_BASIC_ESCAPE # 逃走時のCP消費
  590.       # 逃走可能ではない場合
  591.       if $game_temp.battle_can_escape == false
  592.         # ブザー SE を演奏
  593.         $game_system.se_play($data_system.buzzer_se)
  594.         return
  595.       end
  596.       # 逃走処理
  597.       update_phase2_escape
  598.       return
  599.     end
  600.     # 呼び戻す
  601.     xrxs_bp1_make_basic_action_result
  602.   end
  603. end


  604. #==============================================================================
  605. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  606. #==============================================================================  
复制代码
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. #==============================================================================
  5. # ■ Game_Actor
  6. #------------------------------------------------------------------------------
  7. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  8. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  9. #==============================================================================

  10. class Game_Actor < Game_Battler
  11. #--------------------------------------------------------------------------
  12. # ● 取得战斗画面的 X 坐标
  13. #--------------------------------------------------------------------------
  14. def screen_x
  15. case self.index
  16. when 0
  17.    return 500
  18. when 1
  19.    return 580
  20. when 2
  21.    return 510
  22. when 3
  23.    return 580
  24. else
  25.    return 600

  26.   end
  27. end
  28. #--------------------------------------------------------------------------
  29. # ● 取得战斗画面的 Y 坐标
  30. #--------------------------------------------------------------------------
  31. def screen_y
  32. case self.index
  33. when 0
  34.    return 435
  35. when 1
  36.    return 380
  37. when 2
  38.    return 360
  39. when 3
  40.    return 325
  41. else
  42.    return 1000
  43.   end
  44. end
  45. #--------------------------------------------------------------------------
  46. # ● 取得战斗画面的 Z 坐标
  47. #--------------------------------------------------------------------------
  48. def screen_z
  49. case self.index
  50. when 0
  51.    return 10
  52. when 1
  53.    return 9
  54. when 2
  55.    return 8
  56. when 3
  57.    return 7
  58. else
  59.    return 0
  60.    end
  61. end
  62. end


  63. #==============================================================================
  64. # ■ Window_Base
  65. #------------------------------------------------------------------------------
  66. #  游戏中全部窗口的超级类。
  67. #==============================================================================

  68. class Window_Base < Window
  69. #--------------------------------------------------------------------------
  70. # ● 描绘 HP
  71. #     actor : 角色
  72. #     x     : 描画目标 X 坐标
  73. #     y     : 描画目标 Y 坐标
  74. #     width : 描画目标的宽
  75. #--------------------------------------------------------------------------
  76. def draw_actor_hp1(actor, x, y, width = 72)
  77.   
  78.    # 计算描绘 MaxHP 所需的空间
  79.    if width - 24 >= 32
  80.      hp_x = x + 32# + width - 24
  81.    end
  82.    # 描绘 HP
  83.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  84.      actor.hp <= actor.maxhp / 4 ? crisis_color : Color.new(255,-255,-255,255)
  85.    self.contents.draw_text(240 + x, 396 , 30, 24, actor.hp.to_s, 2)
  86. end
  87. #--------------------------------------------------------------------------
  88. # ● 描绘 SP
  89. #     actor : 角色
  90. #     x     : 描画目标 X 坐标
  91. #     y     : 描画目标 Y 坐标
  92. #     width : 描画目标的宽
  93. #--------------------------------------------------------------------------
  94. def draw_actor_sp1(actor, x, y, width = 72)
  95.    
  96.    # 计算描绘 MaxSP 所需的空间
  97.    if width - 24 >= 32
  98.      sp_x = x + 32# + width - 24
  99.    end
  100.    # 描绘 SP
  101.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  102.      actor.sp <= actor.maxsp / 4 ? crisis_color : Color.new(-255,-255,255,255)
  103.    self.contents.draw_text(256 + x, 416, 30, 24, actor.sp.to_s, 2)
  104. end
  105. end





  106. #==============================================================================
  107. # ■ Window_BattleStatus
  108. #------------------------------------------------------------------------------
  109. #  显示战斗画面同伴状态的窗口。
  110. #==============================================================================

  111. class Window_BattleStatus < Window_Base
  112. #--------------------------------------------------------------------------
  113. # ● 初始化对像
  114. #--------------------------------------------------------------------------
  115. #$data_system_level_up_me = "Audio/ME/升级音乐"
  116. def initialize
  117.    super(0, 0, 640, 480)
  118.    self.contents = Bitmap.new(width - 10, height - 32)
  119.    self.opacity = 0
  120.     self.contents.font.name = "Arial Black"
  121.    @level_up_flags = [false, false, false, false]
  122.    refresh
  123. end
  124. #--------------------------------------------------------------------------
  125. # ● 释放
  126. #--------------------------------------------------------------------------
  127. def dispose
  128.    super
  129. end
  130. #--------------------------------------------------------------------------
  131. # ● 设置升级标志
  132. #     actor_index : 角色索引
  133. #--------------------------------------------------------------------------
  134. def level_up(actor_index)
  135.    @level_up_flags[actor_index] = true
  136. end
  137. #--------------------------------------------------------------------------
  138. # ● 刷新
  139. #--------------------------------------------------------------------------
  140. def refresh
  141.    self.contents.clear
  142.    @item_max = $game_party.actors.size
  143.     for i in 0...$game_party.actors.size
  144.       actor = $game_party.actors[i]
  145.       
  146.       x = i * 150
  147.       a = actor.id.to_s + "_b"
  148.       bitmap=Bitmap.new("Graphics/pictures/#{a}")  
  149.       src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  150.       self.contents.blt(30 + x , 370, bitmap, src_rect)
  151.       
  152.       
  153.       if @level_up_flags[i]
  154.        self.contents.font.color = normal_color
  155.        self.contents.draw_text(x, y, 120, 24, "LEVEL UP!")
  156.        Audio.me_stop
  157. #        Audio.me_play($data_system_level_up_me)
  158.      else
  159.      
  160.      self.contents.font.color = Color.new(255 , -255 ,-255 ,255 )
  161.      draw_actor_hp1(actor, x-122, y+10, 80)
  162.      self.contents.font.color = Color.new(-255 , -255 ,255 ,255 )
  163.      draw_actor_sp1(actor, x-132, y+29, 80)
  164.     end
  165.    end
  166. end

  167. #--------------------------------------------------------------------------
  168. # ● 刷新画面
  169. #--------------------------------------------------------------------------
  170. def update
  171.    super
  172.    # 主界面的不透明度下降
  173.    if $game_temp.battle_main_phase
  174.      self.contents_opacity -= 50 if self.contents_opacity > 1
  175.    else
  176.      self.contents_opacity += 50 if self.contents_opacity < 255
  177.    end
  178. end
  179. end





  180. #==============================================================================
  181. # ■ Window_BattleStatus
  182. #==============================================================================
  183. class Window_BattleStatus < Window_Base
  184. #--------------------------------------------------------------------------
  185. # ● 初始化
  186. #--------------------------------------------------------------------------
  187. alias xrxs_bp2_refresh refresh
  188. def refresh
  189.    xrxs_bp2_refresh
  190.    @item_max = $game_party.actors.size
  191.     for i in 0...$game_party.actors.size
  192.      actor = $game_party.actors[i]
  193.      case i
  194.        when 0
  195.         x = 250
  196.         y = 390
  197.        when 1
  198.         x = 390
  199.         y = 340
  200.        when 2
  201.         x = 480
  202.         y = 300
  203.        when 3
  204.         x = 550
  205.         y = 270
  206.       end
  207.      
  208.    end
  209. end
  210. end
  211. #==============================================================================
  212. # ■ Window_Base
  213. #==============================================================================
  214. class Window_Base < Window
  215. #--------------------------------------------------------------------------
  216. # ● HP描画
  217. #--------------------------------------------------------------------------
  218. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  219.    if type == 1 and actor.hp == 0
  220.      return
  221.    end
  222.    self.contents.font.color = system_color
  223.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  224.    w = width * actor.hp / actor.maxhp
  225.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  226.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  227.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  228.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  229.    
  230.    end
  231. #--------------------------------------------------------------------------
  232. # ● SP描画
  233. #--------------------------------------------------------------------------
  234. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  235.    if type == 1 and actor.hp == 0
  236.      return
  237.    end
  238.    self.contents.font.color = system_color
  239.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  240.    w = width * actor.sp / actor.maxsp
  241.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  242.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  243.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  244.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  245. end
  246. end
复制代码
谢谢啦!!
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
102
在线时间
123 小时
注册时间
2010-8-13
帖子
100
4
发表于 2011-7-21 19:05:12 | 只看该作者
…………没有素材我怎么看呀
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
57
在线时间
161 小时
注册时间
2011-2-2
帖子
469
5
发表于 2011-7-21 20:14:25 | 只看该作者
这个坐标可以吗?可以的话把坐标发给你
我又回来打酱油了
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-16 07:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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