Advertisement
FlipelyFlip

FFS - State Immune Popup

Dec 19th, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.51 KB | None | 0 0
  1. class Game_Battler < Game_BattlerBase
  2.   #--------------------------------------------------------------------------
  3.   # * Add State
  4.   #--------------------------------------------------------------------------
  5.   def add_state(state_id)
  6.     if state_addable?(state_id)
  7.       add_new_state(state_id) unless state?(state_id)
  8.       reset_state_counts(state_id)
  9.       @result.added_states.push(state_id).uniq!
  10.     end
  11.     if state_resist?(state_id)
  12.       text = YEA::BATTLE::POPUP_SETTINGS[:immune]
  13.       rules = "IMMUNE"
  14.       create_popup(text,rules)
  15.     end
  16.   end
  17. end
  18.  
  19. class Game_BattlerBase
  20.   #--------------------------------------------------------------------------
  21.   # new method: make_miss_popups
  22.   #--------------------------------------------------------------------------
  23.   def make_miss_popups(user, item)
  24.     return if dead?
  25.     if @result.missed
  26.       text = YEA::BATTLE::POPUP_SETTINGS[:missed]
  27.       rules = "DEFAULT"
  28.       create_popup(text, rules)
  29.     end
  30.     if @result.evaded
  31.       text = YEA::BATTLE::POPUP_SETTINGS[:evaded]
  32.       rules = "DEFAULT"
  33.       create_popup(text, rules)
  34.     end
  35.     if @result.hit? && !@result.success
  36.       text = YEA::BATTLE::POPUP_SETTINGS[:failed]
  37.       rules = "DEFAULT"
  38.       create_popup(text, rules)
  39.     end
  40.     if @result.hit? && item.damage.to_hp?
  41.       if @result.hp_damage == 0 && @result.hp_damage == 0
  42.         text = YEA::BATTLE::POPUP_SETTINGS[:nulled]
  43.         rules = "DEFAULT"
  44.         create_popup(text, rules)
  45.       end
  46.     end
  47.   end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement