View difference between Paste ID: rAteamhS and uWxwYw4X
SHOW: | | - or go back to the newest paste.
1-
#~                             #======================#
1+
                            #======================#
2-
#~                             #  Z-Systems by: Zetu  #
2+
                            #  Z-Systems by: Zetu  #
3-
#~ #===========================#======================#===========================#
3+
#===========================#======================#===========================#
4-
#~ #                         *  *  *  CORE v1.01  *  *  *                         #
4+
#                         *  *  *  CORE v1.01  *  *  *                         #
5-
#~ #=#==========================================================================#=#
5+
#=#==========================================================================#=#
6-
#~   #                              For Z01 to Z07+                             #
6+
  #                              For Z01 to Z07+                             #
7-
#~   # * Make sure ALL Z items are in order and adjacent to each other, with    #
7+
  # * Make sure ALL Z items are in order and adjacent to each other, with    #
8-
#~   #   this script preceeding them.                                           #
8+
  #   this script preceeding them.                                           #
9-
#~   #--------------------------------------------------------------------------#
9+
  #--------------------------------------------------------------------------#
10-
#~   # General Methods :                                                        #
10+
  # General Methods :                                                        #
11-
#~   # Object                                                                   #
11+
  # Object                                                                   #
12-
#~   #   rand_range(min, max)                                                   #
12+
  #   rand_range(min, max)                                                   #
13-
#~   #     Give a random value between the two given values.                    #
13+
  #     Give a random value between the two given values.                    #
14-
#~   # Array                                                                    #
14+
  # Array                                                                    #
15-
#~   #   random                                                                 #
15+
  #   random                                                                 #
16-
#~   #     Returns a random item in an array.                                   #
16+
  #     Returns a random item in an array.                                   #
17-
#~   #   random!                                                                #
17+
  #   random!                                                                #
18-
#~   #     Returns a random item in array and deletes it.                       #
18+
  #     Returns a random item in array and deletes it.                       #
19-
#~   #   sum                                                                    #
19+
  #   sum                                                                    #
20-
#~   #     Returns sum of all values in an array.                               #
20+
  #     Returns sum of all values in an array.                               #
21-
#~   #   mean                                                                   #
21+
  #   mean                                                                   #
22-
#~   #     Returns the average of all values in an array                        #
22+
  #     Returns the average of all values in an array                        #
23-
#~   #--------------------------------------------------------------------------#
23+
  #--------------------------------------------------------------------------#
24-
#~   # Handled Methods (RGSS3)                                                  #
24+
  # Handled Methods (RGSS3)                                                  #
25-
#~   # Window_BattleLog                                                         #
25+
  # Window_BattleLog                                                         #
26-
#~   #   display_action_results                                                 #
26+
  #   display_action_results                                                 #
27-
#~   #==========================================================================#
27+
  #==========================================================================#
28-
#~ ($imported||={})[:zcore] = true
28+
($imported||={})[:zcore] = true
29-
#~ module Z
29+
module Z
30-
#~   
30+
  
31-
#~   def self.display_command_symbols
31+
  def self.display_command_symbols
32-
#~     symbols = []
32+
    symbols = []
33-
#~     symbols.push(:critical)
33+
    symbols.push(:critical)
34-
#~     symbols.push(:hpdamage)
34+
    symbols.push(:hpdamage)
35-
#~     symbols.push(:ampxdamage) if $imported[:z02]
35+
    symbols.push(:ampxdamage) if $imported[:z02]
36-
#~     symbols.push(:mpdamage)   unless $imported[:z02]
36+
    symbols.push(:mpdamage)   unless $imported[:z02]
37-
#~     symbols.push(:tpdamage)
37+
    symbols.push(:tpdamage)
38-
#~     symbols.push(:miss)
38+
    symbols.push(:miss)
39-
#~     symbols.push(:evasion)
39+
    symbols.push(:evasion)
40-
#~     symbols.push(:steal)      if $imported[:z05]
40+
    symbols.push(:steal)      if $imported[:z05]
41-
#~     symbols.push(:states)
41+
    symbols.push(:states)
42-
#~   end
42+
  end
43-
#~   
43+
  
44-
#~ end
44+
end
45-
#~ #========#======================#====#================================#========#
45+
#========#======================#====#================================#========#
46-
#~ #--------#                      #----# DO NOT EDIT PAST THIS POINT!!! #--------#
46+
#--------#                      #----# DO NOT EDIT PAST THIS POINT!!! #--------#
47-
#~ #--------# End of Customization #----# Editing will cause death by    #--------#
47+
#--------# End of Customization #----# Editing will cause death by    #--------#
48-
#~ #--------#                      #----# brain asplosions.              #--------#
48+
#--------#                      #----# brain asplosions.              #--------#
49-
#~ #========#======================#====#================================#========#
49+
#========#======================#====#================================#========#
50-
#~ class Window_BattleLog < Window_Selectable
50+
class Window_BattleLog < Window_Selectable
51-
#~   #--------------------------------------------------------------------------
51+
  #--------------------------------------------------------------------------
52-
#~   # ● Overwrite method: display_action_results
52+
  # ● Overwrite method: display_action_results
53-
#~   #--------------------------------------------------------------------------
53+
  #--------------------------------------------------------------------------
54-
#~   def display_action_results(target, item)
54+
  def display_action_results(target, item)
55-
#~     if target.result.used
55+
    if target.result.used
56-
#~       last_line_number = line_number
56+
      last_line_number = line_number
57-
#~       for symbol in Z::display_command_symbols
57+
      for symbol in Z::display_command_symbols
58-
#~         case symbol
58+
        case symbol
59-
#~         when :critical; display_critical(target, item)
59+
        when :critical; display_critical(target, item)
60-
#~         when :damage;   display_damage(target, item)
60+
        when :damage;   display_damage(target, item)
61-
#~         when :hpdamage, :mpdamage, :tpdamage, :ampxdamage
61+
        when :hpdamage, :mpdamage, :tpdamage, :ampxdamage
62-
#~           if !target.result.missed and !target.result.evaded
62+
          if !target.result.missed and !target.result.evaded
63-
#~             case symbol
63+
            case symbol
64-
#~             when :hpdamage;   display_hp_damage(target, item)
64+
            when :hpdamage;   display_hp_damage(target, item)
65-
#~             when :mpdamage;   display_mp_damage(target, item)
65+
            when :mpdamage;   display_mp_damage(target, item)
66-
#~             when :tpdamage;   display_tp_damage(target, item)
66+
            when :tpdamage;   display_tp_damage(target, item)
67-
#~             when :ampxdamage; display_ampx_damage(target, item)
67+
            when :ampxdamage; display_ampx_damage(target, item)
68-
#~             end
68+
            end
69-
#~           end
69+
          end
70-
#~         when :states;   display_affected_status(target, item)
70+
        when :states;   display_affected_status(target, item)
71-
#~         when :steal;    display_steal(target, item)
71+
        when :steal;    display_steal(target, item)
72-
#~         end
72+
        end
73-
#~       end
73+
      end
74-
#~       display_failure(target, item)
74+
      display_failure(target, item)
75-
#~       wait if line_number > last_line_number
75+
      wait if line_number > last_line_number
76-
#~       back_to(last_line_number)
76+
      back_to(last_line_number)
77-
#~ 	    target.reset_steal_item if $imported[:z05] unless target.actor?
77+
	    target.reset_steal_item if $imported[:z05] unless target.actor?
78-
#~     end
78+
    end
79-
#~   end
79+
  end
80-
#~   
80+
  
81-
#~   alias :zdf :display_failure
81+
  alias :zdf :display_failure
82-
#~   def display_failure(target, item)
82+
  def display_failure(target, item)
83-
#~     return unless target.result.steal.nil?
83+
    return unless target.result.steal.nil?
84-
#~     zdf(target, item)
84+
    zdf(target, item)
85-
#~   end
85+
  end
86-
#~   #--------------------------------------------------------------------------
86+
  #--------------------------------------------------------------------------
87-
#~   # ● New method: display_steal    (Z05)
87+
  # ● New method: display_steal    (Z05)
88-
#~   #--------------------------------------------------------------------------
88+
  #--------------------------------------------------------------------------
89-
#~   def display_steal(target, skill)
89+
  def display_steal(target, skill)
90-
#~     return unless skill.steal?
90+
    return unless skill.steal?
91-
#~     item = target.last_stolen_item
91+
    item = target.last_stolen_item
92-
#~     result = target.result.steal
92+
    result = target.result.steal
93-
#~     case result
93+
    case result
94-
#~     when :success
94+
    when :success
95-
#~       if item.is_a?(Integer)
95+
      if item.is_a?(Integer)
96-
#~ 	      add_text(sprintf(Z05::STEAL_GOLD, item, target.name))
96+
	      add_text(sprintf(Z05::STEAL_GOLD, item, target.name))
97-
#~ 	    else
97+
	    else
98-
#~ 	      add_text(sprintf(Z05::STEAL_ITEM, item.name, target.name))
98+
	      add_text(sprintf(Z05::STEAL_ITEM, item.name, target.name))
99-
#~ 	    end
99+
	    end
100-
#~     when :nosteal
100+
    when :nosteal
101-
#~       add_text(sprintf(Z05::NO_STEALS, target.name))
101+
      add_text(sprintf(Z05::NO_STEALS, target.name))
102-
#~     when :fail
102+
    when :fail
103-
#~       add_text(Z05::STEAL_FAIL)
103+
      add_text(Z05::STEAL_FAIL)
104-
#~     end
104+
    end
105-
#~   end
105+
  end
106-
#~   #--------------------------------------------------------------------------
106+
  #--------------------------------------------------------------------------
107-
#~   # ● New method: display_ampx_damage    (Z02)
107+
  # ● New method: display_ampx_damage    (Z02)
108-
#~   #--------------------------------------------------------------------------
108+
  #--------------------------------------------------------------------------
109-
#~   def display_ampx_damage(target, item)
109+
  def display_ampx_damage(target, item)
110-
#~     return if target.dead? || target.result.mp_damage == 0
110+
    return if target.dead? || target.result.mp_damage == 0
111-
#~     return if (resource = target.resource(item)).nil?
111+
    return if (resource = target.resource(item)).nil?
112-
#~     Sound.play_recovery if target.result.mp_damage < 0
112+
    Sound.play_recovery if target.result.mp_damage < 0
113-
#~     add_text(target.result.ampx_damage_text(resource.name))
113+
    add_text(target.result.ampx_damage_text(resource.name))
114-
#~     wait
114+
    wait
115-
#~   end
115+
  end
116-
#~   
116+
  
117-
#~ end
117+
end
118
119-
#~ module DataManager
119+
module DataManager
120-
#~   #--------------------------------------------------------------------------
120+
  #--------------------------------------------------------------------------
121-
#~   # ● Overwrite method: make_save_contents
121+
  # ● Overwrite method: make_save_contents
122-
#~   #--------------------------------------------------------------------------
122+
  #--------------------------------------------------------------------------
123-
#~   def self.make_save_contents
123+
  def self.make_save_contents
124-
#~     contents = {}
124+
    contents = {}
125-
#~     contents[:system]        = $game_system
125+
    contents[:system]        = $game_system
126-
#~     contents[:timer]         = $game_timer
126+
    contents[:timer]         = $game_timer
127-
#~     contents[:message]       = $game_message
127+
    contents[:message]       = $game_message
128-
#~     contents[:switches]      = $game_switches
128+
    contents[:switches]      = $game_switches
129-
#~     contents[:variables]     = $game_variables
129+
    contents[:variables]     = $game_variables
130-
#~     contents[:self_switches] = $game_self_switches
130+
    contents[:self_switches] = $game_self_switches
131-
#~     contents[:actors]        = $game_actors
131+
    contents[:actors]        = $game_actors
132-
#~     contents[:party]         = $game_party
132+
    contents[:party]         = $game_party
133-
#~     contents[:troop]         = $game_troop
133+
    contents[:troop]         = $game_troop
134-
#~     contents[:map]           = $game_map
134+
    contents[:map]           = $game_map
135-
#~     contents[:player]        = $game_player
135+
    contents[:player]        = $game_player
136-
#~     #------------------------=
136+
    #------------------------=
137-
#~     contents[:quest] = QuestLog.questlist if $imported[:z07]
137+
    contents[:quest] = QuestLog.questlist if $imported[:z07]
138-
#~     #------------------------=
138+
    #------------------------=
139-
#~     contents
139+
    contents
140-
#~   end
140+
  end
141-
#~   #--------------------------------------------------------------------------
141+
  #--------------------------------------------------------------------------
142-
#~   # ● Overwrite method: extract_save_contents
142+
  # ● Overwrite method: extract_save_contents
143-
#~   #--------------------------------------------------------------------------
143+
  #--------------------------------------------------------------------------
144-
#~   def self.extract_save_contents(contents)
144+
  def self.extract_save_contents(contents)
145-
#~     $game_system        = contents[:system]
145+
    $game_system        = contents[:system]
146-
#~     $game_timer         = contents[:timer]
146+
    $game_timer         = contents[:timer]
147-
#~     $game_message       = contents[:message]
147+
    $game_message       = contents[:message]
148-
#~     $game_switches      = contents[:switches]
148+
    $game_switches      = contents[:switches]
149-
#~     $game_variables     = contents[:variables]
149+
    $game_variables     = contents[:variables]
150-
#~     $game_self_switches = contents[:self_switches]
150+
    $game_self_switches = contents[:self_switches]
151-
#~     $game_actors        = contents[:actors]
151+
    $game_actors        = contents[:actors]
152-
#~     $game_party         = contents[:party]
152+
    $game_party         = contents[:party]
153-
#~     $game_troop         = contents[:troop]
153+
    $game_troop         = contents[:troop]
154-
#~     $game_map           = contents[:map]
154+
    $game_map           = contents[:map]
155-
#~     $game_player        = contents[:player]
155+
    $game_player        = contents[:player]
156-
#~     #-------------------=
156+
    #-------------------=
157-
#~     QuestList.loadquestlist(contents[:quest]) if $imported[:z07]
157+
    QuestList.loadquestlist(contents[:quest]) if $imported[:z07]
158-
#~     #-------------------=
158+
    #-------------------=
159-
#~   end
159+
  end
160-
#~   
160+
  
161-
#~ end
161+
end
162
163-
#~ class Object
163+
class Object
164-
#~   #--------------------------------------------------------------------------
164+
  #--------------------------------------------------------------------------
165-
#~   # ● New method: rand_range
165+
  # ● New method: rand_range
166-
#~   #--------------------------------------------------------------------------
166+
  #--------------------------------------------------------------------------
167-
#~   def rand_range(min, max)
167+
  def rand_range(min, max)
168-
#~     rand(max - min + 1) + min
168+
    rand(max - min + 1) + min
169-
#~   end
169+
  end
170-
#~   
170+
  
171-
#~ end
171+
end
172
173-
#~ class Array
173+
class Array
174-
#~   #--------------------------------------------------------------------------
174+
  #--------------------------------------------------------------------------
175-
#~   # ● New method: random
175+
  # ● New method: random
176-
#~   #--------------------------------------------------------------------------
176+
  #--------------------------------------------------------------------------
177-
#~   def random
177+
  def random
178-
#~     self[rand(size)]
178+
    self[rand(size)]
179-
#~   end
179+
  end
180-
#~   #--------------------------------------------------------------------------
180+
  #--------------------------------------------------------------------------
181-
#~   # ● New method: random!
181+
  # ● New method: random!
182-
#~   #--------------------------------------------------------------------------
182+
  #--------------------------------------------------------------------------
183-
#~   def random!
183+
  def random!
184-
#~     self.delete_at(rand(size))
184+
    self.delete_at(rand(size))
185-
#~   end
185+
  end
186-
#~   #--------------------------------------------------------------------------
186+
  #--------------------------------------------------------------------------
187-
#~   # ● New method: sum
187+
  # ● New method: sum
188-
#~   #--------------------------------------------------------------------------
188+
  #--------------------------------------------------------------------------
189-
#~   def sum
189+
  def sum
190-
#~     self.inject{|sum,x| sum + x }
190+
    self.inject{|sum,x| sum + x }
191-
#~   end
191+
  end
192-
#~   #--------------------------------------------------------------------------
192+
  #--------------------------------------------------------------------------
193-
#~   # ● New method: mean
193+
  # ● New method: mean
194-
#~   #--------------------------------------------------------------------------
194+
  #--------------------------------------------------------------------------
195-
#~   def mean
195+
  def mean
196-
#~     sum.to_f / size
196+
    sum.to_f / size
197-
#~   end
197+
  end
198-
#~   
198+
  
199-
#~ end
199+
end
200
201-
#~ class Object
201+
class Object
202-
#~   
202+
  
203-
#~   def tryconvert(value)
203+
  def tryconvert(value)
204-
#~     begin
204+
    begin
205-
#~       return eval(value)
205+
      return eval(value)
206-
#~     rescue
206+
    rescue
207-
#~       return value
207+
      return value
208-
#~     end
208+
    end
209-
#~   end
209+
  end
210-
#~   
210+
  
211-
#~ end
211+
end