Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # // Cheapo Stats Patch (RGSS3 Wrap)
- module Vocab
- def self.param(id)
- case id
- when 0
- return self.hp_a
- when 1
- return self.mp_a
- when 2
- return self.atk
- when 3
- return self.def()
- when 4
- return self.spi
- when 5
- return self.res
- when 6
- return self.agi
- when 7
- return self.dex
- else
- return ""
- end
- #rescue
- # return ""
- end
- end
- class Game_Battler
- def param(id)
- case id
- when 0
- return maxhp
- when 1
- return maxmp
- when 2
- return atk
- when 3
- return self.def()
- when 4
- return spi
- when 5
- return res
- when 6
- return agi
- when 7
- return dex
- else
- return 0
- end
- #rescue
- # return -1
- end
- end
- class Window_Base
- def draw_actor_parameter(actor, x, y, type)
- parameter_name = Vocab.param(type)
- parameter_value = actor.param(type)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 120, WLH, parameter_name)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
- end
- end
- class Window_EquipStatus < Window_Base
- def refresh
- self.contents.clear
- draw_actor_name(@actor, 4, 0)
- for i in 0...6
- draw_parameter(0, 16 * (i+1), i+2)
- end
- end
- def set_new_parameters(*params)
- @params ||= [nil]*8
- if(@params != params)
- @params = params
- refresh
- end
- end
- def draw_parameter(x, y, type)
- @params ||= [nil]*8
- name = Vocab.param(type)
- value = @actor.param(type)
- new_value = @params[type]
- self.contents.font.color = system_color
- self.contents.draw_text(x + 4, y, 80, WLH, name)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 90, y, 30, WLH, value, 2)
- self.contents.font.color = system_color
- self.contents.draw_text(x + 122, y, 20, WLH, ">", 1)
- if new_value != nil
- self.contents.font.color = new_parameter_color(value, new_value)
- self.contents.draw_text(x + 142, y, 30, WLH, new_value, 2)
- end
- end
- end
- class FRV::Window_StatusBase < ::Window_Selectable
- def draw_parameters( x, y, param_spacing=16)#WLH )
- for i in 0...6
- draw_actor_parameter(@actor, x, y + param_spacing * i, i+2)
- end
- end
- end
- class FRV::Window_StatusMain < ::FRV::Window_StatusBase
- def refresh()
- create_contents()
- draw_actor_face( @actor, 0, 0 )
- draw_actor_name( @actor, 100, 4 )
- draw_actor_hp( @actor, 100, 42 )
- draw_actor_mp( @actor, 100, 56 )
- draw_actor_level( @actor, 4, 96-24 )
- draw_actor_state( @actor, 100, 26, 128 )
- draw_parameters( self.width / 2, 0 )
- end
- end
- class Scene_Equip
- def update_status_window
- if @equip_window.active
- @status_window.set_new_parameters(*([nil]*8))
- elsif @item_window.active
- temp_actor = @actor.clone
- temp_actor.change_equip(@equip_window.index, @item_window.item, true)
- @status_window.set_new_parameters(*(0...8).to_a.collect{|i|temp_actor.param(i)})
- end
- @status_window.update
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment