mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed crash when soft resetting, fixed crash when Struggle and confusion pseudo-moves are used, fix broken AI, fixed crash after evolution, fixed crash when editing weather map metadata.
This commit is contained in:
@@ -8,7 +8,7 @@ def pbSetWindowText(string)
|
||||
end
|
||||
|
||||
class Bitmap
|
||||
alias mkxp_draw_text draw_text
|
||||
alias mkxp_draw_text draw_text unless method_defined?(:mkxp_draw_text)
|
||||
|
||||
def draw_text(x, y, width, height, text, align = 0)
|
||||
height = text_size(text).height
|
||||
|
||||
@@ -26,7 +26,7 @@ class PokeBattle_Confusion < PokeBattle_Move
|
||||
@name = ""
|
||||
@function = "000"
|
||||
@baseDamage = 40
|
||||
@type = -1
|
||||
@type = nil
|
||||
@category = 0
|
||||
@accuracy = 100
|
||||
@pp = -1
|
||||
@@ -58,7 +58,7 @@ class PokeBattle_Struggle < PokeBattle_Move
|
||||
@name = (move) ? move.name : _INTL("Struggle")
|
||||
@function = "002"
|
||||
@baseDamage = 50
|
||||
@type = -1
|
||||
@type = nil
|
||||
@category = 0
|
||||
@accuracy = 0
|
||||
@pp = -1
|
||||
|
||||
@@ -350,7 +350,7 @@ class PokeBattle_AI
|
||||
if skill>=PBTrainerAI.bestSkill && target.itemActive?
|
||||
# NOTE: Type-weakening berries aren't suitable for checking at the start
|
||||
# of the round.
|
||||
if !target.item.is_berry?
|
||||
if target.item && !target.item.is_berry?
|
||||
BattleHandlers.triggerDamageCalcTargetItem(target.item,
|
||||
user,target,move,multipliers,baseDmg,type)
|
||||
end
|
||||
|
||||
@@ -917,9 +917,8 @@ class Pokemon
|
||||
# required it to have a held item) or duplicate this Pokémon (Shedinja only).
|
||||
# @param new_species [Pokemon] the species that this Pokémon evolved into
|
||||
def action_after_evolution(new_species)
|
||||
species_data.get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
|
||||
next if evo[3] # Prevolution
|
||||
break if GameData::Evolution.get(method).call_after_evolution(self, evo[0], evo[2], new_species)
|
||||
species_data.get_evolutions(true).each do |evo| # [new_species, method, parameter]
|
||||
break if GameData::Evolution.get(evo[1]).call_after_evolution(self, evo[0], evo[2], new_species)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -757,7 +757,7 @@ module WeatherEffectProperty
|
||||
options.push(w.real_name)
|
||||
ids.push(w.id)
|
||||
end
|
||||
cmd = pbMessage(_INTL("Choose a weather effect."), options, -1, default)
|
||||
cmd = pbMessage(_INTL("Choose a weather effect."), options, -1, nil, default)
|
||||
return nil if cmd < 0 || ids[cmd] == :None
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 100)
|
||||
|
||||
Reference in New Issue
Block a user