mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
trainer rematch improvements
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,7 +6,7 @@
|
|||||||
module Settings
|
module Settings
|
||||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||||
GAME_VERSION = '5.0.0'
|
GAME_VERSION = '5.0.0'
|
||||||
GAME_VERSION_NUMBER = "5.0.13 - beta"
|
GAME_VERSION_NUMBER = "5.0.16 - beta"
|
||||||
|
|
||||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||||
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ module GameData
|
|||||||
trainer.items = @items.clone
|
trainer.items = @items.clone
|
||||||
trainer.lose_text = self.lose_text
|
trainer.lose_text = self.lose_text
|
||||||
|
|
||||||
isRematch = $game_switches[200]
|
isRematch = $game_switches[IS_REMATCH_SWITCH]
|
||||||
rematchId = getRematchId(trainer.name, trainer.trainer_type)
|
rematchId = getRematchId(trainer.name, trainer.trainer_type)
|
||||||
|
|
||||||
# Create each Pokémon owned by the trainer
|
# Create each Pokémon owned by the trainer
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ class PokeBattle_Battle
|
|||||||
# End of battle
|
# End of battle
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbGainMoney
|
def pbGainMoney
|
||||||
return if $game_switches[200] #is rematch
|
return if $game_switches[IS_REMATCH_SWITCH] #is rematch
|
||||||
return if !@internalBattle || !@moneyGain
|
return if !@internalBattle || !@moneyGain
|
||||||
# Money rewarded from opposing trainers
|
# Money rewarded from opposing trainers
|
||||||
if trainerBattle?
|
if trainerBattle?
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
def Kernel.pbDisplayText(message,xposition,yposition,z=nil)
|
def Kernel.pbDisplayText(message,xposition,yposition,z=nil, baseColor=nil, shadowColor=nil)
|
||||||
@hud = []
|
if @hud==nil
|
||||||
|
@hud = []
|
||||||
|
end
|
||||||
# Draw the text
|
# Draw the text
|
||||||
baseColor=Color.new(72,72,72)
|
baseColor= baseColor != nil ? baseColor : Color.new(72,72,72)
|
||||||
shadowColor=Color.new(160,160,160)
|
shadowColor= shadowColor !=nil ? shadowColor : Color.new(160,160,160)
|
||||||
sprite = BitmapSprite.new(Graphics.width,Graphics.height,@viewport1)
|
sprite = BitmapSprite.new(Graphics.width,Graphics.height,@viewport1)
|
||||||
if z != nil
|
if z != nil
|
||||||
sprite.z=z
|
sprite.z=z
|
||||||
end
|
end
|
||||||
@hud.push(sprite)
|
@hud.push(sprite)
|
||||||
text1=_INTL(message)
|
|
||||||
|
text1=_INTL(message)
|
||||||
textPosition=[
|
textPosition=[
|
||||||
[text1,xposition,yposition,2,baseColor,shadowColor],
|
[text1,xposition,yposition,2,baseColor,shadowColor],
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -115,7 +115,9 @@ end
|
|||||||
class GenOneStyle
|
class GenOneStyle
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
Kernel.pbDisplayText("Controls: F1", 80, 0, 99999)
|
||||||
Kernel.pbDisplayText("Version " + Settings::GAME_VERSION_NUMBER, 254, 308, 99999)
|
Kernel.pbDisplayText("Version " + Settings::GAME_VERSION_NUMBER, 254, 308, 99999)
|
||||||
|
|
||||||
@maxPoke = 140 #1st gen, pas de legend la premiere fois, graduellement plus de poke
|
@maxPoke = 140 #1st gen, pas de legend la premiere fois, graduellement plus de poke
|
||||||
@customPokeList = getCustomSpeciesList()
|
@customPokeList = getCustomSpeciesList()
|
||||||
#Get random Pokemon (1st gen orandPokenly, pas de legend la prmeiere fois)
|
#Get random Pokemon (1st gen orandPokenly, pas de legend la prmeiere fois)
|
||||||
|
|||||||
@@ -119,22 +119,45 @@ def decreaseRematchNumber(trainerId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# def evolveRematchPokemon(nbRematch, speciesSymbol)
|
||||||
|
# species = getDexNumberForSpecies(speciesSymbol)
|
||||||
|
# if (nbRematch >= 10 && $Trainer.numbadges >= 3)
|
||||||
|
# evospecies = getEvolution(species)
|
||||||
|
# return species if evospecies == -1
|
||||||
|
# if (nbRematch >= 20 && $Trainer.numbadges >= 8)
|
||||||
|
# secondEvoSpecies = getEvolution(evospecies)
|
||||||
|
# return secondEvoSpecies == -1 ? evospecies : secondEvoSpecies
|
||||||
|
# end
|
||||||
|
# return evospecies
|
||||||
|
# end
|
||||||
|
# return species
|
||||||
|
# end
|
||||||
def evolveRematchPokemon(nbRematch, speciesSymbol)
|
def evolveRematchPokemon(nbRematch, speciesSymbol)
|
||||||
species = getDexNumberForSpecies(speciesSymbol)
|
species = getDexNumberForSpecies(speciesSymbol)
|
||||||
if (nbRematch >= 10 && $Trainer.numbadges >= 3)
|
if (nbRematch >= 30 && $Trainer.numbadges >= 6)
|
||||||
evospecies = getEvolution(species)
|
species = getEvolution(species,:HEAD)
|
||||||
return species if evospecies == -1
|
species = getEvolution(species,:BODY)
|
||||||
if (nbRematch >= 20 && $Trainer.numbadges >= 8)
|
species = getEvolution(species,:HEAD)
|
||||||
secondEvoSpecies = getEvolution(evospecies)
|
species = getEvolution(species,:BODY)
|
||||||
return secondEvoSpecies == -1 ? evospecies : secondEvoSpecies
|
elsif (nbRematch >= 20 && $Trainer.numbadges >= 3)
|
||||||
end
|
species = getEvolution(species,:HEAD)
|
||||||
return evospecies
|
species = getEvolution(species,:BODY)
|
||||||
|
species = getEvolution(species,:HEAD)
|
||||||
|
elsif (nbRematch >= 10 && $Trainer.numbadges >= 3)
|
||||||
|
species = getEvolution(species,:HEAD)
|
||||||
|
species = getEvolution(species,:BODY)
|
||||||
|
elsif (nbRematch >= 5)
|
||||||
|
species = getEvolution(species,:HEAD)
|
||||||
end
|
end
|
||||||
return species
|
return species
|
||||||
end
|
end
|
||||||
|
|
||||||
def getEvolution(species)
|
|
||||||
|
def getEvolution(species, halfToEvolve=nil)
|
||||||
begin
|
begin
|
||||||
|
prioritizeHead = halfToEvolve == :HEAD
|
||||||
|
prioritizeBody = halfToEvolve == :BODY
|
||||||
|
|
||||||
if species >= Settings::NB_POKEMON
|
if species >= Settings::NB_POKEMON
|
||||||
body = getBasePokemonID(species)
|
body = getBasePokemonID(species)
|
||||||
head = getBasePokemonID(species, false)
|
head = getBasePokemonID(species, false)
|
||||||
@@ -154,17 +177,33 @@ def getEvolution(species)
|
|||||||
evoHead = getDexNumberForSpecies(evoHeadSpecies)
|
evoHead = getDexNumberForSpecies(evoHeadSpecies)
|
||||||
end
|
end
|
||||||
|
|
||||||
return -1 if evoBody == nil && evoHead == nil
|
return species if evoBody == nil && evoHead == nil
|
||||||
|
if prioritizeBody
|
||||||
|
if evoBody == nil
|
||||||
|
return body * Settings::NB_POKEMON + evoHead #only head evolves
|
||||||
|
else
|
||||||
|
return evoBody * Settings::NB_POKEMON + head #only body evolves
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if prioritizeHead
|
||||||
|
if evoHead == nil
|
||||||
|
return evoBody * Settings::NB_POKEMON + head #only body evolves
|
||||||
|
else
|
||||||
|
return body * Settings::NB_POKEMON + evoHead #only head evolves
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return body * Settings::NB_POKEMON + evoHead if evoBody == nil #only head evolves
|
return body * Settings::NB_POKEMON + evoHead if evoBody == nil #only head evolves
|
||||||
return evoBody * Settings::NB_POKEMON + head if evoHead == nil #only body evolves
|
return evoBody * Settings::NB_POKEMON + head if evoHead == nil #only body evolves
|
||||||
return evoBody * Settings::NB_POKEMON + evoHead #both evolve
|
return evoBody * Settings::NB_POKEMON + evoHead #both evolve
|
||||||
else
|
else
|
||||||
evo = pbGetEvolvedFormData(species)
|
evo = pbGetEvolvedFormData(species)
|
||||||
newSpecies = evo[rand(evo.length - 1)][0]
|
newSpecies = evo[rand(evo.length - 1)][0]
|
||||||
return evo.any? ? getDexNumberForSpecies(newSpecies) : -1
|
return evo.any? ? getDexNumberForSpecies(newSpecies) : species
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
return -1
|
return species
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -16,7 +16,6 @@ Removed Pokedex key item
|
|||||||
##New Stuff
|
##New Stuff
|
||||||
Added Quick Surf option
|
Added Quick Surf option
|
||||||
Added Kin Island Club
|
Added Kin Island Club
|
||||||
Added support for multiple savefiles
|
|
||||||
Replaced Delibird's hidden ability with Snow Warning
|
Replaced Delibird's hidden ability with Snow Warning
|
||||||
Added overworld sprites for a few important trainers
|
Added overworld sprites for a few important trainers
|
||||||
Added animations for using Rock Smash and Cut in the overworld
|
Added animations for using Rock Smash and Cut in the overworld
|
||||||
|
|||||||
Reference in New Issue
Block a user