mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fusion cries play both the head and body pokemon cries
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.
@@ -218,6 +218,9 @@ module GameData
|
|||||||
return @id_number > Settings::NB_POKEMON
|
return @id_number > Settings::NB_POKEMON
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_triple_fusion
|
||||||
|
return @id_number >= Settings::ZAPMOLCUNO_NB
|
||||||
|
end
|
||||||
def get_body_species
|
def get_body_species
|
||||||
return @species
|
return @species
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -208,15 +208,9 @@ module GameData
|
|||||||
def self.check_cry_file(species, form)
|
def self.check_cry_file(species, form)
|
||||||
species_data = self.get_species_form(species, form)
|
species_data = self.get_species_form(species, form)
|
||||||
return nil if species_data.nil?
|
return nil if species_data.nil?
|
||||||
return "Cries/BIRDBOSS_2" if $game_switches[SWITCH_TRIPLE_BOSS_BATTLE] && !$game_switches[SWITCH_SILVERBOSS_BATTLE]
|
|
||||||
if species_data.is_fusion
|
if species_data.is_fusion
|
||||||
species_data = GameData::Species.get(getHeadID(species_data))
|
species_data = GameData::Species.get(getHeadID(species_data))
|
||||||
end
|
end
|
||||||
|
|
||||||
# if form > 0
|
|
||||||
# ret = sprintf("Cries/%s_%d", species_data.species, form)
|
|
||||||
# return ret if pbResolveAudioSE(ret)
|
|
||||||
# end
|
|
||||||
ret = sprintf("Cries/%s", species_data.species)
|
ret = sprintf("Cries/%s", species_data.species)
|
||||||
return (pbResolveAudioSE(ret)) ? ret : nil
|
return (pbResolveAudioSE(ret)) ? ret : nil
|
||||||
end
|
end
|
||||||
@@ -230,6 +224,13 @@ module GameData
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.play_cry_from_species(species, form = 0, volume = 90, pitch = 100)
|
def self.play_cry_from_species(species, form = 0, volume = 90, pitch = 100)
|
||||||
|
dex_num = getDexNumberForSpecies(species)
|
||||||
|
return play_triple_fusion_cry(species, volume, pitch) if dex_num > Settings::ZAPMOLCUNO_NB
|
||||||
|
if dex_num > NB_POKEMON
|
||||||
|
body_number = getBodyID(dex_num)
|
||||||
|
head_number = getHeadID(dex_num,body_number)
|
||||||
|
return play_fusion_cry(GameData::Species.get(head_number).species,GameData::Species.get(body_number).species, volume, pitch)
|
||||||
|
end
|
||||||
filename = self.cry_filename(species, form)
|
filename = self.cry_filename(species, form)
|
||||||
return if !filename
|
return if !filename
|
||||||
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
||||||
@@ -237,12 +238,36 @@ module GameData
|
|||||||
|
|
||||||
def self.play_cry_from_pokemon(pkmn, volume = 90, pitch = nil)
|
def self.play_cry_from_pokemon(pkmn, volume = 90, pitch = nil)
|
||||||
return if !pkmn || pkmn.egg?
|
return if !pkmn || pkmn.egg?
|
||||||
|
|
||||||
|
species_data = pkmn.species_data
|
||||||
|
return play_triple_fusion_cry(pkmn.species, volume, pitch) if species_data.is_triple_fusion
|
||||||
|
if pkmn.species_data.is_fusion
|
||||||
|
return play_fusion_cry(species_data.get_head_species,species_data.get_body_species, volume, pitch)
|
||||||
|
end
|
||||||
filename = self.cry_filename_from_pokemon(pkmn)
|
filename = self.cry_filename_from_pokemon(pkmn)
|
||||||
return if !filename
|
return if !filename
|
||||||
pitch ||= 75 + (pkmn.hp * 25 / pkmn.totalhp)
|
pitch ||= 75 + (pkmn.hp * 25 / pkmn.totalhp)
|
||||||
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
pbSEPlay(RPG::AudioFile.new(filename, volume, pitch)) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.play_triple_fusion_cry(species_id, volume, pitch)
|
||||||
|
fusion_components = get_triple_fusion_components(species_id)
|
||||||
|
|
||||||
|
echoln fusion_components
|
||||||
|
echoln species_id
|
||||||
|
for id in fusion_components
|
||||||
|
cry_filename = self.check_cry_file(id,nil)
|
||||||
|
pbSEPlay(cry_filename,volume-10) rescue nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def self.play_fusion_cry(head_id,body_id, volume = 90, pitch = 100)
|
||||||
|
echoln "fusion"
|
||||||
|
head_cry_filename = self.check_cry_file(head_id,nil)
|
||||||
|
body_cry_filename = self.check_cry_file(body_id,nil)
|
||||||
|
|
||||||
|
pbSEPlay(body_cry_filename,volume-10) rescue nil
|
||||||
|
pbSEPlay(head_cry_filename,volume) rescue nil
|
||||||
|
end
|
||||||
def self.play_cry(pkmn, volume = 90, pitch = nil)
|
def self.play_cry(pkmn, volume = 90, pitch = nil)
|
||||||
if pkmn.is_a?(Pokemon)
|
if pkmn.is_a?(Pokemon)
|
||||||
self.play_cry_from_pokemon(pkmn, volume, pitch)
|
self.play_cry_from_pokemon(pkmn, volume, pitch)
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ class BattleSpriteLoader
|
|||||||
return PIFSprite.new(:BASE, dex_number, nil, random_alt)
|
return PIFSprite.new(:BASE, dex_number, nil, random_alt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#todo refactor by using get_triple_fusion_components()
|
||||||
def getSpecialSpriteName(dexNum)
|
def getSpecialSpriteName(dexNum)
|
||||||
base_path = "Graphics/Battlers/special/"
|
base_path = "Graphics/Battlers/special/"
|
||||||
case dexNum
|
case dexNum
|
||||||
|
|||||||
@@ -331,3 +331,80 @@ def addNewTripleFusion(pokemon1, pokemon2, pokemon3, level = 1)
|
|||||||
#$Trainer.pokedex.register(pokemon)
|
#$Trainer.pokedex.register(pokemon)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_triple_fusion_components(species_id)
|
||||||
|
dex_num = GameData::Species.get(species_id).id_number
|
||||||
|
case dex_num
|
||||||
|
when Settings::ZAPMOLCUNO_NB
|
||||||
|
return [144,145,146]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 1
|
||||||
|
return [144,145,146]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 2
|
||||||
|
return [243,244,245]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 3
|
||||||
|
return [340,341,342]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 4
|
||||||
|
return [343,344,345]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 5
|
||||||
|
return [349,350,351]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 6
|
||||||
|
return [151,251,381]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 11
|
||||||
|
return [150,348,380]
|
||||||
|
#starters
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 7
|
||||||
|
return [3,6,9]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 8
|
||||||
|
return [154,157,160]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 9
|
||||||
|
return [278,281,284]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 10
|
||||||
|
return [318,321,324]
|
||||||
|
#starters prevos
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 12
|
||||||
|
return [1,4,7]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 13
|
||||||
|
return [2,5,8]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 14
|
||||||
|
return [152,155,158]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 15
|
||||||
|
return [153,156,159]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 16
|
||||||
|
return [276,279,282]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 17
|
||||||
|
return [277,280,283]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 18
|
||||||
|
return [316,319,322]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 19
|
||||||
|
return [317,320,323]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 20 #birdBoss Left
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 21 #birdBoss middle
|
||||||
|
return [144,145,146]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 22 #birdBoss right
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 23 #sinnohboss left
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 24 #sinnohboss middle
|
||||||
|
return [343,344,345]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 25 #sinnohboss right
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 25 #cardboard
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 26 #cardboard
|
||||||
|
return []
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 27 #Triple regi
|
||||||
|
return [447,448,449]
|
||||||
|
#Triple Kalos 1
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 28
|
||||||
|
return [479,482,485]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 29
|
||||||
|
return [480,483,486]
|
||||||
|
when Settings::ZAPMOLCUNO_NB + 30
|
||||||
|
return [481,484,487]
|
||||||
|
else
|
||||||
|
return [000]
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user