def getEggBitmap(species)
bitmapFileName=sprintf("Graphics/Battlers/%segg",getConstantName(PBSpecies,species)) rescue nil
bitmapFileName=sprintf("Graphics/Battlers/%03degg",species) if !pbResolveBitmap(bitmapFileName)
bitmapFileName=sprintf("Graphics/Battlers/egg") if !pbResolveBitmap(bitmapFileName)
bitmapFileName=pbResolveBitmap(bitmapFileName)
return bitmapFileName
end
def getBabySpecies
pokemon0=$PokemonGlobal.daycare[0][0]
pokemon1=$PokemonGlobal.daycare[1][0]
mother=nil
father=nil
babyspecies=0
ditto0=pbIsDitto?(pokemon0)
ditto1=pbIsDitto?(pokemon1)
if (pokemon0.gender==1 || ditto0)
babyspecies=(ditto0) ? pokemon1.species : pokemon0.species
mother=pokemon0
father=pokemon1
else
babyspecies=(ditto1) ? pokemon0.species : pokemon1.species
mother=pokemon1
father=pokemon0
end
babyspecies=pbGetBabySpecies(babyspecies)
if isConst?(babyspecies,PBSpecies,:MANAPHY) && hasConst?(PBSpecies,:PHIONE)
babyspecies=getConst(PBSpecies,:PHIONE)
end
if isConst?(babyspecies,PBSpecies,:NIDORANfE) && hasConst?(PBSpecies,:NIDORANmA)
babyspecies=[getConst(PBSpecies,:NIDORANmA),
getConst(PBSpecies,:NIDORANfE)][rand(2)]
elsif isConst?(babyspecies,PBSpecies,:NIDORANmA) && hasConst?(PBSpecies,:NIDORANfE)
babyspecies=[getConst(PBSpecies,:NIDORANmA),
getConst(PBSpecies,:NIDORANfE)][rand(2)]
elsif isConst?(babyspecies,PBSpecies,:VOLBEAT) && hasConst?(PBSpecies,:ILLUMISE)
babyspecies=[getConst(PBSpecies,:VOLBEAT),
getConst(PBSpecies,:ILLUMISE)][rand(2)]
elsif isConst?(babyspecies,PBSpecies,:ILLUMISE) && hasConst?(PBSpecies,:VOLBEAT)
babyspecies=[getConst(PBSpecies,:VOLBEAT),
getConst(PBSpecies,:ILLUMISE)][rand(2)]
elsif isConst?(babyspecies,PBSpecies,:MUNCHLAX) &&
!isConst?(mother.item,PBItems,:FULLINCENSE) &&
!isConst?(father.item,PBItems,:FULLINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:WYNAUT) &&
!isConst?(mother.item,PBItems,:LAXINCENSE) &&
!isConst?(father.item,PBItems,:LAXINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:HAPPINY) &&
!isConst?(mother.item,PBItems,:LUCKINCENSE) &&
!isConst?(father.item,PBItems,:LUCKINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:MIMEJR) &&
!isConst?(mother.item,PBItems,:ODDINCENSE) &&
!isConst?(father.item,PBItems,:ODDINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:CHINGLING) &&
!isConst?(mother.item,PBItems,:PUREINCENSE) &&
!isConst?(father.item,PBItems,:PUREINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:BONSLY) &&
!isConst?(mother.item,PBItems,:ROCKINCENSE) &&
!isConst?(father.item,PBItems,:ROCKINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:BUDEW) &&
!isConst?(mother.item,PBItems,:ROSEINCENSE) &&
!isConst?(father.item,PBItems,:ROSEINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:AZURILL) &&
!isConst?(mother.item,PBItems,:SEAINCENSE) &&
!isConst?(father.item,PBItems,:SEAINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
elsif isConst?(babyspecies,PBSpecies,:MANTYKE) &&
!isConst?(mother.item,PBItems,:WAVEINCENSE) &&
!isConst?(father.item,PBItems,:WAVEINCENSE)
babyspecies=pbGetNonIncenseLowestSpecies(babyspecies)
end
return babyspecies
end