Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # FFS - Stealkiller
- #==============================================================================
- $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
- end
- #==============================================================================
- # ■ Game_Battler
- #==============================================================================
- class Game_Battler
- attr_accessor :stealkiller_counter
- alias initialize_stealkiller initialize
- def initialize
- initialize_stealkiller
- @stealkiller = 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
- 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 = Flip::COMMON_EVENT_STEALKILLER_COUNTER
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement