Advertisement
jbrocky

Untitled

May 26th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.04 KB | None | 0 0
  1.   def analyze(game_state, fail_count)
  2.     return if game_state.npcs.empty?
  3.     return if fail_count > @analyze_retry_count
  4.     return if DRSkill.getxp('Tactics') >= @combat_training_abilities_target
  5.     case bput('analyze', 'roundtime', 'Analyze what', 'Your analysis reveals a massive opening', /You reveal an? .* [weakness|opening]/, /Your analysis reveals an? .* [weakness|opening]/, 'You fail to find any holes', 'There is nothing else', 'Face what', 'You must be closer', 'You must be standing', 'Strangely, you don\'t feel like fighting right now', 'flying too high for you to attack') # unless
  6.     when 'Analyze what'
  7.       fput('face next')
  8.       analyze(game_state, fail_count)
  9.     when 'You must be closer'
  10.       fput('engage')
  11.     when 'Your analysis reveals a massive opening'
  12.       return
  13.     when 'You fail to find any holes'
  14.       analyze(game_state, fail_count + 1)
  15.     when /You reveal an? .* [weakness|opening]/, /Your analysis reveals an? .* [weakness|opening]/
  16.       analyze(game_state, fail_count)
  17.     end
  18.     waitrt?
  19.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement