Advertisement
FlipelyFlip

Skill Querry Icon

Feb 15th, 2013
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 79.89 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Yanfly Engine RD - Display Skill Query
  4. # Last Date Updated: 2009.06.23
  5. # Level: Easy, Normal, Hard, Lunatic
  6. #
  7. # Sometimes with all the features I add to skills, there's always the question
  8. # of what stat affects what. There's also questions of how long some skills will
  9. # take to charge and all the other fun stuff. Well, hopefully this script will
  10. # provide a solution to that.
  11. #
  12. # This script adds a new window to your skill menu both in battle and outside of
  13. # battle. When pressing Shift (or whatever button you bind it to), the skill
  14. # query window will appear and list various information about the skill. The
  15. # information provided ranges from base damage to MP costs to status changes,
  16. # and elements. If you have some other Yanfly Engine ReDux scripts, there are
  17. # even more pages that will appear.
  18. #
  19. # For the users who fear giving too much information to their players, users can
  20. # disable parts of the script and prevent certain pages from appear at all. For
  21. # users who have lots of custom skills and are afraid that the skills won't
  22. # reflect properly, there are tags they can add to the skills' noteboxes to
  23. # force reflect information and data properly.
  24. #
  25. #===============================================================================
  26. # Updates:
  27. # ----------------------------------------------------------------------------
  28. # o 2009.06.23 - Fixed menu-help-message bug.
  29. # o 2009.05.28 - Compatibility update with Custom Skill Effects.
  30. # o 2009.05.11 - Added Subclass and Skill Slot pages.
  31. # o 2009.04.30 - Updated for Yanfly Subclass Selection System compatibility.
  32. # o 2009.04.26 - Regexp clean up
  33. #                Bugfix for nil skill query.
  34. # o 2009.04.20 - Efficieny fix.
  35. # o 2009.04.16 - Finished and publicized script.
  36. # o 2009.04.15 - Started script.
  37. #===============================================================================
  38. # How to Use: Normal Mode
  39. #===============================================================================
  40. #
  41. # Modify the module down below to adjust the icons to what you'd prefer the
  42. # skill query window to use. If you're using other Yanfly Engine ReDux scripts
  43. # and they have icons choosen already, those will take priority over these.
  44. #
  45. #===============================================================================
  46. # How to Use: Hard Mode
  47. #===============================================================================
  48. #
  49. # For those like me who use custom damage formulas for the most part, the query
  50. # window might not display the information you'd like it to when it comes to
  51. # that. So when that happens, you can throw these tags into that skill's notebox
  52. # and manually make the query window show what you'd like for it to.
  53. #
  54. # <query basedmg x> Shows x as base damage in query window.
  55. # <query accuracy x> Shows x as accuracy in query window.
  56. #
  57. #  <query hp_f x> Shows x as HP_F in query window.
  58. #  <query mp_f x> Shows x as MP_F in query window.
  59. # <query atk_f x> Shows x as ATK_F in query window.
  60. # <query def_f x> Shows x as DEF_F in query window.
  61. # <query spi_f x> Shows x as SPI_F in query window.
  62. # <query agi_f x> Shows x as AGI_F in query window.
  63. #
  64. #   <query physical> Shows skill as a physical skill in query window.
  65. #   <query mpdamage> Shows skill as dealing MP damage in query window.
  66. #     <query absorb> Shows skill as an absorbing skill in query window.
  67. # <query ignore def> Shows skill as ignoring defense in query window.
  68. #
  69. #  <query hide aggro> Prevents aggro data from showing.
  70. # <query hide grudge> Prevents grudge data from showing.
  71. #
  72. # <query hide elements> Prevents elemental properties from being shown.
  73. # <query add element x> Shows x in the elemental properties page.
  74. # <query sub element x> Prevents x in the elemental properties from being shown.
  75. #
  76. #  <query hide state apply> Prevents added states from being shown.
  77. #  <query hide state erase> Prevents removed states from being shown.
  78. # <query add state apply x> Adds x to the added states shown.
  79. # <query sub state apply x> Removes x from the added states shown.
  80. # <query add state erase x> Adds x to the removed states shown.
  81. # <query sub state erase x> Removes x from the removed states shown.
  82. #
  83. #===============================================================================
  84. #
  85. # Compatibility
  86. # - Works With: KGC_HelpExtension
  87. # - Alias: Scene_Battle, create_info_viewport, terminate, update_skill_selection
  88. # - Alias: Scene_Skill, start, terminate, update, hide_target_window
  89. # - Alias: Scene_Skill, update_skill_selection
  90. #
  91. #===============================================================================
  92.  
  93. $imported = {} if $imported == nil
  94. $imported["DisplaySkillQuery"] = true
  95.  
  96. module YE
  97.   module MENU
  98.     module SKILL
  99.      
  100.       # This is the button pressed to trigger the query window in battle.
  101.       SKILL_QUERY_BATTLE_BUTTON = Input::A
  102.      
  103.       # This allows you to adjust the Help Info Window's properties when
  104.       # participating in battle.
  105.       BATTLE_HELP_SHOW = true           # If true, it'll appear in battle.
  106.       BATTLE_HELP_INFO = "Shift: Details"   # This is what appears in the window.
  107.       BATTLE_HELP_ICON = 1
  108.       BATTLE_HELP_X = 352    # This is where the X position is.
  109.       BATTLE_HELP_Y = 0      # This is where the Y position is.
  110.       BATTLE_HELP_W = 192    # This is what width the window is.
  111.       BATTLE_HELP_O = 200    # This is the window's opacity level.
  112.      
  113.       # This is the button pressed to trigger the query window in skill menu.
  114.       SKILL_QUERY_MENU_BUTTON =  Input::A
  115.      
  116.       # This allows you to adjust the Help Info Window's properties when
  117.       # viewing the Skill Menu.
  118.       MENU_HELP_SHOW = false              # If true, it'll show in skill menu.
  119.       MENU_HELP_INFO = "Press Shift to view skill query." # What will appear.
  120.        
  121.       # This displays the title information at the very top of the data window.
  122.       DATA_LEFT  = ""            # This appears if page can be moved back.
  123.       DATA_PAGE1 = "Information"   # This appears if only one page of info.
  124.       DATA_PAGES = "Seite %d/%d"    # This appears if more than one page of info.
  125.       DATA_RIGHT = ""            # This appears if page can move right.
  126.       DATA_CATEGORY_COLOUR = 16    # This affects category text colour.
  127.      
  128.       # This is the sound played when flipping through the various pages.
  129.       # Set it to nil if you don't want a sound to play.
  130.       PAGE_SOUND = nil #RPG::SE.new("Wind7", 80, 125)
  131.      
  132.       # This is the query window general settings.
  133.       FONT_SIZE  = 16      # This sets the default font size for query data.
  134.       DATA_WIDTH = 24      # This sets text width for query data.
  135.       DATA_ALIGN = 1       # This sets alignment. 0=left. 1=center. 2=right.
  136.      
  137.       # Set this to true if you would rather the query display the page info
  138.       # type rather than Page X/Y. The titles following correspond to the pages'
  139.       # titles should you decide to display them.
  140.       REPLACE_PAGE_MSG = true
  141.       TITLE_UNKNOWN    = "Information"
  142.      
  143.       # This here is the icon data. Note that if you have imported other Yanfly
  144.       # Engine ReDux scripts, those will take priority over these.
  145.       ICON_MP       = 100         # Used for MP (unless CustomSkillEffects).
  146.       ICON_INIT     = 158         # Used for skill/speed initiative.
  147.       ICON_CHARGE   = 133         # Used for charge (for CustomSkillEffects).
  148.       ICON_PREPARE  = 145         # Used for prepare (for CustomSkillEffects).
  149.       ICON_FATIGUE  = 116         # Used for fatigue (for CustomSkillEffects).
  150.       ICON_BASEDMG  = 119         # Used for base damage.
  151.       ICON_BASEHEAL = 128         # Used for base healing.
  152.       ICON_ACCURACY = 135         # Used for accuracy.
  153.       ICON_HP_F     = 200         # Used for HP F (for CustomDmgFormula).
  154.       ICON_MP_F     = 201         # Used for MP F (for CustomDmgFormula).
  155.       ICON_ATK_F    = 2           # Used for Attack F.
  156.       ICON_DEF_F    = 52          # Used for Defense F (for CustomDmgFormula).
  157.       ICON_SPI_F    = 21          # Used for Spirit F.
  158.       ICON_AGI_F    = 48          # Used for Agility F (for CustomDmgFormula).
  159.       ICON_PHYS     = 132         # Used for the physical attack icon.
  160.       ICON_MPDMG    = 130         # Used for MP damage icon.
  161.       ICON_ABSORB   = 215         # Used for absorb damage icon.
  162.       ICON_IGDEF    = 53          # Used for ignore defense icon.
  163.       ICON_AGGRO    = 137         # Used for aggro (for BattlerStatAggro).
  164.       ICON_GRUDGE   = 137         # Used for aggro (for BattlerStatAggro).
  165.            
  166.       # This is the string data for other attributes. All seen on page 1.
  167.       # Page 1 is always available for every skill unless you change SHOW_PAGE.
  168.       TITLE_GENERAL    = "General Info"
  169.       SHOW_PAGE_GEN    = false
  170.       ZERO_INITIATIVE  = "+0" # This is given if there's zero initiative.
  171.       DATA_NIL   = "-"        # Nil Data is generally for numbered terms.
  172.       DATA_TRUE  = "Y"        # True and false data stand for flags attributes.
  173.       DATA_FALSE = "N"
  174.      
  175.       # This is the string data for page 2's Skill Cost and Charge query.
  176.       # Change the terms accordingly if desired.
  177.       # Page 2 is always available for every skill unless you change SHOW_PAGE.
  178.       TITLE_SKILL_COST = "Cost & Charge"
  179.       SHOW_PAGE_COSTS  = false
  180.       MSG_FREE         = "No Cost"
  181.       MSG_MP_COST      = "MP Cost"
  182.       MSG_MP_VALUE     = "%d MP"
  183.       MSG_INITIATIVE   = "Initiative"
  184.       # This is for all the custom extras you get from Custom Skill Effects.
  185.       MSG_MAXMP_COST   = "MaxMP Cost"
  186.       MSG_MAXMP_VALUE  = "%d%% MP"
  187.       MSG_HP_COST      = "HP Cost"
  188.       MSG_MAXHP_COST   = "MaxHP Cost"
  189.       MSG_MAXHP_VALUE  = "%d%% HP"
  190.       MSG_GOLD_COST    = "Gold Cost"
  191.       MSG_MGOLD_COST   = "MaxGold Cost"
  192.       MSG_RAGE_COST    = "Rage Cost"
  193.       MSG_CUSTOM_COST  = "%s Cost"
  194.       MSG_RAGE_BOOST   = "Rage Boost"
  195.       MSG_RAGE_VALUE   = "+%d"
  196.       MSG_CHARGE       = "Cast for"
  197.       MSG_RECHARGE     = "Cooldown"
  198.       MSG_PREPARE      = "Warm Up"
  199.       MSG_FATIGUE      = "Fatigue for "
  200.       MSG_USAGE        = "Battle Uses"
  201.       MSG_USAGE_VALUE  = "%d Uses"
  202.       MSG_USAGE_VALUE1 = "%d Use"
  203.      
  204.       # This is the string data for page 3's Damage information.
  205.       # Change the terms accordingly if desired.
  206.       # This page is only available if base damage is something other than 0
  207.       # unless you change SHOW_PAGE.
  208.       TITLE_DAMAGE     = "Damage Data"
  209.       TITLE_HEALING    = "Healing Data"
  210.       SHOW_PAGE_DMG    = false
  211.       MSG_BASE_DAMAGE  = "Base Damage"
  212.       MSG_BASE_HEALING = "Base Healing"
  213.       MSG_HP_F         = "HP Multiplier"
  214.       MSG_MP_F         = "MP Multiplier"
  215.       MSG_ATK_F        = "ATK Multiplier"
  216.       MSG_DEF_F        = "DEF Multiplier"
  217.       MSG_SPI_F        = "SPI Multiplier"
  218.       MSG_AGI_F        = "AGI Multiplier"
  219.      
  220.       # This is the string data for page 4's aggro/grudge information.
  221.       # Change the terms accordingly if desired. This page requires Battler
  222.       # Stat Aggro and will only show if aggro or grudge is affected.
  223.       TITLE_AGGRO      = "Aggro Data"
  224.       SHOW_PAGE_AGGRO  = false
  225.       MSG_AGGRO_TERM   = "Aggro"
  226.       MSG_GRUDGE_TERM  = "Grudge"
  227.       MSG_AGGRO_SET    = "Sets %s to"
  228.       MSG_AGGRO_SETVAL = "=%d"
  229.       MSG_AGGRO_MUL    = "Multiplies %s"
  230.       MSG_AGGRO_MULVAL = "*%d"
  231.       MSG_AGGRO_DIV    = "Divides %s"
  232.       MSG_AGGRO_DIVVAL = "/%d"
  233.       MSG_AGGRO_ADD    = "Increases %s"
  234.       MSG_AGGRO_ADDVAL = "+%d"
  235.       MSG_AGGRO_SUB    = "Decreases %s"
  236.       MSG_AGGRO_SUBVAL = "-%d"
  237.      
  238.       # This is the string data for the elements data page. Change the terms
  239.       # accordingly if desired. This page will only show if there's an element
  240.       # choosen or unless you force query an element to show. Also, elements
  241.       # not in the SHOWN_ELEMENTS will not appear.
  242.       TITLE_ELEMENTS   = "Elements"
  243.       SHOW_PAGE_ELEM   = false
  244.       SHOWN_ELEMENTS   = [
  245.                            
  246.                        ] # Do not remove this.
  247.       ELEMENT_ICONS    = {
  248.  
  249.                        } # Do not remove this.
  250.       MSG_ELEMENTS     = "Elemental Traits"
  251.      
  252.       # This is the string data for the status changes data page. Change the
  253.       # terms accordingly if desired. This page will only show if there's any
  254.       # status-effect related changes.
  255.       TITLE_STATUS     = "Status Effects"
  256.       SHOW_PAGE_STATUS = false
  257.       MSG_STATUS_ADD   = "Applied Status Effects"
  258.       MSG_STATUS_SUB   = "Removed Status Effects"
  259.      
  260.       # This is the page regulating the various data used for the Yanfly
  261.       # Subclass Selection System. This data will not be shown if the script
  262.       # is not imported.
  263.       TITLE_JP     = "Learning Data"
  264.       SHOW_JP_PAGE = false
  265.       TEXT_JP_COST = "JP Cost"
  266.       TEXT_LVL_REQ = "Required LV"
  267.       TEXT_SKILL_R = "Required Skills"
  268.      
  269.       # This part regulates the data used for Yanfly Equip Skill Slots. This
  270.       # data will not be shown if the script is not imported.
  271.       TITLE_EQUIP_STATS = "Equip Skill Data"
  272.       SHOW_EQUIP_STATS  = false
  273.      
  274.       # This is the string data for the miscellaneous data page.
  275.       # Change the terms accordingly if desired.
  276.       # This page will always show unless you turn off SHOW_PAGE.
  277.       TITLE_MISC       = "Miscellaneous"
  278.       SHOW_PAGE_MISC   = false
  279.       MSG_ACCURACY     = "Accuracy"
  280.       MSG_ACCURACY_VAL = "%d%%"
  281.       MSG_MISC_PHYS    = "Physical Skill"
  282.       MSG_MISC_MPDMG   = "Deals MP Damage"
  283.       MSG_MISC_ABSORB  = "Absorbs Damage"
  284.       MSG_MISC_IGDEF   = "Ignores Defense"
  285.       MSG_MISC_YES     = "Yes"
  286.       MSG_MISC_NO      = "No"
  287.      
  288.       # This will adjust whether or not you'd like for the custom notes to show.
  289.       # To actually modify what shows up under custom notes, go to the Lunatic
  290.       # Mode down below. That will allow you to change and customize whatever
  291.       # you'd like to write for custom notes.
  292.       TITLE_NOTES      = "nil"
  293.       SHOW_PAGE_NOTES  = true
  294.       NOTE_PAGE_WIDTH  = 240
  295.       NOTE_PAGE_TEXT_SIZE   = 16
  296.       NOTE_PAGE_TEXT_COLOUR = 0
  297.      
  298.     end #module SKILL
  299.   end #module MENU
  300. end #module YE
  301.  
  302. #===============================================================================
  303. # How to Use: Lunatic Mode
  304. #===============================================================================
  305. #
  306. # This part allows you to input your own custom notes and whatnot. Custom notes
  307. # page will only appear for skills that are listed in the note hash beneath the
  308. # Lunatic Mode section.
  309. #
  310. # The process is pretty simple. Just follow the template below.
  311. #
  312. #    SKILL_NOTES ={
  313. #      skill.id => "This would be the first line| and this would be the next!",
  314. #    } # Do not remove this.
  315. #
  316. # Enter the skill's ID number where "skill.id" is. Following the "=>" input
  317. # the custom notes you'd like for that skill to display. If you wish to add
  318. # line breaks to notes, add a | where you would like the break to appear. Now
  319. # while they do appear in the notebox, they are confined by the note page's
  320. # width and will shrink if the lines end up being too long. You can adjust the
  321. # note page's width in the part before the Lunatic Mode instructions.
  322. #
  323. #===============================================================================
  324.  
  325. module YE
  326.   module HASH
  327.     SKILL_NOTES ={
  328.      #-------------------
  329.      # Nello
  330.      #-------------------
  331.      # Jump
  332.      500 =>
  333.      "Dauer: 1 Runde|Erhöhter Schaden: +25%|Teffer: 1|Trefferquote: 100%|Geschwindigkeit: -1 SPD|Werte: +25% AGI, -25% DEF",
  334.      #5 Reihen
  335.      # Fauna Obscura 2
  336.      501 =>
  337.      "Erhöhter Schaden: +25%|Teffer: 1|Geschwindigkeit: -1 SPD",
  338.    
  339.      
  340.     } # Do not remove this.
  341.        
  342.   end #module HASH
  343. end #module YE
  344.  
  345. #===============================================================================
  346. # Editting anything past this point may potentially result in causing computer
  347. # damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
  348. # Therefore, edit at your own risk.
  349. #===============================================================================
  350.  
  351. module YE
  352.   module REGEXP
  353.     module BASEITEM
  354.      
  355.       # Put this in if you want to force query to show these numbers.
  356.       QUERY_BASEDMG    = /<(?:QUERY_BASEDMG|query basedmg|query base dmg)[ ]*(\d+)>/i
  357.       QUERY_NBASEDMG   = /<(?:QUERY_BASEDMG|query basedmg|query base dmg)[ ]*[-](\d+)>/i
  358.       QUERY_ACCURACY   = /<(?:QUERY_ACCURACY|query accuracy)[ ]*(\d+)>/i
  359.       QUERY_RAGE_BOOST = /<(?:QUERY_RAGE_BOOST|query rage boost)[ ]*(\d+)>/i
  360.       QUERY_HP_F       = /<(?:QUERY_HP_F|query hp_f)[ ]*(\d+)>/i
  361.       QUERY_MP_F       = /<(?:QUERY_MP_F|query mp_f)[ ]*(\d+)>/i
  362.       QUERY_ATK_F      = /<(?:QUERY_ATK_F|query atk_f)[ ]*(\d+)>/i
  363.       QUERY_DEF_F      = /<(?:QUERY_DEF_F|query def_f)[ ]*(\d+)>/i
  364.       QUERY_SPI_F      = /<(?:QUERY_SPI_F|query spi_f)[ ]*(\d+)>/i
  365.       QUERY_AGI_F      = /<(?:QUERY_AGI_F|query agi_f)[ ]*(\d+)>/i
  366.      
  367.       # Put this in if you want to force query to show it as a physical.
  368.       QUERY_PHYSICAL = /<(?:QUERY_PHYSICAL|query physical)>/i
  369.       QUERY_MPDAMAGE = /<(?:QUERY_MPDAMAGE|query mpdamage|query mp damage)>/i
  370.       QUERY_ABSORB   = /<(?:QUERY_ABSORB|query absorb)>/i
  371.       QUERY_IGDEF    = /<(?:QUERY_IGNOREDEF|query ignoredef|query ignore def)>/i
  372.      
  373.       # Put this in if you want to hide grudge or aggro.
  374.       QUERY_HIDE_AGGRO  = /<(?:QUERY_HIDE_AGGRO|query hide aggro)>/i
  375.       QUERY_HIDE_GRUDGE = /<(?:QUERY_HIDE_GRUDGE|query hide grudge)>/i
  376.      
  377.       # These affect element traits.
  378.       QUERY_HIDE_ELEMENTS = /<(?:QUERY_HIDE_ELEMENTS|query hide elements)>/i
  379.       QUERY_ADD_ELEMENT   = /<(?:QUERY_ADD_ELEMENT|query add element)[ ]*(\d+)>/i
  380.       QUERY_SUB_ELEMENT   = /<(?:QUERY_SUB_ELEMENT|query sub element)[ ]*(\d+)>/i
  381.      
  382.       # These affect status effects.
  383.       QUERY_HIDE_STATE_APPLY = /<(?:QUERY_HIDE_STATE_APPLY|query hide state apply)>/i
  384.       QUERY_HIDE_STATE_ERASE = /<(?:QUERY_HIDE_STATE_ERASE|query hide state erase)>/i
  385.       QUERY_ADD_STATE_APPLY  = /<(?:QUERY_ADD_STATE_APPLY|query add state apply)[ ]*(\d+)>/i
  386.       QUERY_SUB_STATE_APPLY  = /<(?:QUERY_SUB_STATE_APPLY|query sub state apply)[ ]*(\d+)>/i
  387.       QUERY_ADD_STATE_ERASE  = /<(?:QUERY_ADD_STATE_ERASE|query add state erase)[ ]*(\d+)>/i
  388.       QUERY_SUB_STATE_ERASE  = /<(?:QUERY_SUB_STATE_ERASE|query sub state erase)[ ]*(\d+)>/i
  389.      
  390.     end
  391.   end
  392. end
  393.  
  394. #===============================================================================
  395. # RPG::BaseItem
  396. #===============================================================================
  397.  
  398. class RPG::BaseItem
  399.  
  400.   #--------------------------------------------------------------------------
  401.   # yanfly cache dsq
  402.   #--------------------------------------------------------------------------
  403.   def yanfly_cache_dsq
  404.     @query_basedmg = 0; @query_accuracy = 0; @query_rage_boost = 0
  405.     @query_hp_f = 0; @query_mp_f = 0; @query_atk_f = 0; @query_def_f = 0
  406.     @query_spi_f = 0; @query_agi_f = 0; @query_physical = false
  407.     @query_mpdamage = false; @query_absorb = false; @query_ignore_def = false
  408.     @query_hide_aggro = false; @query_hide_grudge = false;
  409.     @query_hide_elements = false; @query_add_elements = []
  410.     @query_sub_elements = []; @query_hide_state_apply = false
  411.     @query_hide_state_erase = false; @query_add_state_apply = []
  412.     @query_sub_state_apply = []; @query_add_state_erase = []
  413.     @query_sub_state_erase = []
  414.    
  415.     self.note.split(/[\r\n]+/).each { |line|
  416.       case line
  417.       when YE::REGEXP::BASEITEM::QUERY_BASEDMG
  418.         @query_basedmg = $1.to_i
  419.       when YE::REGEXP::BASEITEM::QUERY_NBASEDMG
  420.         @query_basedmg = $1.to_i * -1
  421.       when YE::REGEXP::BASEITEM::QUERY_ACCURACY
  422.         @query_accuracy = $1.to_i
  423.       when YE::REGEXP::BASEITEM::QUERY_RAGE_BOOST
  424.         @query_rage_boost = $1.to_i
  425.       when YE::REGEXP::BASEITEM::QUERY_HP_F
  426.         @query_hp_f = $1.to_i
  427.       when YE::REGEXP::BASEITEM::QUERY_MP_F
  428.         @query_mp_f = $1.to_i
  429.       when YE::REGEXP::BASEITEM::QUERY_ATK_F
  430.         @query_atk_f = $1.to_i
  431.       when YE::REGEXP::BASEITEM::QUERY_DEF_F
  432.         @query_def_f = $1.to_i
  433.       when YE::REGEXP::BASEITEM::QUERY_SPI_F
  434.         @query_spi_f = $1.to_i
  435.       when YE::REGEXP::BASEITEM::QUERY_AGI_F
  436.         @query_agi_f = $1.to_i
  437.       when YE::REGEXP::BASEITEM::QUERY_PHYSICAL
  438.         @query_physical = true
  439.       when YE::REGEXP::BASEITEM::QUERY_MPDAMAGE
  440.         @query_mpdamage = true
  441.       when YE::REGEXP::BASEITEM::QUERY_ABSORB
  442.         @query_absorb = true
  443.       when YE::REGEXP::BASEITEM::QUERY_IGDEF
  444.         @query_ignore_def = true
  445.       when YE::REGEXP::BASEITEM::QUERY_HIDE_AGGRO
  446.         @query_hide_aggro = true
  447.       when YE::REGEXP::BASEITEM::QUERY_HIDE_GRUDGE
  448.         @query_hide_grudge = true
  449.       when YE::REGEXP::BASEITEM::QUERY_HIDE_ELEMENTS
  450.         @query_hide_elements = true
  451.       when YE::REGEXP::BASEITEM::QUERY_ADD_ELEMENT
  452.         element = $1.to_i
  453.         @query_add_elements.push(element)
  454.       when YE::REGEXP::BASEITEM::QUERY_SUB_ELEMENT
  455.         element = $1.to_i
  456.         @query_sub_elements.push(element)
  457.       when YE::REGEXP::BASEITEM::QUERY_HIDE_STATE_APPLY
  458.         @query_hide_state_apply = true
  459.       when YE::REGEXP::BASEITEM::QUERY_HIDE_STATE_ERASE
  460.         @query_hide_state_erase = true
  461.       when YE::REGEXP::BASEITEM::QUERY_ADD_STATE_APPLY
  462.         state = $1.to_i
  463.         @query_add_state_apply.push(state)
  464.       when YE::REGEXP::BASEITEM::QUERY_SUB_STATE_APPLY
  465.         state = $1.to_i
  466.         @query_sub_state_apply.push(state)
  467.       when YE::REGEXP::BASEITEM::QUERY_ADD_STATE_ERASE
  468.         state = $1.to_i
  469.         @query_add_state_erase.push(state)
  470.       when YE::REGEXP::BASEITEM::QUERY_SUB_STATE_ERASE
  471.         state = $1.to_i
  472.         @query_sub_state_erase.push(state)
  473.       end
  474.     }
  475.   end
  476.  
  477.   #--------------------------------------------------------------------------
  478.   # query base damage
  479.   #--------------------------------------------------------------------------
  480.   def query_basedmg
  481.     yanfly_cache_dsq if @query_basedmg == nil
  482.     return @query_basedmg
  483.   end
  484.  
  485.   #--------------------------------------------------------------------------
  486.   # query accuracy
  487.   #--------------------------------------------------------------------------
  488.   def query_accuracy
  489.     yanfly_cache_dsq if @query_accuracy == nil
  490.     return @query_accuracy
  491.   end
  492.  
  493.   #--------------------------------------------------------------------------
  494.   # query rage boost
  495.   #--------------------------------------------------------------------------
  496.   def query_rage_boost
  497.     yanfly_cache_dsq if @query_rage_boost == nil
  498.     return @query_rage_boost
  499.   end
  500.  
  501.   #--------------------------------------------------------------------------
  502.   # query hp_f
  503.   #--------------------------------------------------------------------------
  504.   def query_hp_f
  505.     yanfly_cache_dsq if @query_hp_f == nil
  506.     return @query_hp_f
  507.   end
  508.  
  509.   #--------------------------------------------------------------------------
  510.   # query mp_f
  511.   #--------------------------------------------------------------------------
  512.   def query_mp_f
  513.     yanfly_cache_dsq if @query_mp_f == nil
  514.     return @query_mp_f
  515.   end
  516.  
  517.   #--------------------------------------------------------------------------
  518.   # query atk_f
  519.   #--------------------------------------------------------------------------
  520.   def query_atk_f
  521.     yanfly_cache_dsq if @query_atk_f == nil
  522.     return @query_atk_f
  523.   end
  524.  
  525.   #--------------------------------------------------------------------------
  526.   # query def_f
  527.   #--------------------------------------------------------------------------
  528.   def query_def_f
  529.     yanfly_cache_dsq if @query_def_f == nil
  530.     return @query_def_f
  531.   end
  532.  
  533.   #--------------------------------------------------------------------------
  534.   # query spi_f
  535.   #--------------------------------------------------------------------------
  536.   def query_spi_f
  537.     yanfly_cache_dsq if @query_spi_f == nil
  538.     return @query_spi_f
  539.   end
  540.  
  541.   #--------------------------------------------------------------------------
  542.   # query agi_f
  543.   #--------------------------------------------------------------------------
  544.   def query_agi_f
  545.     yanfly_cache_dsq if @query_agi_f == nil
  546.     return @query_agi_f
  547.   end
  548.  
  549.   #--------------------------------------------------------------------------
  550.   # query_physical
  551.   #--------------------------------------------------------------------------
  552.   def query_physical
  553.     yanfly_cache_dsq if @query_physical == nil
  554.     return @query_physical
  555.   end
  556.  
  557.   #--------------------------------------------------------------------------
  558.   # query_mpdamage
  559.   #--------------------------------------------------------------------------
  560.   def query_mpdamage
  561.     yanfly_cache_dsq if @query_mpdamage == nil
  562.     return @query_mpdamage
  563.   end
  564.  
  565.   #--------------------------------------------------------------------------
  566.   # query_absorb
  567.   #--------------------------------------------------------------------------
  568.   def query_absorb
  569.     yanfly_cache_dsq if @query_absorb == nil
  570.     return @query_absorb
  571.   end
  572.  
  573.   #--------------------------------------------------------------------------
  574.   # query_ignore_def
  575.   #--------------------------------------------------------------------------
  576.   def query_ignore_def
  577.     yanfly_cache_dsq if @query_ignore_def == nil
  578.     return @query_ignore_def
  579.   end
  580.  
  581.   #--------------------------------------------------------------------------
  582.   # query_hide_aggro
  583.   #--------------------------------------------------------------------------
  584.   def query_hide_aggro
  585.     yanfly_cache_dsq if @query_hide_aggro == nil
  586.     return @query_hide_aggro
  587.   end
  588.  
  589.   #--------------------------------------------------------------------------
  590.   # query_hide_grudge
  591.   #--------------------------------------------------------------------------
  592.   def query_hide_grudge
  593.     yanfly_cache_dsq if @query_hide_grudge == nil
  594.     return @query_hide_grudge
  595.   end
  596.  
  597.   #--------------------------------------------------------------------------
  598.   # query_hide_elements
  599.   #--------------------------------------------------------------------------
  600.   def query_hide_elements
  601.     yanfly_cache_dsq if @query_hide_elements == nil
  602.     return @query_hide_elements
  603.   end
  604.  
  605.   #--------------------------------------------------------------------------
  606.   # query add elements
  607.   #--------------------------------------------------------------------------
  608.   def query_add_elements
  609.     yanfly_cache_dsq if @query_add_elements == nil
  610.     return @query_add_elements
  611.   end
  612.  
  613.   #--------------------------------------------------------------------------
  614.   # query sub elements
  615.   #--------------------------------------------------------------------------
  616.   def query_sub_elements
  617.     yanfly_cache_dsq if @query_sub_elements == nil
  618.     return @query_sub_elements
  619.   end
  620.  
  621.   #--------------------------------------------------------------------------
  622.   # query_hide_state_apply
  623.   #--------------------------------------------------------------------------
  624.   def query_hide_state_apply
  625.     yanfly_cache_dsq if @query_hide_state_apply == nil
  626.     return @query_hide_state_apply
  627.   end
  628.  
  629.   #--------------------------------------------------------------------------
  630.   # query_hide_state_erase
  631.   #--------------------------------------------------------------------------
  632.   def query_hide_state_erase
  633.     yanfly_cache_dsq if @query_hide_state_erase == nil
  634.     return @query_hide_state_erase
  635.   end
  636.  
  637.   #--------------------------------------------------------------------------
  638.   # query add state apply
  639.   #--------------------------------------------------------------------------
  640.   def query_add_state_apply
  641.     yanfly_cache_dsq if @query_add_state_apply == nil
  642.     return @query_add_state_apply
  643.   end
  644.  
  645.   #--------------------------------------------------------------------------
  646.   # query sub state apply
  647.   #--------------------------------------------------------------------------
  648.   def query_sub_state_apply
  649.     yanfly_cache_dsq if @query_sub_state_apply == nil
  650.     return @query_sub_state_apply
  651.   end
  652.  
  653.   #--------------------------------------------------------------------------
  654.   # query add state erase
  655.   #--------------------------------------------------------------------------
  656.   def query_add_state_erase
  657.     yanfly_cache_dsq if @query_add_state_erase == nil
  658.     return @query_add_state_erase
  659.   end
  660.  
  661.   #--------------------------------------------------------------------------
  662.   # query sub state erase
  663.   #--------------------------------------------------------------------------
  664.   def query_sub_state_erase
  665.     yanfly_cache_dsq if @query_sub_state_erase == nil
  666.     return @query_sub_state_erase
  667.   end
  668.  
  669. end
  670.  
  671. #===============================================================================
  672. # Scene_Battle
  673. #===============================================================================
  674.  
  675. class Scene_Battle < Scene_Base
  676.  
  677.   #--------------------------------------------------------------------------
  678.   # alias start
  679.   #--------------------------------------------------------------------------
  680.   alias create_info_viewport_dsq create_info_viewport unless $@
  681.   def create_info_viewport
  682.     create_info_viewport_dsq
  683.     if $imported["HelpExtension"]
  684.       sdy = 32
  685.       sdy += 24 * (KGC::HelpExtension::ROW_MAX)
  686.     else
  687.       sdy = 56
  688.     end
  689.     sdx = 0
  690.     sdw = 272
  691.     sdh = 416 - sdy - @status_window.height
  692.     @skill_data_window = Window_Skill_Data.new(0, sdy, 272, sdh)
  693.     @skill_data_window.visible = false
  694.     @skill_data_window.active = false
  695.     hix = YE::MENU::SKILL::BATTLE_HELP_X
  696.     hiy = YE::MENU::SKILL::BATTLE_HELP_Y
  697.     hiw = YE::MENU::SKILL::BATTLE_HELP_W
  698.     text = YE::MENU::SKILL::BATTLE_HELP_INFO
  699.     icon = YE::MENU::SKILL::BATTLE_HELP_ICON
  700.     @help_info_window = Window_Base.new(hix, hiy, hiw, 56)
  701.     @help_info_window.back_opacity = YE::MENU::SKILL::BATTLE_HELP_O
  702.     @help_info_window.draw_icon(icon, 0, 0)
  703.     @help_info_window.contents.draw_text(16, 0, hiw - 40, 24, text, 1) #edit
  704.     @help_info_window.visible = false
  705.   end
  706.  
  707.   #--------------------------------------------------------------------------
  708.   # alias terminate
  709.   #--------------------------------------------------------------------------
  710.   alias terminate_dsq terminate unless $@
  711.   def terminate
  712.     @help_info_window.dispose if @help_info_window != nil
  713.     @skill_data_window.dispose if @skill_data_window != nil
  714.     terminate_dsq
  715.   end
  716.  
  717.   #--------------------------------------------------------------------------
  718.   # Update Skill Query
  719.   #--------------------------------------------------------------------------
  720.   def update_skill_query
  721.     @skill_data_window.update
  722.     if Input.trigger?(Input::B) #end1
  723.       Sound.play_cancel
  724.       @skill_data_window.disappear
  725.       if $imported["CustomSkillEffects"] and @mix_item_window != nil
  726.         @mix_item_window.active = true
  727.       elsif $imported["CustomSkillEffects"] and @chain_window != nil
  728.         @chain_window.active = true
  729.       elsif $imported["CustomSkillEffects"] and @subskill_window != nil
  730.         @subskill_window.active = true
  731.       else
  732.         @skill_window.active = true
  733.       end
  734.     elsif Input.trigger?(Input::LEFT) or Input.trigger?(Input::UP)
  735.       @skill_data_window.previous_page
  736.     elsif Input.trigger?(Input::RIGHT) or Input.trigger?(Input::DOWN)
  737.       @skill_data_window.next_page
  738.     elsif Input.trigger?(Input::L)
  739.       @skill_data_window.top_page
  740.     elsif Input.trigger?(Input::R)
  741.       @skill_data_window.bottom_page
  742.     end
  743.   end
  744.  
  745.   #--------------------------------------------------------------------------
  746.   # Update Skill Selection
  747.   #--------------------------------------------------------------------------
  748.   alias update_skill_selection_dsq update_skill_selection unless $@
  749.   def update_skill_selection
  750.     if YE::MENU::SKILL::BATTLE_HELP_SHOW
  751.       if @skill_data_window.active
  752.         @help_info_window.visible = false
  753.       elsif @skill_window.active
  754.         @help_info_window.visible = true
  755.       else
  756.         @help_info_window.visible = false
  757.       end
  758.     else
  759.       @help_info_window.visible = false
  760.     end
  761.     #------------------------------------------
  762.     # If the Skill Data Window is active
  763.     #------------------------------------------
  764.     if @skill_data_window != nil and @skill_data_window.active
  765.       update_skill_query
  766.     #------------------------------------------
  767.     # If the Skill Window is Active
  768.     #------------------------------------------
  769.     else
  770.       if Input.trigger?(Input::B)
  771.         @help_info_window.visible = false
  772.       elsif Input.trigger?(Input::C)
  773.         @skill = @skill_window.skill
  774.         @help_info_window.visible = false
  775.       elsif Input.trigger?(YE::MENU::SKILL::SKILL_QUERY_BATTLE_BUTTON)
  776.         skill = @skill_window.skill
  777.         if allow_skill_query?
  778.           Sound.play_decision
  779.           @skill_data_window.appear(skill, @skill_window, @active_battler)
  780.           @skill_window.active = false
  781.         elsif @skill_window.visible
  782.           Sound.play_buzzer
  783.         end
  784.       end
  785.       update_skill_selection_dsq
  786.       #---------
  787.     end
  788.   end #end start skill selection
  789.  
  790.   #--------------------------------------------------------------------------
  791.   # allow_skill_query
  792.   #--------------------------------------------------------------------------
  793.   def allow_skill_query?
  794.     skill = @skill_window.skill
  795.     return false if skill == nil
  796.     return false if $imported["CustomSkillEffects"] and @mix_item_window != nil
  797.     return true
  798.   end
  799.  
  800. end # Scene_Battle
  801.  
  802.  
  803. #===============================================================================
  804. # Window_Skill_Data
  805. #===============================================================================
  806.  
  807. class Window_Skill_Data < Window_Base
  808.  
  809.   #--------------------------------------------------------------------------
  810.   # initialize
  811.   #--------------------------------------------------------------------------
  812.   def initialize(x, y, width, height)
  813.     super(x, y, width, 170) #PENTA
  814.     self.back_opacity = 200
  815.     @page = 1
  816.     @skill_window = nil
  817.     @actor = nil
  818.     self.z = 200
  819.     self.visible = false
  820.   end
  821.  
  822.   #--------------------------------------------------------------------------
  823.   # appear
  824.   #--------------------------------------------------------------------------
  825.   def appear(skill, window, actor, condition = 0)
  826.     @skill = skill
  827.     @skill_window = window
  828.     @actor = actor
  829.     if $imported["CustomSkillEffects"]
  830.       if @skill_window.index % YE::BATTLE::WINCOLUMN == 0
  831.         self.x = 272
  832.       else
  833.         self.x = 0
  834.       end
  835.     else
  836.       if @skill_window.index % 2 == 0
  837.         self.x = 272
  838.       else
  839.         self.x = 0
  840.       end
  841.     end
  842.     if condition == 1
  843.       self.x = 0
  844.     elsif condition == 2
  845.       self.x = 272
  846.     end
  847.     @page = 1
  848.     @total_pages = create_total_pages
  849.     setup(@page)
  850.     self.openness = 128
  851.     @opening = true
  852.     self.active = true
  853.     self.visible = true
  854.    
  855.   end
  856.  
  857.   def disappear
  858.     self.active = false
  859.     self.visible = false
  860.   end
  861.  
  862.   #--------------------------------------------------------------------------
  863.   # setup
  864.   #--------------------------------------------------------------------------
  865.   def setup(page)
  866.     self.contents.clear
  867.     self.contents.font.color.alpha = 255
  868.     self.contents.font.size = Font.default_size
  869.     self.contents.font.color = normal_color
  870.     @category_colour = YE::MENU::SKILL::DATA_CATEGORY_COLOUR
  871.     #--------------------
  872.     pagecase = @contents[page - 1]
  873.     if @page == 1 and !YE::MENU::SKILL::REPLACE_PAGE_MSG
  874.       text1 = ""
  875.     else
  876.       text1 = YE::MENU::SKILL::DATA_LEFT
  877.     end
  878.     if YE::MENU::SKILL::REPLACE_PAGE_MSG #--------------------------------------
  879.      
  880.       text2 = case_page_name(pagecase)
  881.      
  882.     else #----------------------------------------------------------------------
  883.       text2 = sprintf(YE::MENU::SKILL::DATA_PAGES, @page, @total_pages)
  884.     end
  885.     if @page == @total_pages and !YE::MENU::SKILL::REPLACE_PAGE_MSG
  886.       text3 = ""
  887.     else
  888.       text3 = YE::MENU::SKILL::DATA_RIGHT
  889.     end
  890.     #--------------------
  891.     self.contents.draw_text(2, 0, 232, WLH, text1, 0)
  892.     self.contents.draw_text(2, 0, 232, WLH, text2, 1)
  893.     self.contents.draw_text(2, 0, 232, WLH, text3, 2)
  894.     #--------------------
  895.     if @skill != nil
  896.       case_page_run(pagecase)
  897.     end
  898.   end
  899.  
  900.   #--------------------------------------------------------------------------
  901.   # page switching
  902.   #--------------------------------------------------------------------------
  903.   def next_page
  904.     if @page != @total_pages
  905.       @page += 1
  906.     else
  907.       @page = 1
  908.     end
  909.     turn_sound
  910.     setup(@page)
  911.   end
  912.  
  913.   def previous_page
  914.     if @page != 1
  915.       @page -= 1
  916.     else
  917.       @page = @total_pages
  918.     end
  919.     turn_sound
  920.     setup(@page)
  921.   end
  922.  
  923.   def top_page
  924.     @page = 1
  925.     turn_sound
  926.     setup(@page)
  927.   end
  928.  
  929.   def bottom_page
  930.     @page = @total_pages
  931.     turn_sound
  932.     setup(@page)
  933.   end
  934.  
  935.   #--------------------------------------------------------------------------
  936.   # turn sound
  937.   #--------------------------------------------------------------------------
  938.   def turn_sound
  939.     unless YE::MENU::SKILL::PAGE_SOUND == nil
  940.       sound = YE::MENU::SKILL::PAGE_SOUND
  941.       sound.play
  942.     end
  943.   end
  944.  
  945.   #--------------------------------------------------------------------------
  946.   # calculate cost
  947.   #--------------------------------------------------------------------------
  948.   def calc_cost
  949.     if @skill.cost_custom > 0
  950.       skillcost = @actor.cost_custom(@skill, 3)
  951.     elsif @skill.cur_mp_cost > 0
  952.       skillcost = @skill.cur_mp_cost
  953.     elsif @skill.max_mp_cost > 0
  954.       skillcost = @skill.max_mp_cost
  955.       @percentile = true
  956.     elsif @skill.cur_hp_cost > 0
  957.       skillcost = @skill.cur_hp_cost
  958.     elsif @skill.max_hp_cost > 0
  959.       skillcost = @skill.max_hp_cost
  960.       @percentile = true
  961.     elsif @skill.gold_cost > 0
  962.       skillcost = @skill.gold_cost
  963.     elsif @skill.maxgold_cost > 0
  964.       skillcost = @skill.maxgold_cost
  965.       @percentile = true
  966.     elsif @skill.rage_cost > 0
  967.       skillcost = @skill.rage_cost
  968.     else
  969.       skillcost = @skill.mp_cost
  970.     end
  971.     return skillcost
  972.   end
  973.  
  974.   #--------------------------------------------------------------------------
  975.   # draw_category
  976.   #--------------------------------------------------------------------------
  977.   def draw_category(y, text, nt)
  978.     self.contents.font.color = text_color(@category_colour)
  979.     self.contents.draw_text(24, y, 216, WLH, text, 0)
  980.     self.contents.font.color = normal_color
  981.     self.contents.draw_text(24, y, 216, WLH, nt, 2)
  982.   end
  983.  
  984.   #--------------------------------------------------------------------------
  985.   # make first page
  986.   #--------------------------------------------------------------------------
  987.   def make_first_page
  988.     y = WLH
  989.     # 1st Row --------------------------------------
  990.     self.contents.font.size = Font.default_size
  991.     draw_item_name(@skill, 0, WLH*1)
  992.     @percentile = false
  993.     if $imported["CustomSkillEffects"]
  994.       costicon = @actor.create_cost_icon(@skill)
  995.       skillcost = calc_cost
  996.       unless @skill.cost_custom > 0
  997.         costicon = 0 if skillcost == 0
  998.       end
  999.     else
  1000.       costicon = YE::MENU::SKILL::ICON_MP
  1001.       skillcost = @actor.calc_mp_cost(@skill)
  1002.       costicon = 0 if skillcost == 0
  1003.     end
  1004.     draw_icon(costicon, 216, y, true)
  1005.     skillcost = sprintf("%d%%", skillcost) if @percentile
  1006.     skillcost = "" if skillcost == 0
  1007.     self.contents.font.color.alpha = 255
  1008.     self.contents.draw_text(2, y, 214, WLH, skillcost, 2)
  1009.     self.contents.font.size = YE::MENU::SKILL::FONT_SIZE
  1010.     # 2nd Row --------------------------------------
  1011.     tw = YE::MENU::SKILL::DATA_WIDTH
  1012.     ta = YE::MENU::SKILL::DATA_ALIGN
  1013.     y += WLH
  1014.     if $scene.is_a?(Scene_Battle) and $imported["HelpExtension"]
  1015.       y += WLH if KGC::HelpExtension::ROW_MAX < 3
  1016.     else
  1017.       y += WLH
  1018.     end
  1019.     if @skill.speed > 0
  1020.       draw_icon(YE::MENU::SKILL::ICON_INIT, 0, y, true)
  1021.       text = sprintf("+%d",@skill.speed)
  1022.       self.contents.font.color.alpha = 255
  1023.     elsif @skill.speed < 0
  1024.       draw_icon(YE::MENU::SKILL::ICON_INIT, 0, y, true)
  1025.       text = @skill.speed
  1026.       self.contents.font.color.alpha = 255
  1027.     else
  1028.       draw_icon(YE::MENU::SKILL::ICON_INIT, 0, y, false)
  1029.       text = YE::MENU::SKILL::ZERO_INITIATIVE
  1030.       self.contents.font.color.alpha = 128
  1031.     end
  1032.     self.contents.draw_text(24, y, tw, WLH, text, ta)
  1033.     if $imported["CustomSkillEffects"]
  1034.       #---Cast Time
  1035.       if @skill.cast_time > 0
  1036.         draw_icon(YE::MENU::SKILL::ICON_CHARGE, 60, y, true)
  1037.         self.contents.font.color.alpha = 255
  1038.         self.contents.draw_text(84, y, tw, WLH, @skill.cast_time, ta)
  1039.       else
  1040.         draw_icon(YE::MENU::SKILL::ICON_CHARGE, 60, y, false)
  1041.         self.contents.font.color.alpha = 128
  1042.         self.contents.draw_text(84, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1043.       end
  1044.       #---Recharge
  1045.       if @skill.recharge > 0
  1046.         draw_icon(YE::BATTLE::RECHARGE_ICON, 120, y, true)
  1047.         self.contents.font.color.alpha = 255
  1048.         self.contents.draw_text(144, y, tw, WLH, @skill.recharge, ta)
  1049.       else
  1050.         draw_icon(YE::BATTLE::RECHARGE_ICON, 120, y, false)
  1051.         self.contents.font.color.alpha = 128
  1052.         self.contents.draw_text(144, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1053.       end
  1054.       #---Use Total
  1055.       if @skill.usage > 0
  1056.         draw_icon(YE::BATTLE::USAGE_ICON, 180, y, true)
  1057.         self.contents.font.color.alpha = 255
  1058.         self.contents.draw_text(204, y, tw, WLH, @skill.usage, ta)
  1059.       else
  1060.         draw_icon(YE::BATTLE::USAGE_ICON, 180, y, false)
  1061.         self.contents.font.color.alpha = 128
  1062.         self.contents.draw_text(204, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1063.       end
  1064.     end
  1065.     # 3rd Row --------------------------------------
  1066.     y += WLH
  1067.     #---Base Damage
  1068.     if @skill.base_damage != 0 or @skill.query_basedmg != 0
  1069.       textno = @skill.base_damage
  1070.       textno = @skill.query_basedmg if @skill.query_basedmg != 0
  1071.       if @skill.base_damage < 0 or @skill.query_basedmg < 0
  1072.         textno *= -1
  1073.         draw_icon(YE::MENU::SKILL::ICON_BASEHEAL, 0, y, true)
  1074.       else
  1075.         draw_icon(YE::MENU::SKILL::ICON_BASEDMG, 0, y, true)
  1076.       end
  1077.       self.contents.font.color.alpha = 255
  1078.      
  1079.       self.contents.draw_text(24, y, tw, WLH, textno, ta)
  1080.     else
  1081.       draw_icon(YE::MENU::SKILL::ICON_BASEDMG, 0, y, false)
  1082.       self.contents.font.color.alpha = 128
  1083.       self.contents.draw_text(24, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1084.     end
  1085.     if $imported["CustomDmgFormulaRD"]
  1086.       #---Accuracy
  1087.       draw_icon(YE::MENU::SKILL::ICON_ACCURACY, 60, y, true)
  1088.       self.contents.font.color.alpha = 255
  1089.       acchit = @skill.hit
  1090.       acchit = @skill.query_accuracy if @skill.query_accuracy > 0
  1091.       textno = sprintf("%d%%", acchit)
  1092.       self.contents.draw_text(84, y, tw, WLH, textno, ta)
  1093.       #---HP Hi/Lo/F
  1094.       if @skill.hp_hi > 0 or @skill.hp_lo > 0 or @skill.query_hp_f > 0
  1095.         draw_icon(YE::MENU::SKILL::ICON_HP_F, 120, y, true)
  1096.         self.contents.font.color.alpha = 255
  1097.         num = @skill.hp_hi if @skill.hp_hi > 0
  1098.         num = @skill.hp_lo if @skill.hp_lo > 0
  1099.         num = @skill.query_hp_f if @skill.query_hp_f > 0
  1100.         textno = sprintf("%d%%", num)
  1101.         self.contents.draw_text(144, y, tw, WLH, textno, ta)
  1102.       else
  1103.         draw_icon(YE::MENU::SKILL::ICON_HP_F, 120, y, false)
  1104.         self.contents.font.color.alpha = 128
  1105.         self.contents.draw_text(144, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1106.       end
  1107.       #---MP Hi/Lo/F
  1108.       if @skill.mp_hi > 0 or @skill.mp_lo > 0 or @skill.query_mp_f > 0
  1109.         draw_icon(YE::MENU::SKILL::ICON_MP_F, 180, y, true)
  1110.         self.contents.font.color.alpha = 255
  1111.         num = @skill.mp_hi if @skill.mp_hi > 0
  1112.         num = @skill.mp_lo if @skill.mp_lo > 0
  1113.         num = @skill.query_mp_f if @skill.query_mp_f > 0
  1114.         textno = sprintf("%d%%", num)
  1115.         self.contents.draw_text(204, y, tw, WLH, textno, ta)
  1116.       else
  1117.         draw_icon(YE::MENU::SKILL::ICON_MP_F, 180, y, false)
  1118.         self.contents.font.color.alpha = 128
  1119.         self.contents.draw_text(204, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1120.       end
  1121.     else
  1122.       #---Accuracy
  1123.       draw_icon(YE::MENU::SKILL::ICON_ACCURACY, 120, y, true)
  1124.       self.contents.font.color.alpha = 255
  1125.       acchit = @skill.hit
  1126.       acchit = @skill.query_accuracy if @skill.query_accuracy > 0
  1127.       textno = sprintf("%d%%", acchit)
  1128.       self.contents.draw_text(144, y, tw, WLH, textno, ta)
  1129.     end
  1130.     # 4th Row --------------------------------------
  1131.     y += WLH
  1132.     if $imported["CustomDmgFormulaRD"]
  1133.       #---Attack F
  1134.       if @skill.atk_f > 0 or @skill.newatk_f > 0 or @skill.query_atk_f > 0
  1135.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, true)
  1136.         self.contents.font.color.alpha = 255
  1137.         num = @skill.atk_f
  1138.         num = @skill.newatk_f if @skill.newatk_f > 0
  1139.         num = @skill.query_atk_f if @skill.query_atk_f > 0
  1140.         textno = sprintf("%d%%", num)
  1141.         self.contents.draw_text(24, y, tw, WLH, textno, ta)
  1142.       else
  1143.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, false)
  1144.         self.contents.font.color.alpha = 128
  1145.         self.contents.draw_text(24, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1146.       end
  1147.       #---Defense F
  1148.       if @skill.def_f > 0 or @skill.query_def_f > 0
  1149.         draw_icon(YE::MENU::SKILL::ICON_DEF_F, 60, y, true)
  1150.         self.contents.font.color.alpha = 255
  1151.         num = @skill.def_f
  1152.         num = @skill.query_def_f if @skill.query_def_f > 0
  1153.         textno = sprintf("%d%%", num)
  1154.         self.contents.draw_text(84, y, tw, WLH, textno, ta)
  1155.       else
  1156.         draw_icon(YE::MENU::SKILL::ICON_DEF_F, 60, y, false)
  1157.         self.contents.font.color.alpha = 128
  1158.         self.contents.draw_text(84, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1159.       end
  1160.       #---Spirit F
  1161.       if @skill.spi_f > 0 or @skill.newspi_f > 0 or @skill.query_spi_f > 0
  1162.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 120, y, true)
  1163.         self.contents.font.color.alpha = 255
  1164.         num = @skill.spi_f
  1165.         num = @skill.newspi_f if @skill.newspi_f > 0
  1166.         num = @skill.query_spi_f if @skill.query_spi_f > 0
  1167.         textno = sprintf("%d%%", num)
  1168.         self.contents.draw_text(144, y, tw, WLH, textno, ta)
  1169.       else
  1170.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 120, y, false)
  1171.         self.contents.font.color.alpha = 128
  1172.         self.contents.draw_text(144, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1173.       end
  1174.       #---Agility F
  1175.       if @skill.agi_f > 0 or @skill.query_agi_f > 0
  1176.         draw_icon(YE::MENU::SKILL::ICON_AGI_F, 180, y, true)
  1177.         self.contents.font.color.alpha = 255
  1178.         num = @skill.agi_f
  1179.         num = @skill.query_agi_f if @skill.query_agi_f > 0
  1180.         textno = sprintf("%d%%", num)
  1181.         self.contents.draw_text(204, y, tw, WLH, textno, ta)
  1182.       else
  1183.         draw_icon(YE::MENU::SKILL::ICON_AGI_F, 180, y, false)
  1184.         self.contents.font.color.alpha = 128
  1185.         self.contents.draw_text(204, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1186.       end
  1187.     else
  1188.       #---Attack F
  1189.       if @skill.atk_f > 0 or @skill.query_atk_f > 0
  1190.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, true)
  1191.         self.contents.font.color.alpha = 255
  1192.         num = @skill.atk_f
  1193.         num = @skill.query_atk_f if @skill.query_atk_f > 0
  1194.         textno = sprintf("%d%%", num)
  1195.         self.contents.draw_text(24, y, tw, WLH, textno, ta)
  1196.       else
  1197.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, false)
  1198.         self.contents.font.color.alpha = 128
  1199.         self.contents.draw_text(24, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1200.       end
  1201.       #---Spirit F
  1202.       if @skill.spi_f > 0 or @skill.query_spi_f > 0
  1203.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 120, y, true)
  1204.         self.contents.font.color.alpha = 255
  1205.         num = @skill.spi_f
  1206.         num = @skill.query_spi_f if @skill.query_spi_f > 0
  1207.         textno = sprintf("%d%%", num)
  1208.         self.contents.draw_text(144, y, tw, WLH, textno, ta)
  1209.       else
  1210.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 120, y, false)
  1211.         self.contents.font.color.alpha = 128
  1212.         self.contents.draw_text(144, y, tw, WLH, YE::MENU::SKILL::DATA_NIL, ta)
  1213.       end
  1214.     end
  1215.     # 5th Row --------------------------------------
  1216.     y += WLH
  1217.     #---Physical Attack
  1218.     if @skill.physical_attack or @skill.query_physical
  1219.       draw_icon(YE::MENU::SKILL::ICON_PHYS, 0, y, true)
  1220.       self.contents.font.color.alpha = 255
  1221.       textflag = YE::MENU::SKILL::DATA_TRUE
  1222.     else
  1223.       draw_icon(YE::MENU::SKILL::ICON_PHYS, 0, y, false)
  1224.       self.contents.font.color.alpha = 128
  1225.       textflag = YE::MENU::SKILL::DATA_FALSE
  1226.     end
  1227.     self.contents.draw_text(24, y, tw, WLH, textflag, ta)
  1228.     #---Damage to MP
  1229.     if @skill.damage_to_mp or @skill.query_mpdamage
  1230.       draw_icon(YE::MENU::SKILL::ICON_MPDMG, 60, y, true)
  1231.       self.contents.font.color.alpha = 255
  1232.       textflag = YE::MENU::SKILL::DATA_TRUE
  1233.     else
  1234.       draw_icon(YE::MENU::SKILL::ICON_MPDMG, 60, y, false)
  1235.       self.contents.font.color.alpha = 128
  1236.       textflag = YE::MENU::SKILL::DATA_FALSE
  1237.     end
  1238.     self.contents.draw_text(84, y, tw, WLH, textflag, ta)
  1239.     #---Absorb Damage
  1240.     if @skill.absorb_damage or @skill.query_absorb
  1241.       draw_icon(YE::MENU::SKILL::ICON_ABSORB, 120, y, true)
  1242.       self.contents.font.color.alpha = 255
  1243.       textflag = YE::MENU::SKILL::DATA_TRUE
  1244.     else
  1245.       draw_icon(YE::MENU::SKILL::ICON_ABSORB, 120, y, false)
  1246.       self.contents.font.color.alpha = 128
  1247.       textflag = YE::MENU::SKILL::DATA_FALSE
  1248.     end
  1249.     self.contents.draw_text(144, y, tw, WLH, textflag, ta)
  1250.     #---Ignore Defense?
  1251.     if @skill.ignore_defense or @skill.query_ignore_def
  1252.       draw_icon(YE::MENU::SKILL::ICON_IGDEF, 180, y, true)
  1253.       self.contents.font.color.alpha = 255
  1254.       textflag = YE::MENU::SKILL::DATA_TRUE
  1255.     else
  1256.       draw_icon(YE::MENU::SKILL::ICON_IGDEF, 180, y, false)
  1257.       self.contents.font.color.alpha = 128
  1258.       textflag = YE::MENU::SKILL::DATA_FALSE
  1259.     end
  1260.     self.contents.draw_text(204, y, tw, WLH, textflag, ta)
  1261.   end
  1262.  
  1263.   #--------------------------------------------------------------------------
  1264.   # make cost page
  1265.   #--------------------------------------------------------------------------
  1266.   def make_cost_page
  1267.     y = WLH #--- 1st ROW ---------------------------------------
  1268.     self.contents.font.size = Font.default_size
  1269.     self.contents.font.color.alpha = 255
  1270.     if $imported["CustomSkillEffects"]
  1271.       skillcost = calc_cost
  1272.       costicon = @actor.create_cost_icon(@skill)
  1273.       if @skill.cost_custom > 0
  1274.         nt1 = @actor.cost_custom(@skill, 3)
  1275.         nt2 = @actor.cost_custom(@skill, 2)
  1276.         nt = sprintf("%d %s", nt1, nt2)
  1277.         text = @actor.cost_custom(@skill, 5)
  1278.       elsif @skill.cur_mp_cost > 0
  1279.         nt = sprintf(YE::BATTLE::MP_COST, @skill.cur_mp_cost)
  1280.         text = YE::MENU::SKILL::MSG_MP_COST
  1281.       elsif @skill.max_mp_cost > 0
  1282.         nt = sprintf(YE::MENU::SKILL::MSG_MAXMP_VALUE, @skill.max_mp_cost)
  1283.         text = YE::MENU::SKILL::MSG_MAXMP_COST
  1284.       elsif @skill.cur_hp_cost > 0
  1285.         nt = sprintf(YE::BATTLE::HP_COST, @skill.cur_hp_cost)
  1286.         text = YE::MENU::SKILL::MSG_HP_COST
  1287.       elsif @skill.max_hp_cost > 0
  1288.         nt = sprintf(YE::MENU::SKILL::MSG_MAXHP_VALUE, @skill.max_hp_cost)
  1289.         text = YE::MENU::SKILL::MSG_MAXHP_COST
  1290.       elsif @skill.gold_cost > 0
  1291.         nt = sprintf(YE::BATTLE::GOLD_COST, @skill.gold_cost)
  1292.         text = YE::MENU::SKILL::MSG_GOLD_COST
  1293.       elsif @skill.maxgold_cost > 0
  1294.         nt = sprintf(YE::BATTLE::MGOLD_COST, @skill.gold_cost)
  1295.         text = YE::MENU::SKILL::MSG_MGOLD_COST
  1296.       elsif @skill.rage_cost > 0
  1297.         nt = sprintf(YE::BATTLE::RAGE_COST, @skill.rage_cost)
  1298.         text = YE::MENU::SKILL::MSG_RAGE_COST
  1299.       else
  1300.         nt = sprintf(YE::BATTLE::MP_COST, @skill.mp_cost)
  1301.         text = YE::MENU::SKILL::MSG_MP_COST
  1302.         unless @skill.cost_custom > 0
  1303.           if skillcost == 0
  1304.             nt = ""
  1305.             text = YE::MENU::SKILL::MSG_FREE
  1306.             costicon = 0
  1307.           end
  1308.         end
  1309.       end
  1310.     else
  1311.       nt = sprintf(YE::MENU::SKILL::MSG_MP_VALUE, @skill.mp_cost)
  1312.       text = YE::MENU::SKILL::MSG_MP_COST
  1313.       skillcost = @actor.calc_mp_cost(@skill)
  1314.       costicon = YE::MENU::SKILL::ICON_MP
  1315.       if skillcost == 0
  1316.         nt = ""
  1317.         text = YE::MENU::SKILL::MSG_FREE
  1318.         costicon = 0
  1319.       end
  1320.     end
  1321.     draw_icon(costicon, 0, y, true)
  1322.     draw_category(y, text, nt)
  1323.     y += WLH #--- 2nd ROW ---------------------------------------
  1324.     draw_icon(YE::MENU::SKILL::ICON_INIT, 0, y, true)
  1325.     if @skill.speed > 0
  1326.       nt = sprintf("+%d",@skill.speed)
  1327.     elsif @skill.speed == 0
  1328.       nt = YE::MENU::SKILL::ZERO_INITIATIVE
  1329.     else
  1330.       nt = @skill.speed
  1331.     end
  1332.     text = YE::MENU::SKILL::MSG_INITIATIVE
  1333.     draw_category(y, text, nt)
  1334.     if $imported["CustomSkillEffects"]
  1335.      
  1336.       if @skill.cast_time > 0 #--- 3rd ROW ---------------------------------------
  1337.         y += WLH
  1338.         draw_icon(YE::MENU::SKILL::ICON_CHARGE, 0, y, true)
  1339.         if @skill.cast_time == 1
  1340.           nt = sprintf(YE::BATTLE::RECHARGE_MSG1,@skill.cast_time)
  1341.         else
  1342.           nt = sprintf(YE::BATTLE::RECHARGE_MSG,@skill.cast_time)
  1343.         end
  1344.         text = YE::MENU::SKILL::MSG_CHARGE
  1345.         draw_category(y, text, nt)
  1346.       end
  1347.       if @skill.prepare > 0 #--- 4th ROW ---------------------------------------
  1348.         y += WLH
  1349.         draw_icon(YE::MENU::SKILL::ICON_PREPARE, 0, y, true)
  1350.         if @skill.prepare == 1
  1351.           nt = sprintf(YE::BATTLE::RECHARGE_MSG1,@skill.prepare)
  1352.         else
  1353.           nt = sprintf(YE::BATTLE::RECHARGE_MSG,@skill.prepare)
  1354.         end
  1355.         text = YE::MENU::SKILL::MSG_PREPARE
  1356.         draw_category(y, text, nt)
  1357.       end
  1358.       if @skill.recharge > 0 #--- 5th ROW ---------------------------------------
  1359.         y += WLH
  1360.         draw_icon(YE::BATTLE::RECHARGE_ICON, 0, y, true)
  1361.         if @skill.recharge == 1
  1362.           nt = sprintf(YE::BATTLE::RECHARGE_MSG1,@skill.recharge)
  1363.         else
  1364.           nt = sprintf(YE::BATTLE::RECHARGE_MSG,@skill.recharge)
  1365.         end
  1366.         text = YE::MENU::SKILL::MSG_RECHARGE
  1367.         draw_category(y, text, nt)
  1368.       end
  1369.       if @skill.fatigue > 0 #--- 6th ROW ---------------------------------------
  1370.         y += WLH
  1371.         draw_icon(YE::MENU::SKILL::ICON_FATIGUE, 0, y, true)
  1372.         if @skill.fatigue == 1
  1373.           nt = sprintf(YE::BATTLE::RECHARGE_MSG1,@skill.fatigue)
  1374.         else
  1375.           nt = sprintf(YE::BATTLE::RECHARGE_MSG,@skill.fatigue)
  1376.         end
  1377.         text = YE::MENU::SKILL::MSG_FATIGUE
  1378.         draw_category(y, text, nt)
  1379.       end
  1380.       if @skill.usage > 0 #--- 7th ROW ---------------------------------------
  1381.         y += WLH
  1382.         draw_icon(YE::BATTLE::USAGE_ICON, 0, y, true)
  1383.         if @skill.usage == 1
  1384.           nt = sprintf(YE::MENU::SKILL::MSG_USAGE_VALUE1,@skill.usage)
  1385.         else
  1386.           nt = sprintf(YE::MENU::SKILL::MSG_USAGE_VALUE,@skill.usage)
  1387.         end
  1388.         text = YE::MENU::SKILL::MSG_USAGE
  1389.         draw_category(y, text, nt)
  1390.       end
  1391.     end
  1392.   end #end def
  1393.  
  1394.   #--------------------------------------------------------------------------
  1395.   # make dmg page
  1396.   #--------------------------------------------------------------------------
  1397.   def make_dmg_page
  1398.     y = WLH #--- 1st ROW ---------------------------------------
  1399.     self.contents.font.size = Font.default_size
  1400.     self.contents.font.color.alpha = 255
  1401.     nt = @skill.base_damage
  1402.     nt = @skill.query_basedmg if @skill.query_basedmg != 0
  1403.     if @skill.base_damage < 0 or @skill.query_basedmg < 0
  1404.       nt *= -1
  1405.       draw_icon(YE::MENU::SKILL::ICON_BASEHEAL, 0, y, true)
  1406.       text = YE::MENU::SKILL::MSG_BASE_HEALING
  1407.     else
  1408.       draw_icon(YE::MENU::SKILL::ICON_BASEDMG, 0, y, true)
  1409.       text = YE::MENU::SKILL::MSG_BASE_DAMAGE
  1410.     end
  1411.     draw_category(y, text, nt)
  1412.    
  1413.     if $imported["CustomDmgFormulaRD"]
  1414.       if @skill.hp_hi > 0 or @skill.hp_lo > 0 or @skill.query_hp_f > 0
  1415.         y += WLH #--- HP ROW ---------------------------------------
  1416.         draw_icon(YE::MENU::SKILL::ICON_HP_F, 0, y, true)
  1417.         text = YE::MENU::SKILL::MSG_HP_F
  1418.         num = @skill.hp_hi if @skill.hp_hi > 0
  1419.         num = @skill.hp_lo if @skill.hp_lo > 0
  1420.         num = @skill.query_hp_f if @skill.query_hp_f > 0
  1421.         nt = sprintf("%d%%", num)
  1422.         draw_category(y, text, nt)
  1423.       end
  1424.       if @skill.mp_hi > 0 or @skill.mp_lo > 0 or @skill.query_mp_f > 0
  1425.         y += WLH #--- MP ROW ---------------------------------------
  1426.         draw_icon(YE::MENU::SKILL::ICON_MP_F, 0, y, true)
  1427.         text = YE::MENU::SKILL::MSG_MP_F
  1428.         num = @skill.mp_hi if @skill.mp_hi > 0
  1429.         num = @skill.mp_lo if @skill.mp_lo > 0
  1430.         num = @skill.query_mp_f if @skill.query_mp_f > 0
  1431.         nt = sprintf("%d%%", num)
  1432.         draw_category(y, text, nt)
  1433.       end
  1434.       if @skill.atk_f > 0 or @skill.newatk_f > 0 or @skill.query_atk_f > 0
  1435.         y += WLH #--- Atk ROW ---------------------------------------
  1436.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, true)
  1437.         text = YE::MENU::SKILL::MSG_ATK_F
  1438.         num = @skill.atk_f
  1439.         num = @skill.newatk_f if @skill.newatk_f > 0
  1440.         num = @skill.query_atk_f if @skill.query_atk_f > 0
  1441.         nt = sprintf("%d%%", num)
  1442.         draw_category(y, text, nt)
  1443.       end
  1444.       if @skill.def_f > 0 or @skill.query_def_f > 0
  1445.         y += WLH #--- Def ROW ---------------------------------------
  1446.         draw_icon(YE::MENU::SKILL::ICON_DEF_F, 0, y, true)
  1447.         text = YE::MENU::SKILL::MSG_DEF_F
  1448.         num = @skill.def_f
  1449.         num = @skill.query_def_f if @skill.query_def_f > 0
  1450.         nt = sprintf("%d%%", num)
  1451.         draw_category(y, text, nt)
  1452.       end
  1453.       if @skill.spi_f > 0 or @skill.newspi_f > 0 or @skill.query_spi_f > 0
  1454.         y += WLH #--- Spi ROW ---------------------------------------
  1455.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 0, y, true)
  1456.         text = YE::MENU::SKILL::MSG_SPI_F
  1457.         num = @skill.spi_f
  1458.         num = @skill.newspi_f if @skill.newspi_f > 0
  1459.         num = @skill.query_spi_f if @skill.query_spi_f > 0
  1460.         nt = sprintf("%d%%", num)
  1461.         draw_category(y, text, nt)
  1462.       end
  1463.       if @skill.agi_f > 0 or @skill.query_agi_f > 0
  1464.         y += WLH #--- Agi ROW ---------------------------------------
  1465.         draw_icon(YE::MENU::SKILL::ICON_AGI_F, 0, y, true)
  1466.         text = YE::MENU::SKILL::MSG_AGI_F
  1467.         num = @skill.agi_f
  1468.         num = @skill.query_agi_f if @skill.query_agi_f > 0
  1469.         nt = sprintf("%d%%", num)
  1470.         draw_category(y, text, nt)
  1471.       end
  1472.     else
  1473.       if @skill.atk_f > 0 or @skill.query_atk_f > 0
  1474.         y += WLH #--- Atk ROW ---------------------------------------
  1475.         draw_icon(YE::MENU::SKILL::ICON_ATK_F, 0, y, true)
  1476.         text = YE::MENU::SKILL::MSG_ATK_F
  1477.         num = @skill.atk_f
  1478.         num = @skill.query_atk_f if @skill.query_atk_f > 0
  1479.         nt = sprintf("%d%%", num)
  1480.         draw_category(y, text, nt)
  1481.       end    
  1482.       if @skill.spi_f > 0 or @skill.query_spi_f > 0
  1483.         y += WLH #--- Spi ROW ---------------------------------------
  1484.         draw_icon(YE::MENU::SKILL::ICON_SPI_F, 0, y, true)
  1485.         text = YE::MENU::SKILL::MSG_SPI_F
  1486.         num = @skill.spi_f
  1487.         num = @skill.query_spi_f if @skill.query_spi_f > 0
  1488.         nt = sprintf("%d%%", num)
  1489.         draw_category(y, text, nt)
  1490.       end
  1491.     end
  1492.   end #end def
  1493.  
  1494.   #--------------------------------------------------------------------------
  1495.   # make aggro page
  1496.   #--------------------------------------------------------------------------
  1497.   def make_aggro_page
  1498.     y = 0 #--- Initiate ---------------------------------------
  1499.     self.contents.font.size = Font.default_size
  1500.     self.contents.font.color.alpha = 255
  1501.    
  1502.     if not @skill.query_hide_aggro
  1503.      
  1504.       if @skill.aggro_set > 0
  1505.         y += WLH #--- Row 1 ---------------------------------------
  1506.         draw_icon(YE::MENU::SKILL::ICON_AGGRO, 0, y, true)
  1507.         lt = YE::MENU::SKILL::MSG_AGGRO_TERM
  1508.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_SET,lt)
  1509.         num = @skill.aggro_set
  1510.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_SETVAL, num)
  1511.         draw_category(y, text, nt)
  1512.       end
  1513.      
  1514.       if @skill.aggro_mul > 0
  1515.         y += WLH #--- Row 2 ---------------------------------------
  1516.         draw_icon(YE::MENU::SKILL::ICON_AGGRO, 0, y, true)
  1517.         lt = YE::MENU::SKILL::MSG_AGGRO_TERM
  1518.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_MUL,lt)
  1519.         num = @skill.aggro_mul
  1520.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_MULVAL, num)
  1521.         draw_category(y, text, nt)
  1522.       end
  1523.      
  1524.       if @skill.aggro_div > 0
  1525.         y += WLH #--- Row 3 ---------------------------------------
  1526.         draw_icon(YE::MENU::SKILL::ICON_AGGRO, 0, y, true)
  1527.         lt = YE::MENU::SKILL::MSG_AGGRO_TERM
  1528.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_DIV,lt)
  1529.         num = @skill.aggro_div
  1530.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_DIVVAL, num)
  1531.         draw_category(y, text, nt)
  1532.       end
  1533.      
  1534.       if @skill.aggro_add > 0
  1535.         y += WLH #--- Row 4 ---------------------------------------
  1536.         draw_icon(YE::MENU::SKILL::ICON_AGGRO, 0, y, true)
  1537.         lt = YE::MENU::SKILL::MSG_AGGRO_TERM
  1538.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_ADD,lt)
  1539.         num = @skill.aggro_add
  1540.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_ADDVAL, num)
  1541.         draw_category(y, text, nt)
  1542.       end
  1543.      
  1544.       if @skill.aggro_sub > 0
  1545.         y += WLH #--- Row 5 ---------------------------------------
  1546.         draw_icon(YE::MENU::SKILL::ICON_AGGRO, 0, y, true)
  1547.         lt = YE::MENU::SKILL::MSG_AGGRO_TERM
  1548.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_SUB,lt)
  1549.         num = @skill.aggro_sub
  1550.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_SUBVAL, num)
  1551.         draw_category(y, text, nt)
  1552.       end
  1553.      
  1554.     end
  1555.    
  1556.     if not @skill.query_hide_grudge
  1557.      
  1558.       if @skill.grudge_set > 0
  1559.         y += WLH #--- Row 6 ---------------------------------------
  1560.         draw_icon(YE::MENU::SKILL::ICON_GRUDGE, 0, y, true)
  1561.         lt = YE::MENU::SKILL::MSG_GRUDGE_TERM
  1562.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_SET,lt)
  1563.         num = @skill.grudge_set
  1564.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_SETVAL, num)
  1565.         draw_category(y, text, nt)
  1566.       end
  1567.      
  1568.       if @skill.grudge_mul > 0
  1569.         y += WLH #--- Row 7 ---------------------------------------
  1570.         draw_icon(YE::MENU::SKILL::ICON_GRUDGE, 0, y, true)
  1571.         lt = YE::MENU::SKILL::MSG_GRUDGE_TERM
  1572.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_MUL,lt)
  1573.         num = @skill.grudge_mul
  1574.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_MULVAL, num)
  1575.         draw_category(y, text, nt)
  1576.       end
  1577.      
  1578.       if @skill.grudge_div > 0
  1579.         y += WLH #--- Row 7 ---------------------------------------
  1580.         draw_icon(YE::MENU::SKILL::ICON_GRUDGE, 0, y, true)
  1581.         lt = YE::MENU::SKILL::MSG_GRUDGE_TERM
  1582.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_DIV,lt)
  1583.         num = @skill.grudge_div
  1584.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_DIVVAL, num)
  1585.         draw_category(y, text, nt)
  1586.       end
  1587.      
  1588.       if @skill.grudge_add > 0
  1589.         y += WLH #--- Row 7 ---------------------------------------
  1590.         draw_icon(YE::MENU::SKILL::ICON_GRUDGE, 0, y, true)
  1591.         lt = YE::MENU::SKILL::MSG_GRUDGE_TERM
  1592.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_ADD,lt)
  1593.         num = @skill.grudge_add
  1594.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_ADDVAL, num)
  1595.         draw_category(y, text, nt)
  1596.       end
  1597.      
  1598.       if @skill.grudge_sub > 0
  1599.         y += WLH #--- Row 7 ---------------------------------------
  1600.         draw_icon(YE::MENU::SKILL::ICON_GRUDGE, 0, y, true)
  1601.         lt = YE::MENU::SKILL::MSG_GRUDGE_TERM
  1602.         text = sprintf(YE::MENU::SKILL::MSG_AGGRO_SUB,lt)
  1603.         num = @skill.grudge_sub
  1604.         nt = sprintf(YE::MENU::SKILL::MSG_AGGRO_SUBVAL, num)
  1605.         draw_category(y, text, nt)
  1606.       end
  1607.      
  1608.     end
  1609.   end #end def
  1610.  
  1611.   #--------------------------------------------------------------------------
  1612.   # make misc page
  1613.   #--------------------------------------------------------------------------
  1614.   def make_misc_page
  1615.     self.contents.font.size = Font.default_size
  1616.     self.contents.font.color.alpha = 255
  1617.     y = WLH #--- 1st Row -------------------------------------------
  1618.     draw_icon(YE::MENU::SKILL::ICON_ACCURACY, 0, y, true)
  1619.     text = YE::MENU::SKILL::MSG_ACCURACY
  1620.     nth = @skill.hit
  1621.     nth = @skill.query_accuracy if @skill.query_accuracy > 0
  1622.     nt = sprintf(YE::MENU::SKILL::MSG_ACCURACY_VAL, nth)
  1623.     draw_category(y, text, nt)
  1624.     if $imported["CustomSkillEffects"]
  1625.       if @skill.rage_boost > 0 or @skill.query_rage_boost > 0
  1626.         #--- 2nd Row -------------------------------------------
  1627.         y += WLH
  1628.         draw_icon(YE::BATTLE::RAGE_ICON, 0, y, true)
  1629.         num = @skill.rage_boost
  1630.         num = @skill.query_rage_boost if @skill.query_rage_boost > 0
  1631.         nt = sprintf(YE::MENU::SKILL::MSG_RAGE_VALUE,num)
  1632.         text = YE::MENU::SKILL::MSG_RAGE_BOOST
  1633.         draw_category(y, text, nt)
  1634.       end
  1635.     end
  1636.     y += WLH #--- 3rd Row -------------------------------------------
  1637.     draw_icon(YE::MENU::SKILL::ICON_PHYS, 0, y, true)
  1638.     text = YE::MENU::SKILL::MSG_MISC_PHYS
  1639.     if @skill.physical_attack or @skill.query_physical
  1640.       nt = YE::MENU::SKILL::MSG_MISC_YES
  1641.     else
  1642.       nt = YE::MENU::SKILL::MSG_MISC_NO
  1643.     end
  1644.     draw_category(y, text, nt)
  1645.     y += WLH #--- 4th Row -------------------------------------------
  1646.     draw_icon(YE::MENU::SKILL::ICON_MPDMG, 0, y, true)
  1647.     text = YE::MENU::SKILL::MSG_MISC_MPDMG
  1648.     if @skill.damage_to_mp or @skill.query_mpdamage
  1649.       nt = YE::MENU::SKILL::MSG_MISC_YES
  1650.     else
  1651.       nt = YE::MENU::SKILL::MSG_MISC_NO
  1652.     end
  1653.     draw_category(y, text, nt)
  1654.     y += WLH #--- 5th Row -------------------------------------------
  1655.     draw_icon(YE::MENU::SKILL::ICON_ABSORB, 0, y, true)
  1656.     text = YE::MENU::SKILL::MSG_MISC_ABSORB
  1657.     if @skill.absorb_damage or @skill.query_absorb
  1658.       nt = YE::MENU::SKILL::MSG_MISC_YES
  1659.     else
  1660.       nt = YE::MENU::SKILL::MSG_MISC_NO
  1661.     end
  1662.     draw_category(y, text, nt)
  1663.     y += WLH #--- 6th Row -------------------------------------------
  1664.     draw_icon(YE::MENU::SKILL::ICON_IGDEF, 0, y, true)
  1665.     text = YE::MENU::SKILL::MSG_MISC_IGDEF
  1666.     if @skill.ignore_defense or @skill.query_ignore_def
  1667.       nt = YE::MENU::SKILL::MSG_MISC_YES
  1668.     else
  1669.       nt = YE::MENU::SKILL::MSG_MISC_NO
  1670.     end
  1671.     draw_category(y, text, nt)
  1672.   end #end def
  1673.  
  1674.   #--------------------------------------------------------------------------
  1675.   # make element page
  1676.   #--------------------------------------------------------------------------
  1677.   def make_element_page
  1678.     self.contents.font.size = Font.default_size
  1679.     self.contents.font.color.alpha = 255
  1680.     self.contents.font.color = normal_color
  1681.     y = WLH
  1682.     self.contents.font.color = text_color(@category_colour)
  1683.     text = YE::MENU::SKILL::MSG_ELEMENTS
  1684.     self.contents.draw_text(0, y, 240, WLH, text, 1)
  1685.     y += WLH
  1686.     ix = 0
  1687.     element_list = YE::MENU::SKILL::SHOWN_ELEMENTS
  1688.     element_set = @skill.element_set
  1689.     element_set += @skill.query_add_elements
  1690.     element_set.uniq
  1691.     element_set -= @skill.query_sub_elements
  1692.     element_set.uniq
  1693.     for ele in element_list
  1694.       if element_set.include?(ele)
  1695.         icon = YE::MENU::SKILL::ELEMENT_ICONS[ele]
  1696.         draw_icon(icon, ix, y, true)
  1697.         if ix == 216
  1698.           ix = 0
  1699.           y += WLH
  1700.         else
  1701.           ix += 24
  1702.         end
  1703.       end
  1704.     end
  1705.     y += WLH
  1706.   end #end def
  1707.  
  1708.   #--------------------------------------------------------------------------
  1709.   # make status page
  1710.   #--------------------------------------------------------------------------
  1711.   def make_status_page
  1712.     self.contents.font.size = Font.default_size
  1713.     self.contents.font.color.alpha = 255
  1714.     self.contents.font.color = normal_color
  1715.     y = 0
  1716.     ix = 0
  1717.     state_add_list = []
  1718.     state_add_list += @skill.plus_state_set
  1719.     state_add_list += @skill.query_add_state_apply
  1720.     state_add_list -= @skill.query_sub_state_apply
  1721.     state_add_list = invisible_states(state_add_list)
  1722.     state_add_list.uniq
  1723.     state_add_list.sort{ |ax,ay| ay <=> ax }
  1724.     state_sub_list = []
  1725.     state_sub_list += @skill.minus_state_set
  1726.     state_sub_list += @skill.query_add_state_erase
  1727.     state_sub_list -= @skill.query_sub_state_erase
  1728.     state_sub_list = invisible_states(state_sub_list)
  1729.     state_sub_list.uniq
  1730.     state_sub_list.sort{ |ax,ay| ay <=> ax }
  1731.     if state_add_list != [] and !@skill.query_hide_state_apply
  1732.       y += WLH
  1733.       ix = 0
  1734.       self.contents.font.color = text_color(@category_colour)
  1735.       text = YE::MENU::SKILL::MSG_STATUS_ADD
  1736.       self.contents.draw_text(0, y, 240, WLH, text, 1)
  1737.       y += WLH
  1738.       for state_id in state_add_list
  1739.         icon = $data_states[state_id].icon_index
  1740.         unless icon == 0
  1741.           draw_icon(icon, ix, y)
  1742.           if ix == 216
  1743.             ix = 0
  1744.             y += WLH
  1745.           else
  1746.             ix += 24
  1747.           end
  1748.         end
  1749.       end
  1750.     end
  1751.     if state_sub_list != [] and !@skill.query_hide_state_erase
  1752.       y += WLH
  1753.       ix = 0
  1754.       self.contents.font.color = text_color(@category_colour)
  1755.       text = YE::MENU::SKILL::MSG_STATUS_SUB
  1756.       self.contents.draw_text(0, y, 240, WLH, text, 1)
  1757.       y += WLH
  1758.       for state_id in state_sub_list
  1759.         icon = $data_states[state_id].icon_index
  1760.         unless icon == 0
  1761.           draw_icon(icon, ix, y)
  1762.           if ix == 216
  1763.             ix = 0
  1764.             y += WLH
  1765.           else
  1766.             ix += 24
  1767.           end
  1768.         end
  1769.       end
  1770.     end
  1771.    
  1772.   end #end def
  1773.  
  1774.   #--------------------------------------------------------------------------
  1775.   # invisible_states
  1776.   #--------------------------------------------------------------------------
  1777.   def invisible_states(state_list)
  1778.     new_state_list = []
  1779.     for state in state_list
  1780.       icon = $data_states[state].icon_index
  1781.       new_state_list.push(state) unless icon == 0
  1782.     end
  1783.     return new_state_list
  1784.   end #end def
  1785.  
  1786.   #--------------------------------------------------------------------------
  1787.   # make jp page
  1788.   #--------------------------------------------------------------------------
  1789.   def make_jp_page
  1790.     self.contents.font.size = Font.default_size
  1791.     self.contents.font.color.alpha = 255
  1792.     sw = self.width - 32
  1793.     y = WLH #--- 1st Row -------------------------------------------
  1794.     icon = YE::SUBCLASS::JP_ICON
  1795.     draw_icon(icon, 0, y)
  1796.     text = YE::MENU::SKILL::TEXT_JP_COST
  1797.     self.contents.font.color = text_color(@category_colour)
  1798.     self.contents.draw_text(24, y, sw-104, WLH, text, 0)
  1799.     self.contents.font.color = normal_color
  1800.     text = sprintf(YE::SUBCLASS::JP_DEFINITION, @skill.jp_cost)
  1801.     self.contents.draw_text(sw-80, y, 80, WLH, text, 2)
  1802.     #------------------------------------------------------------------------
  1803.     if @skill.require_level > 0
  1804.       y += WLH
  1805.       icon = YE::SUBCLASS::JP_ICON
  1806.       draw_icon(icon, 0, y)
  1807.       self.contents.font.color = text_color(@category_colour)
  1808.       text = YE::MENU::SKILL::TEXT_LVL_REQ
  1809.       self.contents.draw_text(24, y, sw-104, WLH, text, 0)
  1810.       self.contents.font.color = normal_color
  1811.       text = sprintf(YE::SUBCLASS::REQUIRE_LEVEL, @skill.require_level)
  1812.       self.contents.draw_text(sw-80, y, 80, WLH, text, 2)
  1813.     end
  1814.     #------------------------------------------------------------------------
  1815.     if @skill.require_skill != []
  1816.       y += WLH
  1817.       self.contents.font.color = text_color(@category_colour)
  1818.       text = YE::MENU::SKILL::TEXT_SKILL_R
  1819.       self.contents.draw_text(0, y, sw, WLH, text, 1)
  1820.       self.contents.font.color = normal_color
  1821.       y += WLH
  1822.       for skill_id in @skill.require_skill
  1823.         skill = $data_skills[skill_id]
  1824.         icon = skill.icon_index
  1825.         draw_icon(icon, 0, y)
  1826.         text = skill.name
  1827.         self.contents.draw_text(24, y, sw-104, WLH, text, 0)
  1828.         if skill.jp_cost > 0
  1829.           text = sprintf(YE::SUBCLASS::JP_DEFINITION, skill.jp_cost)
  1830.           self.contents.draw_text(sw-80, y, 80, WLH, text, 2)
  1831.         end
  1832.         y += WLH
  1833.       end
  1834.     end
  1835.   end #end def
  1836.  
  1837.   #--------------------------------------------------------------------------
  1838.   # make equip slot page
  1839.   #--------------------------------------------------------------------------
  1840.   def make_equip_slot_page
  1841.     self.contents.font.size = Font.default_size
  1842.     self.contents.font.color.alpha = 255
  1843.     sw = self.width - 32
  1844.     y = WLH
  1845.     self.contents.font.color = text_color(@category_colour)
  1846.     for i in 0..5
  1847.       icon = YE::EQUIPSKILL::STAT_ICONS[i]
  1848.       draw_icon(icon, 0, y)
  1849.       text = YE::EQUIPSKILL::STAT_PARAM[i]
  1850.       self.contents.draw_text(24, y, sw/2-24, WLH, text, 0)
  1851.       y += WLH
  1852.     end
  1853.     y = WLH
  1854.     for i in 0..5
  1855.       case i
  1856.       when 0; value1 = @skill.equip_hp_per; value2 = @skill.equip_hp_set
  1857.       when 1; value1 = @skill.equip_mp_per; value2 = @skill.equip_mp_set
  1858.       when 2; value1 = @skill.equip_atk_per; value2 = @skill.equip_atk_set
  1859.       when 3; value1 = @skill.equip_def_per; value2 = @skill.equip_def_set
  1860.       when 4; value1 = @skill.equip_spi_per; value2 = @skill.equip_spi_set
  1861.       when 5; value1 = @skill.equip_agi_per; value2 = @skill.equip_agi_set
  1862.       end
  1863.       value1 -= 100
  1864.       if value1 > 0
  1865.         self.contents.font.color = power_up_color
  1866.       elsif value1 < 0
  1867.         self.contents.font.color = power_down_color
  1868.       else
  1869.         self.contents.font.color = normal_color
  1870.       end
  1871.       text = sprintf("%+d%%", value1)
  1872.       self.contents.draw_text(sw/2, y, sw/4, WLH, text, 2)
  1873.       if value2 > 0
  1874.         self.contents.font.color = power_up_color
  1875.       elsif value2 < 0
  1876.         self.contents.font.color = power_down_color
  1877.       else
  1878.         self.contents.font.color = normal_color
  1879.       end
  1880.       text = sprintf("%+d", value2)
  1881.       self.contents.draw_text(sw*3/4, y, sw/4, WLH, text, 2)
  1882.       y += WLH
  1883.     end
  1884.   end # end def
  1885.  
  1886.   #--------------------------------------------------------------------------
  1887.   # make notes page
  1888.   #--------------------------------------------------------------------------
  1889.   def make_notes_page
  1890.     self.contents.font.color.alpha = 255
  1891.     self.contents.font.size = YE::MENU::SKILL::NOTE_PAGE_TEXT_SIZE
  1892.     self.contents.font.color = text_color(YE::MENU::SKILL::NOTE_PAGE_TEXT_COLOUR)
  1893.     y = 24
  1894.     txsize = YE::MENU::SKILL::NOTE_PAGE_TEXT_SIZE + 4
  1895.     text = YE::HASH::SKILL_NOTES[@skill.id]
  1896.     nwidth = YE::MENU::SKILL::NOTE_PAGE_WIDTH
  1897.     buf = text.gsub(/\\N(\[\d+\])/i) { "\\__#{$1}" }
  1898.     lines = buf.split(/(?:[|]|\\n)/i)
  1899.     lines.each_with_index { |l, i|
  1900.       l.gsub!(/\\__(\[\d+\])/i) { "\\N#{$1}" }
  1901.       self.contents.draw_text(0, i * txsize + y, nwidth, WLH, l, 0)
  1902.     }
  1903.   end #end def
  1904.  
  1905.   #--------------------------------------------------------------------------
  1906.   # total pages
  1907.   #--------------------------------------------------------------------------
  1908.   def create_total_pages
  1909.     @contents = []
  1910.     @contents.push(0) if YE::MENU::SKILL::SHOW_PAGE_GEN
  1911.     @contents.push(1) if YE::MENU::SKILL::SHOW_PAGE_COSTS
  1912.     #----------------
  1913.     if @skill.base_damage != 0 or @skill.query_basedmg != 0
  1914.       @contents.push(2) if YE::MENU::SKILL::SHOW_PAGE_DMG
  1915.     end
  1916.     #----------------
  1917.     if $imported["BattlerStatAggro"] and YE::MENU::SKILL::SHOW_PAGE_AGGRO
  1918.       if @skill.aggro_set > 0 and !@skill.query_hide_aggro
  1919.         @contents.push(3)
  1920.       elsif @skill.aggro_add > 0 and !@skill.query_hide_aggro
  1921.         @contents.push(3)
  1922.       elsif @skill.aggro_sub > 0 and !@skill.query_hide_aggro
  1923.         @contents.push(3)
  1924.       elsif @skill.aggro_mul > 0 and !@skill.query_hide_aggro
  1925.         @contents.push(3)
  1926.       elsif @skill.aggro_div > 0 and !@skill.query_hide_aggro
  1927.         @contents.push(3)
  1928.       elsif @skill.grudge_set > 0 and !@skill.query_hide_grudge
  1929.         @contents.push(3)
  1930.       elsif @skill.grudge_add > 0 and !@skill.query_hide_grudge
  1931.         @contents.push(3)
  1932.       elsif @skill.grudge_sub > 0 and !@skill.query_hide_grudge
  1933.         @contents.push(3)
  1934.       elsif @skill.grudge_mul > 0 and !@skill.query_hide_grudge
  1935.         @contents.push(3)
  1936.       elsif @skill.grudge_div > 0 and !@skill.query_hide_grudge
  1937.         @contents.push(3)
  1938.       end
  1939.     end
  1940.     #----------------
  1941.     if YE::MENU::SKILL::SHOW_PAGE_ELEM and !@skill.query_hide_elements
  1942.       element_list = YE::MENU::SKILL::SHOWN_ELEMENTS
  1943.       element_set = @skill.element_set
  1944.       element_set += @skill.query_add_elements
  1945.       element_set.uniq
  1946.       element_set -= @skill.query_sub_elements
  1947.       element_set.uniq
  1948.       for ele in element_list
  1949.         if element_set.include?(ele)
  1950.           @contents.push(4)
  1951.           break
  1952.         end
  1953.       end
  1954.     end
  1955.     #----------------
  1956.     if YE::MENU::SKILL::SHOW_PAGE_STATUS
  1957.       state_show = false
  1958.       if !@skill.query_hide_state_apply
  1959.         state_list = []
  1960.         state_list += @skill.plus_state_set
  1961.         state_list += @skill.query_add_state_apply
  1962.         state_list -= @skill.query_sub_state_apply
  1963.         state_list = invisible_states(state_list)
  1964.         state_show = true if state_list != []
  1965.       end
  1966.       if !@skill.query_hide_state_erase
  1967.         state_list = []
  1968.         state_list += @skill.minus_state_set
  1969.         state_list += @skill.query_add_state_erase
  1970.         state_list -= @skill.query_sub_state_erase
  1971.         state_list = invisible_states(state_list)
  1972.         state_show = true if state_list != []
  1973.       end
  1974.       @contents.push(5) if state_show
  1975.     end
  1976.     #----------------
  1977.     if YE::MENU::SKILL::SHOW_JP_PAGE and $imported["SubclassSelectionSystem"]
  1978.       if @skill.jp_cost > 0 and YE::SUBCLASS::USE_JP_SYSTEM
  1979.         @contents.push(10)
  1980.       end
  1981.     end
  1982.     #----------------
  1983.     if YE::MENU::SKILL::SHOW_EQUIP_STATS and $imported["EquipSkillSlots"]
  1984.       @contents.push(15)
  1985.     end
  1986.     #----------------
  1987.     @contents.push(90) if YE::MENU::SKILL::SHOW_PAGE_MISC
  1988.     #----------------
  1989.     if YE::MENU::SKILL::SHOW_PAGE_NOTES
  1990.       if YE::HASH::SKILL_NOTES.include?(@skill.id)
  1991.         @contents.push(100)
  1992.       end
  1993.     end
  1994.     #----------------
  1995.     n = @contents.size
  1996.     return n
  1997.   end
  1998.  
  1999.   #--------------------------------------------------------------------------
  2000.   # case_page_name
  2001.   #--------------------------------------------------------------------------
  2002.   def case_page_name(pagecase)
  2003.     text = YE::MENU::SKILL::TITLE_UNKNOWN
  2004.     case pagecase
  2005.     when 0
  2006.       text = YE::MENU::SKILL::TITLE_GENERAL
  2007.     when 1
  2008.       text = YE::MENU::SKILL::TITLE_SKILL_COST
  2009.     when 2
  2010.       if @skill.base_damage < 0 or @skill.query_basedmg < 0
  2011.         text = YE::MENU::SKILL::TITLE_HEALING
  2012.       else
  2013.         text = YE::MENU::SKILL::TITLE_DAMAGE
  2014.       end
  2015.     when 3
  2016.       text = YE::MENU::SKILL::TITLE_AGGRO
  2017.     when 4
  2018.       text = YE::MENU::SKILL::TITLE_ELEMENTS
  2019.     when 5
  2020.       text = YE::MENU::SKILL::TITLE_STATUS
  2021.     when 10
  2022.       text = YE::MENU::SKILL::TITLE_JP
  2023.     when 15
  2024.       text = YE::MENU::SKILL::TITLE_EQUIP_STATS
  2025.     when 90
  2026.       text = YE::MENU::SKILL::TITLE_MISC
  2027.     when 100
  2028.       text = @skill.name#YE::MENU::SKILL::TITLE_NOTES #PENTA
  2029.     end
  2030.     return text
  2031.   end
  2032.  
  2033.   #--------------------------------------------------------------------------
  2034.   # case_page_run
  2035.   #--------------------------------------------------------------------------
  2036.   def case_page_run(pagecase)
  2037.     case pagecase
  2038.     when 0
  2039.       make_first_page
  2040.     when 1
  2041.       make_cost_page
  2042.     when 2
  2043.       make_dmg_page
  2044.     when 3
  2045.       make_aggro_page
  2046.     when 4
  2047.       make_element_page
  2048.     when 5
  2049.       make_status_page
  2050.     when 10
  2051.       make_jp_page
  2052.     when 15
  2053.       make_equip_slot_page
  2054.     when 90
  2055.       make_misc_page
  2056.     when 100
  2057.       make_notes_page
  2058.     end
  2059.   end
  2060.  
  2061. end
  2062.  
  2063. #===============================================================================
  2064. #
  2065. # END OF FILE
  2066. #
  2067. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement