在角色有技能是消耗tp的情况下,显示tp,否则就显示mp
class Window_MenuStatus < Window_Selectable def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y) draw_actor_level(actor, x, y + line_height * 1) draw_actor_icons(actor, x, y + line_height * 2) draw_actor_class(actor, x + 120, y) draw_actor_hp(actor, x + 120, y + line_height * 1) if $game_actors[actor.id].draw_tp? draw_actor_tp(actor, x + 120, y + line_height * 2) else draw_actor_mp(actor, x + 120, y + line_height * 2) end end end class Game_Actor < Game_Battler def draw_tp? return false unless $data_system.opt_display_tp for skill in skills next unless added_skill_types.include?(skill.stype_id) return true if skill.tp_cost > 0 end return false end end
class Window_MenuStatus < Window_Selectable
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 120, y)
draw_actor_hp(actor, x + 120, y + line_height * 1)
if $game_actors[actor.id].draw_tp?
draw_actor_tp(actor, x + 120, y + line_height * 2)
else
draw_actor_mp(actor, x + 120, y + line_height * 2)
end
end
end
class Game_Actor < Game_Battler
def draw_tp?
return false unless $data_system.opt_display_tp
for skill in skills
next unless added_skill_types.include?(skill.stype_id)
return true if skill.tp_cost > 0
end
return false
end
end
|