Fixed "cannotRun" battle rule not applying to Roar/Circle Throw/Poké Dolls, commented out compiler code that edits what it thinks are supposed to be doors

This commit is contained in:
Maruno17
2021-03-27 20:11:16 +00:00
parent b5c8c6ba26
commit ca5dcf70ae
5 changed files with 24 additions and 18 deletions

View File

@@ -698,8 +698,14 @@ module Compiler
moves = { 0 => "" }
items = { 0 => "" }
natures = {}
# TODO: Stat change (rewrite this).
evs = ["HP", "ATK", "DEF", "SPD", "SA", "SD"]
evs = {
:HP => "HP",
:ATTACK => "ATK",
:DEFENSE => "DEF",
:SPECIAL_ATTACK => "SA",
:SPECIAL_DEFENSE => "SD",
:SPEED => "SPD"
}
File.open(filename,"wb") { |f|
add_PBS_header_to_file(f)
f.write("\#-------------------------------\r\n")
@@ -709,15 +715,11 @@ module Compiler
c1 = (species[pkmn.species]) ? species[pkmn.species] : (species[pkmn.species] = GameData::Species.get(pkmn.species).species.to_s)
c2 = (items[pkmn.item]) ? items[pkmn.item] : (items[pkmn.item] = GameData::Item.get(pkmn.item).id.to_s)
c3 = (natures[pkmn.nature]) ? natures[pkmn.nature] : (natures[pkmn.nature] = GameData::Nature.get(pkmn.nature).id.to_s)
# TODO: Stat change (rewrite this).
evlist = ""
ev = pkmn.ev
for i in 0...evs.length
if (ev & (1 << i)) != 0
evlist += "," if evlist.length > 0
evlist += evs[i]
end
end
pkmn.ev.each do |stat|
evlist += "," if evlist.length > 0
evlist += evs[stat]
}
c4 = (moves[pkmn.move1]) ? moves[pkmn.move1] : (moves[pkmn.move1] = GameData::Move.get(pkmn.move1).id.to_s)
c5 = (moves[pkmn.move2]) ? moves[pkmn.move2] : (moves[pkmn.move2] = GameData::Move.get(pkmn.move2).id.to_s)
c6 = (moves[pkmn.move3]) ? moves[pkmn.move3] : (moves[pkmn.move3] = GameData::Move.get(pkmn.move3).id.to_s)

View File

@@ -942,6 +942,7 @@ module Compiler
end
when 201 # Transfer Player
if list.length<=8
=begin
if params[0]==0
# Look for another event just above the position this Transfer
# Player command will transfer to - it may be a door, in which case
@@ -1075,6 +1076,7 @@ module Compiler
end
end
end
=end
# If this is the only event command, convert to a full event
if list.length==2 || (list.length==3 && (list[0].code==250 || list[1].code==250)) # Play SE
params[5] = 1 # No fade