#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Scene_SoulRage add-on by Blizzard # Version 6.3 # Type: Additional Scene for SRS # Date: 13.7.2007 # Date v6.3: 23.3.2019 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # This work is licensed under BSD License 2.0: # # #---------------------------------------------------------------------------- # # # # Copyright (c) Boris "Blizzard" Mikić # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or without # # modification, are permitted provided that the following conditions are met: # # # # 1. Redistributions of source code must retain the above copyright notice, # # this list of conditions and the following disclaimer. # # # # 2. Redistributions in binary form must reproduce the above copyright # # notice, this list of conditions and the following disclaimer in the # # documentation and/or other materials provided with the distribution. # # # # 3. Neither the name of the copyright holder nor the names of its # # contributors may be used to endorse or promote products derived from # # this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # # #---------------------------------------------------------------------------- # # You may use this script for both non-commercial and commercial products # without limitations as long as you fulfill the conditions presented by the # above license. The "complete" way to give credit is to include the license # somewhere in your product (e.g. in the credits screen), but a "simple" way # is also acceptable. The "simple" way to give credit is as follows: # # Scene_SoulRage licensed under BSD License 2.0 # Copyright (c) Boris "Blizzard" Mikić # # Alternatively, if your font doesn't support diacritic characters, you may # use this variant: # # Scene_SoulRage licensed under BSD License 2.0 # Copyright (c) Boris "Blizzard" Mikic # # In general other similar variants are allowed as long as it is clear who # the creator is (e.g. "Scene_SoulRage System created by Blizzard" is # acceptable). But if possible, prefer to use one of the two variants listed # above. # # If you fail to give credit and/or claim that this work was created by you, # this may result in legal action and/or payment of damages even though this # work is free of charge to use normally. # #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # This Scene provides a menu like in the battle. You can use Soul Rage skills # in the menu if you set their occasion in the database to be usuable in the # menu. Note that the Scene_SoulRage MUST have its main version the same as # the Soul Rage System, otherwise a compatibility CAN NOT be guaranteed! # # Examples: # # SRS v1.0 # S_SR v1.0 # => works # # SRS v2.2 # S_SR v1.0 # => not known # # SRS v2.9 # S_SR v2.2 # => works # # SRS v2.4 # S_SR v4.1 # => not known # # SRS v3.1 # S_SR v1.9 # => not known # # SRS v1.6 # S_SR v2.1 # => not known # # # If you find any bugs, please report them here: # http://forum.chaos-project.com #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= raise 'Scene_SoulRage requires Soul Rage System!' unless $crls #============================================================================== # Game_Actor #============================================================================== class Game_Actor alias sr_can_use_scene_addon? sr_can_use? def sr_can_use?(skill_id) return false if dead? return false if $data_skills[skill_id].atk_f == 0 && self.restriction == 1 occasion = $data_skills[skill_id].occasion if $game_temp.in_battle return ([0, 1].include?(occasion) && sr_can_use_scene_addon?(skill_id)) else return ([0, 2].include?(occasion) && sr_can_use_scene_addon?(skill_id)) end end alias skill_sr_can_use_scene_addon? skill_can_use? def skill_can_use?(id) return sr_can_use?(id) if $scene.is_a?(Scene_SoulRage) return skill_sr_can_use_scene_addon?(id) end end #============================================================================== # Window_SoulRageStatus #============================================================================== class Window_SoulRageStatus < Window_SkillStatus def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_state(@actor, 140, 0) draw_actor_hp(@actor, 284, 0) draw_actor_sr(@actor, 460, 0) end end #============================================================================== # Scene_SoulRage #============================================================================== class Scene_SoulRage < Scene_Skill def main @actor = $game_party.actors[@actor_index] @help_window = Window_Help.new @skill_window = Window_SoulRage.new(@actor) @status_window = Window_SoulRageStatus.new(@actor) @skill_window.y = @help_window.height + @status_window.height @skill_window.height = 480 - @skill_window.y @skill_window.help_window = @help_window @skill_window.index = 0 @skill_window.update @target_window = Window_Target.new @target_window.visible = @target_window.active = false Graphics.transition loop do Graphics.update Input.update update break if $scene != self end Graphics.freeze [@help_window, @status_window, @skill_window, @target_window].each {|win| win.dispose} end def update if defined?(SDK) @help_window.update @status_window.update @skill_window.update @target_window.update end super end def update_target sp = @actor.sp super if Input.trigger?(Input::C) && @actor.sp != sp && @skill != nil @actor.sp, @actor.sr = sp, @actor.sr - (sp - @actor.sp) * 10 [@status_window, @skill_window, @target_window].each {|win| win.refresh} end end def update_skill sp = @actor.sp super if Input.trigger?(Input::C) && @actor.sp != sp && @skill != nil @actor.sp, @actor.sr = sp, @actor.sr - (sp - @actor.sp) * 10 [@status_window, @skill_window, @target_window].each {|win| win.refresh} end if Input.trigger?(Input::B) $scene = Scene_Map.new elsif Input.trigger?(Input::R) || Input.trigger?(Input::L) $scene = Scene_SoulRage.new(@actor_index) end end end