Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RPG::Skill < RPG::UsableItem
- attr_accessor :bp_cost
- attr_accessor :burst_skill
- alias recall_init initialize
- def initialize
- @bp_cost = 0
- @burst_skill = false
- end
- def check_notetag
- if @note == "<final burst>"
- @burst_skill = true
- @bp_cost = 600
- end
- end
- end
- class Game_BattlerBase
- attr_reader :bp
- def initialize
- @hp = @mp = @tp = 0
- @bp = 0
- @hidden = false
- clear_param_plus
- clear_states
- clear_buffs
- end
- def bp=(bp)
- @bp = bp
- refresh
- end
- def bp_max
- @bp_max = mhp / 2
- end
- def skill_bp_cost(skill)
- skill.bp_cost
- end
- def skill_cost_payable?(skill)
- #unless skill.burst_skill
- # tp >= skill_tp_cost(skill) &&
- # mp >= skill_mp_cost(skill)
- #else
- #end
- tp >= skill_tp_cost(skill) &&
- mp >= skill_mp_cost(skill) &&
- bp >= skill_bp_cost(skill)
- end
- def pay_skill_cost(skill)
- self.mp -= skill_mp_cost(skill)
- self.tp -= skill_tp_cost(skill)
- self.bp -= skill_bp_cost(skill)
- end
- end
- class Window_SkillList < Window_Selectable
- def draw_skill_cost(rect, skill)
- if @actor.skill_tp_cost(skill) > 0
- change_color(tp_cost_color, enable?(skill))
- draw_text(rect, @actor.skill_tp_cost(skill), 2)
- elsif @actor.skill_mp_cost(skill) > 0
- change_color(mp_cost_color, enable?(skill))
- draw_text(rect, @actor.skill_mp_cost(skill), 2)
- elsif skill.burst_skill && @actor.skill_bp_cost(skill) > 0
- change_color(gold_color, enable?(skill))
- draw_text(rect, @actor.skill_bp_cost(skill), 2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment