mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
Fixed type-resisting berries trying to be consumed twice when triggered by a move called by another move, fixed bad old phone data conversion, fixed events of even sizes moving endlessly when approaching the player
This commit is contained in:
@@ -364,13 +364,13 @@ 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
|
||||||
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.rematch_flag = [contact[4] - 1, 0].max
|
new_contact.rematch_flag = [contact[4] - 1, 0].max
|
||||||
else
|
else
|
||||||
# Non-trainer
|
# Non-trainer
|
||||||
Phone.add_silent(contact[3], contact[2], contact[1])
|
@phone.add_silent(contact[3], contact[2], contact[1])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@phoneNumbers = nil
|
@phoneNumbers = nil
|
||||||
|
|||||||
@@ -719,17 +719,25 @@ class Game_Character
|
|||||||
(rand(2) == 0) ? abs_sx += 1 : abs_sy += 1
|
(rand(2) == 0) ? abs_sx += 1 : abs_sy += 1
|
||||||
end
|
end
|
||||||
if abs_sx > abs_sy
|
if abs_sx > abs_sy
|
||||||
|
if abs_sx >= 1
|
||||||
(sx > 0) ? move_left : move_right
|
(sx > 0) ? move_left : move_right
|
||||||
|
end
|
||||||
if !moving? && sy != 0
|
if !moving? && sy != 0
|
||||||
|
if abs_sy >= 1
|
||||||
(sy > 0) ? move_up : move_down
|
(sy > 0) ? move_up : move_down
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
|
if abs_sy >= 1
|
||||||
(sy > 0) ? move_up : move_down
|
(sy > 0) ? move_up : move_down
|
||||||
|
end
|
||||||
if !moving? && sx != 0
|
if !moving? && sx != 0
|
||||||
|
if abs_sx >= 1
|
||||||
(sx > 0) ? move_left : move_right
|
(sx > 0) ? move_left : move_right
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def move_away_from_player
|
def move_away_from_player
|
||||||
sx = @x + (@width / 2.0) - ($game_player.x + ($game_player.width / 2.0))
|
sx = @x + (@width / 2.0) - ($game_player.x + ($game_player.width / 2.0))
|
||||||
|
|||||||
@@ -736,6 +736,7 @@ class Battle::Battler
|
|||||||
targets.each do |b|
|
targets.each do |b|
|
||||||
next if b.damageState.unaffected
|
next if b.damageState.unaffected
|
||||||
next if !b.damageState.berryWeakened
|
next if !b.damageState.berryWeakened
|
||||||
|
b.damageState.berryWeakened = false # Weakening only applies for one hit
|
||||||
@battle.pbDisplay(_INTL("The {1} weakened the damage to {2}!", b.itemName, b.pbThis(true)))
|
@battle.pbDisplay(_INTL("The {1} weakened the damage to {2}!", b.itemName, b.pbThis(true)))
|
||||||
b.pbConsumeItem
|
b.pbConsumeItem
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user