fixes water currents + recompile for trainer teams

This commit is contained in:
infinitefusion
2022-03-12 12:06:52 -05:00
parent ecb79c6336
commit 79f63485a3
34 changed files with 113 additions and 53 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -56,7 +56,7 @@ class Game_Player < Game_Character
self.move_speed = 4 # Sliding on ice
elsif !moving? && !@move_route_forcing && $PokemonGlobal
if $PokemonGlobal.bicycle
self.move_speed = 5 # Cycling
self.move_speed = $game_switches[RACE_BIKE] ? 5.5 : 5 # Cycling
elsif pbCanRun? || $PokemonGlobal.surfing
self.move_speed = 4 # Running, surfing
else

View File

@@ -16,6 +16,7 @@ module GameData
attr_reader :ledge
attr_reader :ice
attr_reader :bridge
attr_reader :waterCurrent
attr_reader :shows_reflections
attr_reader :must_walk
attr_reader :ignore_passability
@@ -55,6 +56,7 @@ module GameData
@battle_environment = hash[:battle_environment]
@ledge = hash[:ledge] || false
@ice = hash[:ice] || false
@waterCurrent = hash[:waterCurrent] || false
@bridge = hash[:bridge] || false
@shows_reflections = false #= hash[:shows_reflections] || false
@must_walk = hash[:must_walk] || false
@@ -114,6 +116,7 @@ GameData::TerrainTag.register({
:id_number => 6,
:can_surf => true,
:can_fish => true,
:waterCurrent => true,
:battle_environment => :MovingWater
})

View File

@@ -455,7 +455,8 @@ class PokeBattle_Battle
# Register captured Pokémon in the Pokédex, and store them
pbRecordAndStoreCaughtPokemon
isRematch = $game_switches[200]
isRematch = $game_switches[IS_REMATCH_SWITCH]
begin
if isRematch
if @opponent.is_a?(Array)
for trainer in @opponent
@@ -467,6 +468,9 @@ class PokeBattle_Battle
incrNbRematches(rematchId)
end
end
rescue
$game_switches[IS_REMATCH_SWITCH]=false
end
# Collect Pay Day money in a wild battle that ended in a capture

View File

@@ -159,6 +159,8 @@ Events.onStepTakenFieldMovement += proc { |_sender, e|
pbDescendWaterfall
elsif currentTag.ice && !$PokemonGlobal.sliding
pbSlideOnIce
elsif currentTag.waterCurrent && !$PokemonGlobal.sliding
pbSlideOnWater
end
end
end
@@ -569,6 +571,37 @@ def pbSlideOnIce
$PokemonGlobal.sliding = false
end
def pbSlideOnWater
return if !$game_player.pbTerrainTag.waterCurrent
$PokemonGlobal.sliding = true
direction = $game_player.direction
oldwalkanime = $game_player.walk_anime
$game_player.straighten
$game_player.walk_anime = false
loop do
break if !$game_player.can_move_in_direction?(direction)
break if !$game_player.pbTerrainTag.waterCurrent
if $game_map.passable?($game_player.x,$game_player.y,8)
$game_player.move_up
elsif $game_map.passable?($game_player.x,$game_player.y,4)
$game_player.move_left
elsif $game_map.passable?($game_player.x,$game_player.y,6)
$game_player.move_right
elsif $game_map.passable?($game_player.x,$game_player.y,2)
$game_player.move_down
end
while $game_player.moving?
pbUpdateSceneMap
Graphics.update
Input.update
end
end
$game_player.center($game_player.x, $game_player.y)
$game_player.straighten
$game_player.walk_anime = oldwalkanime
$PokemonGlobal.sliding = false
end
def pbTurnTowardEvent(event,otherEvent)
sx = 0
sy = 0

View File

@@ -5,7 +5,7 @@ ItemHandlers::UseText.add(:BICYCLE,proc { |item|
next ($PokemonGlobal.bicycle) ? _INTL("Walk") : _INTL("Use")
})
ItemHandlers::UseText.copy(:BICYCLE,:MACHBIKE,:ACROBIKE)
ItemHandlers::UseText.copy(:BICYCLE,:RACEBIKE)
#===============================================================================
# UseFromBag handlers

View File

@@ -41,4 +41,7 @@ TRUE = true
DIRECTION_LEFT = 4
DIRECTION_RIGHT = 6
DIRECTION_DOWN = 2
DIRECTION_UP = 8
DIRECTION_UP = 8
RACE_BIKE = 984
IS_REMATCH_SWITCH=200

View File

@@ -247,22 +247,24 @@ def generateSimpleTrainerParty(teamSpecies, level)
end
def isSinnohPokemon(species)
dexNum = getDexNumberForSpecies(species)
list =
[254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 288, 294,
295, 296, 297, 298, 299, 305, 306, 307, 308, 315, 316, 317,
318, 319, 320, 321, 322, 323, 324, 326, 332, 343, 344, 345,
346, 347, 352, 353, 354, 358, 383, 384, 388, 389, 400, 402, 403]
return list.include?(species)
return list.include?(dexNum)
end
def isHoennPokemon(species)
dexNum = getDexNumberForSpecies(species)
list = [252, 253, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 289, 290, 291, 292, 293, 300, 301, 302, 303,
304, 309, 310, 311, 312, 313, 314, 333, 334, 335, 336, 340,
341, 342, 355, 356, 357, 378, 379, 380, 381, 382, 385, 386, 387, 390,
391, 392, 393, 394, 395, 396, 401, 404, 405]
return list.include?(species)
return list.include?(dexNum)
end
def pbBitmap(path)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,10 +1,10 @@
1,REPEL,Repel,Repels,1,400,"An item that prevents weak wild Pokémon from appearing for 100 steps after its use.",2,0,0,
2,SUPERREPEL,Super Repel,Super Repels,1,700,"An item that prevents weak wild Pokémon from appearing for 200 steps after its use.",2,0,0,
3,MAXREPEL,Max Repel,Max Repels,1,900,"An item that prevents weak wild Pokémon from appearing for 250 steps after its use.",2,0,0,
1,REPEL,Repel,Repels,1,300,"An item that prevents weak wild Pokémon from appearing for 100 steps after its use.",2,0,0,
2,SUPERREPEL,Super Repel,Super Repels,1,500,"An item that prevents weak wild Pokémon from appearing for 200 steps after its use.",2,0,0,
3,MAXREPEL,Max Repel,Max Repels,1,700,"An item that prevents weak wild Pokémon from appearing for 250 steps after its use.",2,0,0,
4,BLACKFLUTE,Black Flute,Black Flutes,1,400,"A black flute made from blown glass. Its melody makes wild Pokémon less likely to appear.",2,0,0,
5,WHITEFLUTE,White Flute,White Flutes,1,500,"A white flute made from blown glass. Its melody makes wild Pokémon more likely to appear.",2,0,0,
6,HONEY,Honey,Honey,1,100,"A sweet honey with an aroma that attracts wild Pokémon when used in grass, caves or on special trees.",2,0,0,
7,ESCAPEROPE,Escape Rope,Escape Ropes,1,1000,"A long, durable rope. Use it to escape instantly from a cave or a dungeon.",2,0,0,
7,ESCAPEROPE,Escape Rope,Escape Ropes,1,500,"A long, durable rope. Use it to escape instantly from a cave or a dungeon.",2,0,0,
8,REDSHARD,Red Shard,Red Shards,1,200,"A small red shard. It appears to be from some sort of implement made long ago.",0,0,0,
9,YELLOWSHARD,Yellow Shard,Yellow Shards,1,200,"A small yellow shard. It appears to be from some sort of implement made long ago.",0,0,0,
10,BLUESHARD,Blue Shard,Blue Shards,1,200,"A small blue shard. It appears to be from some sort of implement made long ago.",0,0,0,
@@ -48,14 +48,14 @@
48,BIGNUGGET,Big Nugget,Big Nuggets,1,20000,"A big nugget of pure gold that gives off a lustrous gleam. A maniac will buy it for a high price.",0,0,0,
49,HEARTSCALE,Heart Scale,Heart Scales,1,100,"A pretty, heart-shaped scale that is extremely rare. It glows faintly in the colors of the rainbow.",0,0,0,
50,SLOWPOKETAIL,Slowpoke Tail,Slowpoke Tails,1,10000,"A very tasty tail of something. It can be sold at a high price to shops.",0,0,0,
51,RAREBONE,Rare Bone,Rare Bones,1,5000,"A bone that is extremely valuable for Pokémon archaeology. It can be sold for a high price to shops.",0,0,0,
52,RELICCOPPER,Relic Copper,Relic Coppers,1,0,"A copper coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
53,RELICSILVER,Relic Silver,Relic Silvers,1,0,"A silver coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
54,RELICGOLD,Relic Gold,Relic Golds,1,0,"A gold coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
55,RELICVASE,Relic Vase,Relic Vases,1,0,"A vase made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
56,RELICBAND,Relic Band,Relic Bands,1,0,"A bracelet made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
57,RELICSTATUE,Relic Statue,Relic Statues,1,0,"A stone figure made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
58,RELICCROWN,Relic Crown,Relic Crowns,1,0,"A crown made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
51,RAREBONE,Rare Bone,Rare Bones,1,2000,"A bone that is extremely valuable for Pokémon archaeology. It can be sold for a high price to shops.",0,0,0,
52,RELICCOPPER,Relic Copper,Relic Coppers,1,2000,"A copper coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
53,RELICSILVER,Relic Silver,Relic Silvers,1,5000,"A silver coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
54,RELICGOLD,Relic Gold,Relic Golds,1,10000,"A gold coin used in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
55,RELICVASE,Relic Vase,Relic Vases,1,5000,"A vase made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
56,RELICBAND,Relic Band,Relic Bands,1,2000,"A bracelet made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
57,RELICSTATUE,Relic Statue,Relic Statues,1,10000,"A stone figure made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
58,RELICCROWN,Relic Crown,Relic Crowns,1,20000,"A crown made in a civilization about 3,000 years ago. A maniac will buy it for a high price.",0,0,0,
59,GROWTHMULCH,Growth Mulch,Growth Mulch,1,200,"A fertilizer to be spread on soft soil in regions where Berries are grown. A maniac will buy it for a high price.",0,0,11,
60,DAMPMULCH,Damp Mulch,Damp Mulch,1,200,"A fertilizer to be spread on soft soil in regions where Berries are grown. A maniac will buy it for a high price.",0,0,11,
61,STABLEMULCH,Stable Mulch,Stable Mulch,1,200,"A fertilizer to be spread on soft soil in regions where Berries are grown. A maniac will buy it for a high price.",0,0,11,
@@ -267,19 +267,19 @@
265,ULTRABALL,Ultra Ball,Ultra Balls,3,800,"An ultra-performance Ball that provides a higher Pokémon catch rate than a Great Ball.",0,4,4,
266,GREATBALL,Great Ball,Great Balls,3,600,"A good, high-performance Ball that provides a higher Pokémon catch rate than a standard Poké Ball.",0,4,4,
267,POKEBALL,Poké Ball,Poké Balls,3,200,"A device for catching wild Pokémon. It is thrown like a ball at the target. It is designed as a capsule system.",0,4,4,
268,SAFARIBALL,Safari Ball,Safari Balls,3,0,"A special Poké Ball that is used only in the Safari Zone. It is decorated in a camouflage pattern.",0,4,4,
269,SPORTBALL,Sport Ball,Sport Balls,3,300,"A special Poké Ball for the Bug-Catching Contest.",0,4,4,
268,SAFARIBALL,Safari Ball,Safari Balls,3,750,"A special Poké Ball that is used only in the Safari Zone. It is decorated in a camouflage pattern.",0,4,4,
269,SPORTBALL,Sport Ball,Sport Balls,3,750,"A special Poké Ball for the Bug-Catching Contest.",0,4,4,
270,NETBALL,Net Ball,Net Balls,3,1000,"A somewhat different Poké Ball that works especially well on Water- and Bug-type Pokémon.",0,4,4,
271,DIVEBALL,Dive Ball,Dive Balls,3,1000,"A somewhat different Poké Ball that works especially well on Pokémon that live underwater.",0,4,4,
272,NESTBALL,Nest Ball,Nest Balls,3,1000,"A somewhat different Poké Ball that works especially well on weaker Pokémon in the wild.",0,4,4,
272,NESTBALL,Nest Ball,Nest Balls,3,300,"A somewhat different Poké Ball that works especially well on weaker Pokémon in the wild.",0,4,4,
273,REPEATBALL,Repeat Ball,Repeat Balls,3,1000,"A somewhat different Poké Ball that works especially well on Pokémon species that were previously caught.",0,4,4,
274,TIMERBALL,Timer Ball,Timer Balls,3,1000,"A somewhat different Ball that becomes progressively better the more turns there are in a battle.",0,4,4,
275,LUXURYBALL,Luxury Ball,Luxury Balls,3,1000,"A comfortable Poké Ball that makes a caught wild Pokémon quickly grow friendly.",0,4,4,
276,PREMIERBALL,Premier Ball,Premier Balls,3,20,"A somewhat rare Poké Ball that has been specially made to commemorate an event of some sort.",0,4,4,
276,PREMIERBALL,Premier Ball,Premier Balls,3,200,"A somewhat rare Poké Ball that has been specially made to commemorate an event of some sort.",0,4,4,
277,DUSKBALL,Dusk Ball,Dusk Balls,3,1000,"A somewhat different Poké Ball that makes it easier to catch wild Pokémon at night or in dark places like caves.",0,4,4,
278,HEALBALL,Heal Ball,Heal Balls,3,300,"A remedial Poké Ball that restores the caught Pokémon's HP and eliminates any status problem.",0,4,4,
279,QUICKBALL,Quick Ball,Quick Balls,3,1000,"A somewhat different Poké Ball that provides a better catch rate if used at the start of a wild encounter.",0,4,4,
280,CHERISHBALL,Cherish Ball,Cherish Balls,3,0,"A quite rare Poké Ball that has been specially crafted to commemorate an occasion of some sort.",0,4,4,
280,CHERISHBALL,Cherish Ball,Cherish Balls,3,10000,"A quite rare Poké Ball that has been specially crafted to commemorate an occasion of some sort.",0,4,4,
281,FASTBALL,Fast Ball,Fast Balls,3,300,"A Poké Ball that makes it easier to catch fast Pokémon.",0,4,4,
282,LEVELBALL,Level Ball,Level Balls,3,300,"A Poké Ball for catching Pokémon that are a lower level than your own.",0,4,4,
283,LUREBALL,Lure Ball,Lure Balls,3,300,"A Poké Ball for catching Pokémon hooked by a Rod when fishing.",0,4,4,

View File

@@ -1491,24 +1491,23 @@ Pokemon = B100H39,18 #Jigglyorb,
######################
[BEAUTY,Tamia]
Pokemon = B102H69,34 # Belcute,
Pokemon = B69H41,34 # Bellbat,
Pokemon = B10H69,31 # Belterpie,
Pokemon = B15H70,33 # weepindrill,
#######################
[LASS,Kay]
Pokemon = B84H70,36 #Weepinduo,
Pokemon = B84H70,35 #Weepinduo,
######################
[BEAUTY,Bridget]
Pokemon = B43H102,31 #EXEGGISH,
Pokemon = B92H43,31 #ODDTLY,
Pokemon = B69H116,31 #Horsprout,
Pokemon = B69H83,31 #Farsprout,
Pokemon = B43H69,32 #ODDSPROUT,
Pokemon = B44H69,32 #GLOOMSPROUT,
Pokemon = B44H70,32 #GLOOMBELL,
##########################
[PICNICKER,Tina]
Pokemon = B1H111,34 #Rhysaur,
Pokemon = B2H104,34 #Cuysaur,
Pokemon = B1H69,34 #bellsaur,
Pokemon = B2H70,34 #ivybell,
##########################
[BEAUTY,Lori]
@@ -1516,22 +1515,18 @@ Pokemon = B102H43,36 #Oddcute,
###########################
[LASS,Lisa]
Pokemon = ODDISH,33 #Oddyu,
Pokemon = B44H50,33 #Digoom,
Pokemon = B43H25,30 #PIKAISH,
Pokemon = B70H25,34 #PIKABELL,
############################
[COOLTRAINER_F,Mary]
Pokemon = B69H108,32 #Lickisprout,
Pokemon = B72H43,32 #Oddcool,
Pokemon = B17H70,32 #Weepineotto,
Pokemon = B40H44,32 #Glootuff,
Pokemon = B2H58,32 #Growysaur,
Pokemon = B16H43,32 #oddgey,
Pokemon = B83H44,34 #farfoom,
###########################
[PICNICKER,Martine]
Pokemon = B7H43,34 #Oddtle,
Pokemon = B153H1,34 #bulbaleef,
Pokemon = B58H43,34 #oddlithe,
###########################
#####################
@@ -2045,18 +2040,18 @@ Pokemon = B254H181,70 #AMPHAPOM
[LEADER_Erika,Erika,0]
Items = HYPERPOTION
Pokemon = B75H114,33 #Tangeler,
Moves = INGRAIN,GROWTH,SMACKDOWN,CONSTRICT
AbilityIndex = 0
Item = MIRACLESEED
Pokemon = B55H71,33 #Goldbel,
Moves = AQUAJET,GIGADRAIN,SUNNYDAY,SLEEPPOWDER
AbilityIndex = 1
Item = MIRACLESEED
Pokemon = B182H78,35 #rapissom,
Moves = SUNNYDAY,FLAMECHARGE,SPORE,GIGADRAIN
Pokemon = B84H103,33 #DODUO EXEGGUTOR,
Moves = PLUCK,FURYATTACK,SEEDBOMB,HYPNOSIS
AbilityIndex = 1
Item = MIRACLESEED
Item = MIRACLESEED
Pokemon = B57H114,33 #PRIMEAPE TANGELA
Moves = ANCIENTPOWER,SEISMICTOSS,MEGADRAIN,SLEEPPOWDER
AbilityIndex = 0
Item = MIRACLESEED
Pokemon = B71H45,35 #VILEPLUME VICTREEBELL,
Moves = SYNTHESIS,SUNNYDAY,SOLARBEAM,POISONPOWDER
AbilityIndex = 4
Item = SITRUSBERRY
[LEADER_Erika,Erika,2]
Items = FULLRESTORE,FULLRESTORE
@@ -3412,11 +3407,31 @@ Pokemon = MEWTWO,70
####################
[ROBOT,RED]
[ROBOT,R.E.D.]
Pokemon = B132H242,100
Moves = TOXIC,COSMICPOWER,SOFTBOILED,TRANSFORM
AbilityIndex = 0
Item = LEFTOVERS
####################
[ROBOT,G.R.E.E.N.]
Pokemon = B299H94,100
Moves = SWITCHEROO,DISABLE,RECOVER,
AbilityIndex = 4
Item = CHOICESCARF
####################
[ROBOT,Y.E.L.L.O.W.]
Pokemon = B309H184,100
Moves = HYDROCANNON,GIGAIMPACT,CLOSECOMBAT,EARTHQUAKE
AbilityIndex = 4
Item = CHOICEBAND
####################
[ROBOT,B.L.U.E.]
Pokemon = B296H289,100
Moves = ENDEAVOR,VACUUMWAVE,SHADOWSNEAK,
AbilityIndex = 1
Item = FOCUSSASH
####################
[ROBOT,RED_2]