#============================================================================== # ¡í“¬Žž•Ï”‘€ì for RGSS3 Ver0.20-ƒ¿ #  ì¬ŽÒ kure #============================================================================== $kure_integrate_script = {} if $kure_integrate_script == nil $kure_integrate_script[:Operate_Val] = 100 p "í“¬Žž•Ï”‘€ì" module KURE module Operate_Val #퓬ŠÖ˜A•Ï”‘€ì---------------------------------------------------------- #퓬Ÿ—˜Žž‚̕ϔ‘€ì(–¢Ý’è‚ÌꇂÍID‚É0‚ðÝ’è) #WIN_VAL = [ID, ’l, ŒvŽZ•ûŽ®] #ŒvŽZ•ûŽ® ¨ 0:‰ÁŽZ@1:æŽZ@2:œŽZ WIN_VAL = [0, 0, 0] #퓬“¦‘–Žž‚̕ϔ‘€ì(–¢Ý’è‚ÌꇂÍID‚É0‚ðÝ’è) #ESCAPE_VAL = [ID, ’l, ŒvŽZ•ûŽ®] #ŒvŽZ•ûŽ® ¨ 0:‰ÁŽZ@1:æŽZ@2:œŽZ ESCAPE_VAL = [0, 0, 0] end end module KURE #-------------------------------------------------------------------------- # ™ •Ï”‘€ì(’ljÁ’è‹`) #-------------------------------------------------------------------------- def self.val_math(data) return if data[0] == 0 case data[2] when 0 ; $game_variables[data[0]] += data[1] when 1 ; $game_variables[data[0]] *= data[1] when 2 ; $game_variables[data[0]] /= data[1] if data[1] != 0 end end end #============================================================================== # ¡ RPG::Enemy(’ljÁ’è‹`) #============================================================================== class RPG::Enemy < RPG::BaseItem #-------------------------------------------------------------------------- # ™ •Ï”‘€ì‚Ì’è‹`(’ljÁ’è‹`)(ID, ’l, ŒvŽZ•ûŽ®) #-------------------------------------------------------------------------- def operate_val_dead note_data = @note ; value = [] while note_data do note_data.match(/<Œ‚”j•Ï”‘€ì\s?(\d+)\s?,\s?([-]?\d+)\s?,\s?(\d+)\s?>/) value.push([$1.to_i, $2.to_i, $3.to_i]) if $1 && $2 && $3 note_data = $' end return value end end #============================================================================== # ¡ RPG::State(’ljÁ’è‹`) #============================================================================== class RPG::State < RPG::BaseItem #-------------------------------------------------------------------------- # ™ •Ï”‘€ì‚Ì’è‹`(’ljÁ’è‹`)(ID, ’l, ŒvŽZ•ûŽ®) #-------------------------------------------------------------------------- def operate_val_damage note_data = @note ; value = [] while note_data do note_data.match(/<ƒ_ƒ[ƒW•Ï”‘€ì\s?(\d+)\s?,\s?(\d+)\s?,\s?([-]?\d+)\s?,\s?(\d+)\s?>/) value.push([$1.to_i, $2.to_i, $3.to_i, $4.to_i]) if $1 && $2 && $3 && $4 note_data = $' end return value end end #============================================================================== # ¡ Game_Battler #============================================================================== class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # œ ƒ_ƒ[ƒW‚̈—(ƒGƒCƒŠƒAƒX) #-------------------------------------------------------------------------- alias k_oprate_val_before_execute_damage execute_damage unless $! def execute_damage(user) k_oprate_val_before_execute_damage(user) state_val_process(@result.hp_damage) end #-------------------------------------------------------------------------- # š •Ï”‘€ì(’ljÁ’è‹`)(HPƒ_ƒ[ƒW) #-------------------------------------------------------------------------- def state_val_process(hp_dmg) states.each{|state| state.operate_val_damage.each{|value| data = [] ; data[0] = value[0] ; data[2] = value[3] case value[1] when 0 ; data[1] = value[2] when 1 ; data[1] = hp_dmg when 2 ; data[1] = [0, hp_dmg].max end KURE.val_math(data)} } end end #============================================================================== # ¡ BattleManager #============================================================================== class << BattleManager #-------------------------------------------------------------------------- # 퓬I—¹ result : Œ‹‰Êi0:Ÿ—˜ 1:“¦‘– 2:”s–kj(ƒGƒCƒŠƒAƒXÄ’è‹`) #-------------------------------------------------------------------------- alias k_oprate_val_before_battle_end battle_end unless $! def battle_end(result) k_oprate_val_before_battle_end(result) enemy_val_process(result) end #-------------------------------------------------------------------------- # š •Ï”‘€ì(’ljÁ’è‹`)(ID, ’l, ŒvŽZ•ûŽ®) #-------------------------------------------------------------------------- def enemy_val_process(result) case result when 0 KURE.val_math(KURE::Operate_Val::WIN_VAL) $game_troop.members.each{|enemy| enemy.enemy.operate_val_dead.each{|data| KURE.val_math(data)}} when 1 KURE.val_math(KURE::Operate_Val::ESCAPE_VAL) end end end #============================================================================== # ¡ Game_Interpreter #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # œ Žw’èƒNƒ‰ƒX‚Ìl”‚ðŽw’è•Ï”‚É‘ã“ü(’ljÁ’è‹`) #-------------------------------------------------------------------------- def count_class(class_id, range, value) case range when 0 ; member = $game_party.all_members when 1 ; member = $game_party.battle_members end result = 0 member.each{|actor| next unless actor.class_id == class_id result += 1} $game_variables[value] = result end end