#==============================================================================
# MelekTaus' MinReq
# Version: ???
#------------------------------------------------------------------------------
# Anleitung
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Um die erforderliche Stärke einer Waffe/Rüstung festzulegen trage folgendes
# in den Notes ein: <stärke X> (X => erforderliche Stärke)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Um die Stärke eines Characters festzulegen oder abzurufen verwende folgendes:
# actor(X).stärke = Y --> Die Stärke von Actor X (ID aus der Datenbank) => Y
# member(X).stärke = Y --> Die Stärke von Member X (Index aus der Gruppe) => Y
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
attr_accessor :stärke
#--------------------------------------------------------------------------
alias melektaus_minreq_game_player_initialize initialize
def initialize
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
melektaus_minreq_game_player_initialize
@stärke = 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
def actor(id)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return $game_actors[id]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
def member(index)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return $game_party.members[index]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Window_Warning < Window_Base
#--------------------------------------------------------------------------
def initialize(text)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
super(72, 172, 400, 72)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
self.contents.draw_text(0, 0, 368, 20, text, 1)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
text = "(Drücke eine Taste um fortzufahren...)"
self.contents.font.size -= 4
self.contents.draw_text(0, 20, 368, 16, text, 1)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
begin
Graphics.update
Input.update
end until Input.trigger?(Input::C) or Input.trigger?(Input::B)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dispose
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Scene_Equip < Scene_Base
#--------------------------------------------------------------------------
def get_stärke(item)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return 0 if item == nil
array = item.note.split("<stärke ")
return 0 if array.size < 2
return array[1].split(" >")[0].to_i
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
def update_item_selection
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if Input.trigger?(Input::B)
Sound.play_cancel
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
elsif Input.trigger?(Input::C)
stärke = get_stärke(@item_window.item)
actor_stärke = @actor.stärke
if stärke > actor_stärke
Sound.play_buzzer
text = "Erforderliche Stärke: " + stärke.to_s
text += " (Zurzeit: " + actor_stärke.to_s + ")"
Window_Warning.new(text)
return
end
Sound.play_equip
@actor.change_equip(@equip_window.index, @item_window.item)
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
@equip_window.refresh
for item_window in @item_windows
item_window.refresh
end
end
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
end
#==============================================================================#==============================================================================
# MelekTaus' MinReq
# Version: ???
#------------------------------------------------------------------------------
# Anleitung
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Um die erforderliche Stärke einer Waffe/Rüstung festzulegen trage folgendes
# in den Notes ein: <stärke X> (X => erforderliche Stärke)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Um die Stärke eines Characters festzulegen oder abzurufen verwende folgendes:
# actor(X).stärke = Y --> Die Stärke von Actor X (ID aus der Datenbank) => Y
# member(X).stärke = Y --> Die Stärke von Member X (Index aus der Gruppe) => Y
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Atrribut:geschicklichkeit wurde hinzugefügt
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
attr_accessor :stärke
attr_accessor :geschicklichkeit
#--------------------------------------------------------------------------
alias melektaus_minreq_game_player_initialize initialize
def initialize
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
melektaus_minreq_game_player_initialize
@stärke = 0
@geschicklichkeit = 0
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
def actor(id)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return $game_actors[id]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
def member(index)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return $game_party.members[index]
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Window_Warning < Window_Base
#--------------------------------------------------------------------------
def initialize(text = ["", ""])
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
height = 72
height += 20 if text[0] != "" and text[1] != ""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
super(72, 172, 460, height)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
y = -20
self.contents.draw_text(0, y += 20, 428, 20, text[0], 1) if text[0] != ""
self.contents.draw_text(0, y += 20, 428, 20, text[1], 1) if text[1] != ""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
text = "(Drücke eine Taste um fortzufahren...)"
self.contents.font.size -= 4
self.contents.draw_text(0, y += 20, 428, 16, text, 1)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
begin
Graphics.update
Input.update
end until Input.trigger?(Input::C) or Input.trigger?(Input::B)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dispose
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Scene_Equip < Scene_Base
#--------------------------------------------------------------------------
def get_stärke(item)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return 0 if item == nil
array = item.note.split("<stärke ")
return 0 if array.size < 2
return array[1].split(" >")[0].to_i
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
def get_geschicklichkeit(item)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return 0 if item == nil
array = item.note.split("<geschicklichkeit ")
return 0 if array.size < 2
return array[1].split(" >")[0].to_i
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
end
#--------------------------------------------------------------------------
def update_item_selection
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if Input.trigger?(Input::B)
Sound.play_cancel
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
elsif Input.trigger?(Input::C)
text = ["", ""]
stärke = get_stärke(@item_window.item)
actor_stärke = @actor.stärke
if stärke > actor_stärke
text[0] += "Erforderliche Stärke: " + stärke.to_s
text[0] += " (Zurzeit: " + actor_stärke.to_s + ")"
end
geschicklichkeit = get_geschicklichkeit(@item_window.item)
actor_geschicklichkeit = @actor.geschicklichkeit
if geschicklichkeit > actor_geschicklichkeit
text[1] += "Erforderliche Geschicklichkeit: " + geschicklichkeit.to_s
text[1] += " (Zurzeit: " + actor_geschicklichkeit.to_s + ")"
end
if text != ["", ""]
Sound.play_buzzer
Window_Warning.new(text)
return
end
Sound.play_equip
@actor.change_equip(@equip_window.index, @item_window.item)
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
@equip_window.refresh
for item_window in @item_windows
item_window.refresh
end
end
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
end
#==============================================================================