zero1eye

Penalty Escape

Aug 27th, 2013
455
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. =begin
  2. #===============================================================================
  3. Title: Escape_Penalty
  4. Author: Sprawl
  5. Date: August 15, 2013
  6. --------------------------------------------------------------------------------
  7. ** Change log
  8. August 15, 2013
  9. - Initial Release
  10. ------------------------------------------------------------------------------
  11. ** Description
  12.  
  13. This script allows you to take a full image of any of your game's maps
  14. and export. An image of the map is referred to as a "mapshot" (as opposed to
  15. screenshot).
  16.  
  17. ------------------------------------------------------------------------------
  18. ** Usage
  19.  
  20. Cut and Paste in the Materials Section. If you have any other scripts that
  21. affect escape penalties, things may not work.
  22. --------------------------------------------------------------------------------
  23. ** Licensing
  24.  
  25. Feel free to use for free or commercial use, but give credit to "zSprawl".
  26.  
  27. --------------------------------------------------------------------------------
  28. ** Credits
  29.  
  30. Sprawl
  31. -Wrote the Script.
  32. Merdouille44
  33. -Replied to my post on the forums to get me motitivated to fix this.
  34. ================================================================================
  35. =end
  36.  
  37. $imported = {} if $imported.nil?
  38. $imported["Sprawl_Escape"] = true
  39.  
  40. module BattleManager
  41. def self.process_abort
  42. replay_bgm_and_bgs
  43. SceneManager.return
  44. battle_end(1)
  45.  
  46. $game_party.all_members.each do |actor|
  47. @exp_loss = -1 * actor.exp * 0.005;
  48. actor.gain_exp(@exp_loss)
  49. end
  50.  
  51. @xp_loss_str = @exp_loss * -1
  52.  
  53. text = "You lose " + @xp_loss_str.to_i.to_s + " experience points for fleeing."
  54. $game_message.add('\.' + text)
  55. wait_for_message
  56. return true
  57. end
  58. end
RAW Paste Data