Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # FFS - Stealkiller v1.0
- #==============================================================================
- # <stealkiller counter: x> x = Anzahl für den Stealskill
- # <stealkiller ce: x> x = ID des Common Events
- $imported = {} if $imported == nil
- $imported["Stealkiller"] = true
- module Flip
- COMMON_EVENT_STEALKILLER_COUNTER = 50
- end
- #==============================================================================
- # RPG::Enemy
- #==============================================================================
- class RPG::Enemy
- #--------------------------------------------------------------------------
- # * Friendly EXP
- #--------------------------------------------------------------------------
- def stealkiller_counter
- return @stealkiller_counter if @stealkiller_counter != nil
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when /<(?:STEALKILLER_COUNTER|stealkiller counter):[ ](\d+)>/i
- @stealkiller_counter = $1.to_i
- end
- }
- return @stealkiller_counter
- end
- #--------------------------------------------------------------------------
- # * Friendly EXP
- #--------------------------------------------------------------------------
- def stealkiller_ce
- return @stealkiller_ce if @stealkiller_ce != nil
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when /<(?:STEALKILLER_CE|stealkiller ce):[ ](\d+)>/i
- @stealkiller_ce = $1.to_i
- end
- }
- return @stealkiller_ce
- end
- end
- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler
- attr_accessor :stealkiller_counter
- attr_accessor :stealkiller_ce
- alias initialize_stealkiller initialize
- def initialize
- initialize_stealkiller
- @stealkiller = 0
- @stealkiller_ce = 0
- end
- end
- #==============================================================================
- # ■ Game_Enemy
- #==============================================================================
- class Game_Enemy < Game_Battler
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # index : 敵グループ内インデックス
- # enemy_id : 敵キャラ ID
- #--------------------------------------------------------------------------
- alias initialize_flip_stealkiller initialize
- def initialize(index, enemy_id)
- initialize_flip_stealkiller(index, enemy_id)
- @stealkiller_counter = enemy.stealkiller_counter
- @stealkiller_ce = enemy.stealkiller_ce
- end
- end
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # * process_kgc_steal
- #--------------------------------------------------------------------------
- def process_kgc_steal(target, steal_type)
- skill = @active_battler.action.skill
- target.bem_make_obj_steal_result(@active_battler, skill, steal_type)
- display_steal_effects(target, skill)
- if target.stealkiller_counter > 0
- target.stealkiller_counter -= 1
- if target.stealkiller_counter <= 0
- $game_temp.common_event_id = target.stealkiller_ce
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement