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
- #--------------------------------------------------------------------------
- # ○ 戦闘行動の実行 : 盗む
- #--------------------------------------------------------------------------
- def execute_action_steal
- skill = @active_battler.action.skill
- text = @active_battler.name + skill.message1
- @message_window.add_instant_text(text)
- unless skill.message2.empty?
- wait(10)
- @message_window.add_instant_text(skill.message2)
- end
- targets = @active_battler.action.make_targets
- display_animation(targets, skill.animation_id)
- @active_battler.mp -= @active_battler.calc_mp_cost(skill)
- $game_temp.common_event_id = skill.common_event_id
- for target in targets
- target.skill_effect(@active_battler, skill)
- 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
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement