Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module GameData
- class Species
- FIRST_STAGE_MULT = 4.0
- SECOND_STAGE_MULT = 7.0
- THIRD_STAGE_MULT = 9.0
- SOLO_MULT = 7.0
- LEGENDARY_MULT = 9.0
- BONUS_MULT = 2.5
- def evo_stage_array
- base = get_baby_species
- ret = [base]
- unless base==species
- base_data = GameData::Species.get(base)
- base_data.get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
- ret.push(evo[0]) if evo[0] == species || evo[0] == get_previous_species
- end
- end
- unless ret[1]==species || !ret[1]
- stage1_data = GameData::Species.get(ret[1])
- stage1_data.get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
- ret.push(evo[0]) if evo[0] == species || evo[0] == get_previous_species
- end
- end
- get_evolutions(true).each do |evo| # [new_species, method, parameter, boolean]
- unless evo[3]
- ret.push(evo[0])
- break
- end
- end
- ret.push(species) if !ret.include?(species) #Prevents issues with Pokemon where method is None
- return ret
- end
- def calculated_exp
- array = evo_stage_array
- bst = base_stat_total.to_f
- stage = array.index(species)
- mult = [FIRST_STAGE_MULT,SECOND_STAGE_MULT,THIRD_STAGE_MULT][stage]
- mult = SOLO_MULT if array.length == 1
- mult = LEGENDARY_MULT if array.length == 1 && egg_groups.include?(:Undiscovered)
- mult *= BONUS_MULT if [:HAPPINY,:CHANSEY,:BLISSEY,:AUDINO].include?(species)
- ret = ((bst * mult)/20.0).round.to_i
- return ret
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement