Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module XAS_ACTION
- def hit
- p value.class
- @hit
- end
- def hit=(value)
- p value.class
- @hit=value
- end
- #--------------------------------------------------------------------------
- # ● check_event_trigger_attack
- #--------------------------------------------------------------------------
- def check_event_trigger_attack()
- return unless can_impact_target?
- hit_check = false
- range = @action.attack_range
- hit = []
- ally = []
- targets = [$game_player] + $game_player.allies + $game_map.events.values
- if !@action.user.heal
- skill = $data_skills[@action.id]
- if skill.scope >= 7
- @action.user.heal = true
- skip_include = true
- end
- end
- for event in targets
- next if event == self
- next if event.erased
- next if @action.hit_events.include?(event) unless skip_include
- body_size = event.body_size
- event_center_x = event.x
- event_center_y = event.y - body_size
- dx = event_center_x - self.x
- dy = event_center_y - self.y
- dx = (dx >= 0 ? [dx - body_size, 0].max : [dx + body_size, 0].min)
- dy = (dy >= 0 ? [dy - body_size, 0].max : [dy + body_size, 0].min)
- hit_check = true if in_range?(dx,dy,event,range)
- hit.push(event) if hit_check
- hit_check = false
- end
- for event in hit
- if event.action_effect(self, self.action.attack_id)
- hit_check = true
- end
- if event.action_effect_page(self, self.action.attack_id)
- hit_check = true
- end
- @action.hit_events.push(event) unless @action.multi_hit
- end
- if hit_check
- $game_temp.active_token = self
- end
- end
- alias brand_check_event_trigger_attack check_event_trigger_attack
- def check_event_trigger_attack()
- =begin
- return unless can_impact_target?
- hit_check = false
- range = @action.attack_range
- hit = []
- ally = []
- targets = [$game_player] + $game_player.allies + $game_map.events.values
- if !@action.user.heal
- skill = $data_skills[@action.id]
- if skill.scope >= 7
- @action.user.heal = true
- skip_include = true
- end
- end
- for event in targets
- next if event == self
- next if event.erased
- next if @action.hit_events.include?(event) unless skip_include
- body_size = event.body_size
- event_center_x = event.x
- event_center_y = event.y - body_size
- dx = event_center_x - self.x
- dy = event_center_y - self.y
- dx = (dx >= 0 ? [dx - body_size, 0].max : [dx + body_size, 0].min)
- dy = (dy >= 0 ? [dy - body_size, 0].max : [dy + body_size, 0].min)
- hit_check = true if in_range?(dx,dy,event,range)
- hit.push(event) if hit_check
- hit_check = false
- end
- for event in hit
- if event.action_effect(self, self.action.attack_id)
- hit_check = true
- end
- if event.action_effect_page(self, self.action.attack_id)
- hit_check = true
- end
- @action.hit_events.push(event) unless @action.multi_hit
- end
- if hit_check
- $game_temp.active_token = self
- end
- =end
- brand_check_event_trigger_attack
- # end of original code
- hit = 1
- p hit
- if $data_skills[self.action.attack_id].note =~ /<Branded>/
- brand = @action.user.battler.brand
- if brand != 0
- for event in hit
- # save the current invulnerability duration
- tar_invu = event.battler.invunerable_duration
- # let it be zero - so the brand will land its hit too
- event.battler.invunerable_duration = 0
- event.action_effect(self, brand)
- # ...and restore the saved
- event.battler.invunerable_duration = tar_invu
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement