mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Tweaked the Level 101+ equations for some growth rates, moved code that plays the overworld dust animation
This commit is contained in:
@@ -364,12 +364,9 @@ SaveData.register_conversion(:v21_replace_phone_data) do
|
|||||||
@phoneNumbers.each do |contact|
|
@phoneNumbers.each do |contact|
|
||||||
if contact.length > 4
|
if contact.length > 4
|
||||||
# Trainer
|
# Trainer
|
||||||
# TODO: Is there any way to ensure the versions count (contact[5]
|
|
||||||
# is the next version to be battled) is accurate?
|
|
||||||
Phone.add_silent(contact[6], contact[7], contact[1], contact[2], contact[5], 0)
|
Phone.add_silent(contact[6], contact[7], contact[1], contact[2], contact[5], 0)
|
||||||
new_contact = Phone.get(contact[1], contact[2], 0)
|
new_contact = Phone.get(contact[1], contact[2], 0)
|
||||||
new_contact.visible = contact[0]
|
new_contact.visible = contact[0]
|
||||||
new_contact.version = [contact[5] - 1, 0].max
|
|
||||||
new_contact.rematch_flag = [contact[4] - 1, 0].max
|
new_contact.rematch_flag = [contact[4] - 1, 0].max
|
||||||
else
|
else
|
||||||
# Non-trainer
|
# Non-trainer
|
||||||
|
|||||||
@@ -940,9 +940,6 @@ class Game_Character
|
|||||||
end
|
end
|
||||||
# End of a step, so perform events that happen at this time
|
# End of a step, so perform events that happen at this time
|
||||||
if !jumping? && !moving?
|
if !jumping? && !moving?
|
||||||
if was_jumping && !(self.is_a?(Game_Player) && $PokemonGlobal.surfing && !$game_temp.ending_surf)
|
|
||||||
$scene.spriteset.addUserAnimation(Settings::DUST_ANIMATION_ID, @x, @y, true, 1)
|
|
||||||
end
|
|
||||||
EventHandlers.trigger(:on_step_taken, self)
|
EventHandlers.trigger(:on_step_taken, self)
|
||||||
calculate_bush_depth
|
calculate_bush_depth
|
||||||
@stopped_this_frame = true
|
@stopped_this_frame = true
|
||||||
|
|||||||
@@ -271,4 +271,13 @@ class Game_Event < Game_Character
|
|||||||
@interpreter.update
|
@interpreter.update
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_move
|
||||||
|
was_jumping = jumping?
|
||||||
|
super
|
||||||
|
if was_jumping && !jumping? && !@transparent && (@tile_id > 0 || @character_name != "")
|
||||||
|
spriteset = $scene.spriteset(map_id)
|
||||||
|
spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -461,7 +461,14 @@ class Game_Player < Game_Character
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
was_jumping = jumping?
|
||||||
super
|
super
|
||||||
|
if was_jumping && !jumping? && !@transparent && (@tile_id > 0 || @character_name != "")
|
||||||
|
if !$PokemonGlobal.surfing || $game_temp.ending_surf
|
||||||
|
spriteset = $scene.spriteset(map_id)
|
||||||
|
spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_stop
|
def update_stop
|
||||||
|
|||||||
@@ -148,17 +148,6 @@ class Game_Follower < Game_Event
|
|||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
def update_move
|
|
||||||
was_jumping = jumping?
|
|
||||||
super
|
|
||||||
if was_jumping && !jumping?
|
|
||||||
spriteset = $scene.spriteset(map_id)
|
|
||||||
spriteset&.addUserAnimation(Settings::DUST_ANIMATION_ID, self.x, self.y, true, 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def location_passable?(x, y, direction)
|
def location_passable?(x, y, direction)
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ GameData::GrowthRate.register({
|
|||||||
# Erratic (600000):
|
# Erratic (600000):
|
||||||
# For levels 0-50: n**3 * (100 - n) / 50
|
# For levels 0-50: n**3 * (100 - n) / 50
|
||||||
# For levels 51-68: n**3 * (150 - n) / 100
|
# For levels 51-68: n**3 * (150 - n) / 100
|
||||||
# For levels 69-98: n**3 * 1.274 - (n / 150) - p(n mod 3)
|
# For levels 69-98: n**3 * ((1911 - (10 * level)) / 3).floor / 500
|
||||||
# where p(x) = array(0.000, 0.008, 0.014)[x]
|
|
||||||
# For levels 99-100: n**3 * (160 - n) / 100
|
# For levels 99-100: n**3 * (160 - n) / 100
|
||||||
GameData::GrowthRate.register({
|
GameData::GrowthRate.register({
|
||||||
:id => :Erratic,
|
:id => :Erratic,
|
||||||
@@ -111,7 +110,7 @@ GameData::GrowthRate.register({
|
|||||||
286328, 296358, 305767, 316074, 326531, 336255, 346965, 357812, 367807, 378880,
|
286328, 296358, 305767, 316074, 326531, 336255, 346965, 357812, 367807, 378880,
|
||||||
390077, 400293, 411686, 423190, 433572, 445239, 457001, 467489, 479378, 491346,
|
390077, 400293, 411686, 423190, 433572, 445239, 457001, 467489, 479378, 491346,
|
||||||
501878, 513934, 526049, 536557, 548720, 560922, 571333, 583539, 591882, 600000],
|
501878, 513934, 526049, 536557, 548720, 560922, 571333, 583539, 591882, 600000],
|
||||||
:exp_formula => proc { |level| next (level**4) * 3 / 500 }
|
:exp_formula => proc { |level| next ((level**4) + ((level**3) * 2000)) / 3500 }
|
||||||
})
|
})
|
||||||
|
|
||||||
# Fluctuating (1640000):
|
# Fluctuating (1640000):
|
||||||
@@ -133,8 +132,7 @@ GameData::GrowthRate.register({
|
|||||||
765275, 804997, 834809, 877201, 908905, 954084, 987754, 1035837, 1071552, 1122660,
|
765275, 804997, 834809, 877201, 908905, 954084, 987754, 1035837, 1071552, 1122660,
|
||||||
1160499, 1214753, 1254796, 1312322, 1354652, 1415577, 1460276, 1524731, 1571884, 1640000],
|
1160499, 1214753, 1254796, 1312322, 1354652, 1415577, 1460276, 1524731, 1571884, 1640000],
|
||||||
:exp_formula => proc { |level|
|
:exp_formula => proc { |level|
|
||||||
rate = [82 - ((level - 100) / 2.0), 40].max
|
next ((level**3) + ((level / 2) + 32)) * 4 / (100 + level)
|
||||||
next (level**4) * rate / 5000
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,18 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand
|
|||||||
code_parts[0].strip!
|
code_parts[0].strip!
|
||||||
code_parts[0].gsub!(/^\s*!/, "")
|
code_parts[0].gsub!(/^\s*!/, "")
|
||||||
val = nil
|
val = nil
|
||||||
if code_parts[0][0].upcase == code_parts[0][0] &&
|
if code_parts[0][0][/[a-z]/i]
|
||||||
(Kernel.const_defined?(code_parts[0]) rescue false)
|
if code_parts[0][0].upcase == code_parts[0][0] &&
|
||||||
val = (eval(code) rescue nil) # Code starts with a class/method name
|
(Kernel.const_defined?(code_parts[0]) rescue false)
|
||||||
elsif code_parts[0][0].downcase == code_parts[0][0] &&
|
val = (eval(code) rescue nil) # Code starts with a class/method name
|
||||||
!(Interpreter.method_defined?(code_parts[0].to_sym) rescue false) &&
|
elsif code_parts[0][0].downcase == code_parts[0][0] &&
|
||||||
!(Game_Event.method_defined?(code_parts[0].to_sym) rescue false)
|
!(Interpreter.method_defined?(code_parts[0].to_sym) rescue false) &&
|
||||||
val = (eval(code) rescue nil) # Code starts with a method name (that isn't in Interpreter/Game_Event)
|
!(Game_Event.method_defined?(code_parts[0].to_sym) rescue false)
|
||||||
|
val = (eval(code) rescue nil) # Code starts with a method name (that isn't in Interpreter/Game_Event)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
# Code doesn't start with a letter, probably $, just evaluate it
|
||||||
|
val = (eval(code) rescue nil)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
val = $game_switches[index + 1]
|
val = $game_switches[index + 1]
|
||||||
|
|||||||
Reference in New Issue
Block a user