mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
fixed abilities and rival evolution
This commit is contained in:
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.
@@ -701,7 +701,7 @@ end
|
||||
#===============================================================================
|
||||
# Picking up an item found on the ground
|
||||
#===============================================================================
|
||||
def pbItemBall(item,quantity=1)
|
||||
def pbItemBall(item,quantity=1,item_name="",canRandom=true)
|
||||
item = GameData::Item.get(item)
|
||||
return false if !item || quantity<1
|
||||
itemname = (quantity>1) ? item.name_plural : item.name
|
||||
@@ -745,7 +745,8 @@ end
|
||||
#===============================================================================
|
||||
# Being given an item
|
||||
#===============================================================================
|
||||
def pbReceiveItem(item,quantity=1)
|
||||
def pbReceiveItem(item,quantity=1,item_name="",music=nil)
|
||||
#item_name -> pour donner un autre nom à l'item. Pas encore réimplémenté et surtout là pour éviter que ça plante quand des events essaient de le faire
|
||||
item = GameData::Item.get(item)
|
||||
return false if !item || quantity<1
|
||||
itemname = (quantity>1) ? item.name_plural : item.name
|
||||
|
||||
@@ -154,7 +154,7 @@ class PokemonIconSprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def useRegularIcon(species)
|
||||
dexNum = convertSpeciesSymbolToDexNumber(species)
|
||||
dexNum = getDexNumberForSpecies(species)
|
||||
return true if dexNum <= Settings::NB_POKEMON
|
||||
return false if $game_variables == nil
|
||||
return true if $game_variables[220] != 0
|
||||
|
||||
@@ -15,7 +15,7 @@ class PokemonBoxIcon < IconSprite
|
||||
end
|
||||
|
||||
def useRegularIcon(species)
|
||||
dexNum = convertSpeciesSymbolToDexNumber(species)
|
||||
dexNum = getDexNumberForSpecies(species)
|
||||
return true if dexNum <= Settings::NB_POKEMON
|
||||
return false if $game_variables == nil
|
||||
return true if $game_variables[220] != 0
|
||||
|
||||
@@ -475,6 +475,7 @@ module PBItems
|
||||
XDEFENSE3 = 471
|
||||
XDEFENSE6 = 472
|
||||
XSPATK = 473
|
||||
XSPECIAL = 473
|
||||
XSPATK2 = 474
|
||||
XSPATK3 = 475
|
||||
XSPATK6 = 476
|
||||
|
||||
@@ -130,8 +130,8 @@ end
|
||||
|
||||
#in: pokemon number
|
||||
def Kernel.isPartPokemon(src, target)
|
||||
src = convertSpeciesSymbolToDexNumber(src)
|
||||
target = convertSpeciesSymbolToDexNumber(target)
|
||||
src = getDexNumberForSpecies(src)
|
||||
target = getDexNumberForSpecies(target)
|
||||
return true if src == target
|
||||
return false if src <= NB_POKEMON
|
||||
bod = getBasePokemonID(src, true)
|
||||
@@ -152,8 +152,6 @@ def getBasePokemonID(pokemon, body = true)
|
||||
|
||||
# cname = getConstantName(PBSpecies, pokemon) rescue nil
|
||||
cname = GameData::Species.get(pokemon).id.to_s
|
||||
|
||||
|
||||
return pokemon if pokemon <= NB_POKEMON
|
||||
return pokemon if cname == nil
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ def pbCheckPokemonIconFiles(speciesNum,egg=false, dna=false)
|
||||
end
|
||||
|
||||
|
||||
def convertSpeciesSymbolToDexNumber(species)
|
||||
def getDexNumberForSpecies(species)
|
||||
return species if species.is_a?(Integer)
|
||||
if species.is_a?(Symbol)
|
||||
dexNum = GameData::Species.get(species).id_number
|
||||
@@ -158,13 +158,13 @@ def getRandomCustomFusion(returnRandomPokemonIfNoneFound=true,customPokeList=[],
|
||||
end
|
||||
|
||||
def getBodyID(species)
|
||||
dexNum = convertSpeciesSymbolToDexNumber(species)
|
||||
dexNum = getDexNumberForSpecies(species)
|
||||
return (dexNum / NB_POKEMON).round
|
||||
end
|
||||
|
||||
def getHeadID(species, bodyId)
|
||||
head_dexNum = convertSpeciesSymbolToDexNumber(species)
|
||||
body_dexNum = convertSpeciesSymbolToDexNumber(bodyId)
|
||||
head_dexNum = getDexNumberForSpecies(species)
|
||||
body_dexNum = getDexNumberForSpecies(bodyId)
|
||||
calculated_number = (head_dexNum - (body_dexNum * NB_POKEMON)).round
|
||||
return calculated_number == 0 ? 420 : calculated_number
|
||||
end
|
||||
|
||||
@@ -788,9 +788,9 @@ def pbChooseAbility(poke, hidden1 = false, hidden2 = false)
|
||||
ability2_name = GameData::Ability.get(abID2).name
|
||||
|
||||
if (Kernel.pbMessage("Choose an ability.", [_INTL("{1}", ability1_name), _INTL("{1}", ability2_name)], 2)) == 0
|
||||
return hidden1 ? 4 : 0
|
||||
return abID1#hidden1 ? 4 : 0
|
||||
end
|
||||
return hidden2 ? 5 : 1
|
||||
return abID2#hidden2 ? 5 : 1
|
||||
end
|
||||
|
||||
def pbChooseNature(species1_nature, species2_nature)
|
||||
|
||||
@@ -148,17 +148,15 @@ def getEvolution(species)
|
||||
head = getBasePokemonID(species,false)
|
||||
ret_evoB = pbGetEvolvedFormData(body)
|
||||
ret_evoH = pbGetEvolvedFormData(head)
|
||||
|
||||
evoBody = ret_evoB.any? ? ret_evoB[0][2] : -1
|
||||
evoHead = ret_evoH.any? ? ret_evoH[0][2] : -1
|
||||
|
||||
return -1 if isNegativeOrNull(evoBody) && isNegativeOrNull(evoHead)
|
||||
return body*Settings::NB_POKEMON+evoHead if isNegativeOrNull(evoBody) #only head evolves
|
||||
return evoBody*Settings::NB_POKEMON + head if isNegativeOrNull(evoHead) #only body evolves
|
||||
return evoBody*Settings::NB_POKEMON+evoHead #both evolve
|
||||
else
|
||||
evo = pbGetEvolvedFormData(species)
|
||||
return evo.any? ? evo[0][2] : -1
|
||||
return evo.any? ? getDexNumberForSpecies(evo[0][0]) : -1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -169,25 +167,27 @@ def getFusionSpecies(body,head)
|
||||
end
|
||||
#
|
||||
def evolveHead(species)
|
||||
if species <= Settings::NB_POKEMON
|
||||
evo = getEvolution(species)
|
||||
return evo == -1 ? species : evo
|
||||
species_id = getDexNumberForSpecies(species)
|
||||
if species_id <= Settings::NB_POKEMON
|
||||
evo = getEvolution(species_id)
|
||||
return evo == -1 ? species_id : evo
|
||||
end
|
||||
head = getBasePokemonID(species,false)
|
||||
body = getBasePokemonID(species)
|
||||
head = getBasePokemonID(species_id,false)
|
||||
body = getBasePokemonID(species_id)
|
||||
headEvo = getEvolution(head)
|
||||
return headEvo == -1 ? species : getFusionSpecies(body,headEvo)
|
||||
return headEvo == -1 ? species_id : getFusionSpecies(body,headEvo)
|
||||
end
|
||||
|
||||
def evolveBody(species)
|
||||
if species <= Settings::NB_POKEMON
|
||||
evo = getEvolution(species)
|
||||
return evo == -1 ? species : evo
|
||||
species_id = getDexNumberForSpecies(species)
|
||||
if species_id <= Settings::NB_POKEMON
|
||||
evo = getEvolution(species_id)
|
||||
return evo == -1 ? species_id : evo
|
||||
end
|
||||
head = getBasePokemonID(species,false)
|
||||
body = getBasePokemonID(species)
|
||||
head = getBasePokemonID(species_id,false)
|
||||
body = getBasePokemonID(species_id)
|
||||
bodyEvo = getEvolution(body)
|
||||
return bodyEvo == -1 ? species : getFusionSpecies(bodyEvo,head)
|
||||
return bodyEvo == -1 ? species_id : getFusionSpecies(bodyEvo,head)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -107,7 +107,7 @@ Removed features that probably won't be coming back
|
||||
|
||||
|
||||
############ KNOWN ISSUES ##############
|
||||
- Some areas might have abnormal lag (please tell me in the discord if you find one that's unreasonably laggy)
|
||||
- Some areas might have abnormal lag - please tell me in the discord if you find one that's unreasonably laggy (you will know if you see one)
|
||||
- Some side-stairs might act strange
|
||||
- The Pokedex is currently all sorts of messed up
|
||||
- Long loading time when starting up the game
|
||||
@@ -116,4 +116,5 @@ Removed features that probably won't be coming back
|
||||
- Significant stutter in the overworld when playing the game on an AMD CPU
|
||||
- Several custom items have not yet been reimplemented
|
||||
- Some battle backgrounds might be missing
|
||||
- Erika's backsprite uses's May's backsprite from RSE
|
||||
- Some NPC trades likely to crash the game
|
||||
|
||||
Reference in New Issue
Block a user