赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 7 |
经验 | 16867 |
最后登录 | 2024-4-15 |
在线时间 | 285 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 673
- 在线时间
- 285 小时
- 注册时间
- 2007-1-6
- 帖子
- 183
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 江南小帅瓜 于 2014-4-10 20:47 编辑
- module XRXS59
- MAXPP_DATABASE = {1=>99,#Cura 1
- 2=>90, #Cura 2
- 3=>80, #Cura 3
- 5=>80, #Remédio
- 9=>50, #Refletir
- 15=>90, #Fogo 1
- 16=>80, #Fogo 2
- 17=>70, #Fogo 3
- 18=>90, #Gelo 1
- 19=>80, #Gelo 2
- 20=>60, #Gelo 36
- 21=>90, #Trovão 1
- 22=>80, #Trovão 2
- 23=>70, #Trovão 3
- 24=>79, #Drain MP
- 25=>30, #Drain HP
- 26=>70, #Bio
- 27=>90, #Terra 1
- 28=>80, #Terra 2
- 29=>70, #Terra 3
- 30=>90, #Vento 1
- 31=>80, #Vento 2
- 32=>70, #Vento 3
- 33=>65, #Cometa
- 35=>60, #Flare
- 34=>55, #Meteoro
- 44=>50, #Ultima
- 45=>1, #Sefia
- 55=>90,#Tripe Combo
- 58=>85,#Jump
- 62=>80,#Air Cut
- 63=>75,#Jump 2
- 71=>60,#Lua Cheia
- 72=>60,#Ilusão
- 73=>55,#Last Spear
- 74=>60,#Corte Velos
- 75=>55, #Legend
- 101=>65,#Legend
- 102=>50, #Legend
- 161=>65, #Chamas
- 145=>99, #Teleporte
- 158=>99,
- 159=>60,
- 173=>99,#Curaga
- 168=>55, #Legend
- 107=>65} #Legend
- end
- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler
- #--------------------------------------------------------------------------
- # ○ PP(パワーポイント) の取得
- #--------------------------------------------------------------------------
- def pp
- @pp = {} if @pp.nil?
- return @pp
- end
- #--------------------------------------------------------------------------
- # ○ PP を全回復
- #--------------------------------------------------------------------------
- def pp_recover
- @pp = nil
- end
- #--------------------------------------------------------------------------
- # ○ PP を消費
- #--------------------------------------------------------------------------
- def pp_cost(skill_id)
- pp_max = XRXS59::MAXPP_DATABASE[skill_id]
- if pp_max.to_i >= 1
- last_pp = self.pp[skill_id]
- last_pp = pp_max if last_pp.nil?
- self.pp[skill_id] = last_pp - 1
- end
- end
- #--------------------------------------------------------------------------
- # ● スキルの使用可能判定
- #--------------------------------------------------------------------------
- alias xrxs59_skill_can_use? skill_can_use?
- def skill_can_use?(skill_id)
- # PPが足りない場合は使用不可
- if XRXS59::MAXPP_DATABASE[skill_id].to_i >= 1 and self.pp[skill_id] == 0
- return false
- end
- # 呼び戻す
- return xrxs59_skill_can_use?(skill_id)
- end
- #--------------------------------------------------------------------------
- # ● 全回復
- #--------------------------------------------------------------------------
- alias xrxs59_recover_all recover_all
- def recover_all
- # 呼び戻す
- xrxs59_recover_all
- # PPを全回復
- pp_recover()
- end
- end
- #==============================================================================
- # ■ Window_Skill
- #==============================================================================
- class Window_Skill < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 項目の描画
- #--------------------------------------------------------------------------
- alias xrxs59_draw_item draw_item
- def draw_item(index)
- # 呼び戻す
- xrxs59_draw_item(index)
- # PP
- maxpp = XRXS59::MAXPP_DATABASE[@data[index].id].to_i
- if maxpp >= 1
- pp = @actor.pp[@data[index].id]
- pp = maxpp if pp.nil?
- x = 4 + index % @column_max * (288 + 32)
- y = index / @column_max * 32
- ox = 225
- oy = 5
- s = 16
- last_size = self.contents.font.size
- self.contents.font.size = s
- self.contents.font.color = Color.new( 255, 255, 255, 255)
- self.contents.draw_text(x+ox, y+oy, s, s, pp.to_s, 2)
- self.contents.font.color = Color.new( 255, 50, 200, 255)
- self.contents.draw_text(x+ox+s, y+oy, s/2, s, "/", 0)
- self.contents.font.color = Color.new( 255, 200, 50, 255)
- self.contents.draw_text(x+ox+s*3/2, y+oy, s, s, maxpp.to_s, 2)
- self.contents.font.size = last_size
- end
- end
- end
- #==============================================================================
- # --- スキルアクション時に PP を消費 ---
- #==============================================================================
- class Scene_Battle
- alias xrxs59_make_skill_action_result make_skill_action_result
- def make_skill_action_result
- # 呼び戻す
- xrxs59_make_skill_action_result
- # PPを消費
- @active_battler.pp_cost(@skill.id)
- end
- end
复制代码 |
|