Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin =========================================================================
- Dekita's v1.0
- ★ Pokéball Effécts™ ★
- ================================================================================
- Script Information:
- ====================
- This script is an add-on for my pokemon capture script.
- This script gives you alot more variety and flexibility for your pokeballs,
- it also adds "after effects"
- ================================================================================
- ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- ================================================================================
- 1. You must give credit to "Dekita"
- 2. You are NOT allowed to repost this script.(or modified versions)
- 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
- 4. You are NOT allowed to use this script for Commercial games.
- 5. ENJOY!
- "FINE PRINT"
- By using this script you hereby agree to the above terms and conditions,
- if any violation of the above terms occurs "legal action" may be taken.
- Not understanding the above terms and conditions does NOT mean that
- they do not apply to you.
- If you wish to discuss the terms and conditions in further detail you can
- contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
- ================================================================================
- History:
- =========
- D /M /Y
- 18/11/2o12 - started,
- ================================================================================
- Credit and Thanks to :
- =======================
- ================================================================================
- Known Bugs:
- ============
- N/A
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- If a new bug is found please contact me at
- http://dekitarpg.wordpress.com/
- ================================================================================
- INSTRUCTIONS:
- ==============
- Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
- Place this script below "Dekita Pokémon CORE"
- =end #==========================================================================#
- # EXTRA POKEBALLS
- # Requires Pokemon Capture Script
- # POKEBALL TYPES
- # LevelBall
- # <levelball>
- # value * 1.0 if player pokemon is the same of lower lvl as the wild pokemon -----
- # value * 2.0 if player is higherlv but less than double the wild pokemons lvl -----
- # value * 4.0 if player pokemon is 4 times the lvl of wild pokemon but less than 8 times the lvl ----
- # value * 8.0 if player is 8 times the lvl or more ----
- # LureBall
- # <lureball>
- # value *= 3.0 if pokemon was caught fishing
- # LoveBall
- # <loveball>
- # value *= 8.0 if wild pokemon is same species as player pokemon but opposite
- # gender ----
- # HeavyBall
- # <heavyball>
- # value = 0.0 if wild pokemon weight <= 451.1 lbs
- # value = ( value * 20 ) if wild pokemon weight > 451.1 && <= 677.3 lbs
- # value = ( value * 30 ) if wild pokemon weight > 667.3 && <= 903.0 lbs
- # value = ( value * 40 ) if wild pokemon weight > 903.0 lbs
- # HeavyBall 2 # Designed By Dekita
- # <heavyball2>
- # value = 0.0 if wild pokemon weight > 903.0 lbs
- # value = ( value * 20 ) if wild pokemon weight > 667.3 && <= 903.0 lbs
- # value = ( value * 30 ) if wild pokemon weight > 451.1 && <= 677.3 lbs
- # value = ( value * 40 ) if wild pokemon weight <= 451.1 lbs
- # FastBall
- # <fastball>
- # value * 4.0 if wild pokemon has base speed stat of 100 or more
- # RepeatBall
- # <repeatball>
- # value * 3.0 if pokemon already captured
- # Timer Ball
- # <timerball>
- # Calculated as (number of turns completed in battle + 10) / 100, maximum 4.0
- # Nest Ball
- # <nestball>
- # Calculated as (40 - wild Pokemon's level) / 10, minimum 1
- # Net Ball
- # <netball>
- # value * 3.0 if wild pokemon is water or bug type
- # Dive Ball
- # <diveball>
- # value * 3.5 if pokemon is encountered during "fish/dive/surf"
- # Quick Ball
- # <quickball>
- # value * 4.0 if used on the first turn of battle
- # Dusk Ball
- # <duskball>
- # value * 3.5 if pokemon is encountered in a cave or at night
- # Retroball - Designed By Rief @ http://w11.zetaboards.com/RMParadise
- # <retroball>
- # For catching Pokemon from older generations, rates:
- # value *= 4.0 if First gen Pokemon
- # value *= 3.0 if Second gen Pokemon
- # value *= 2.0 if Third gen Pokemon
- # value *= 1.5 if Fourth gen Pokemon
- # value *= 0.5 if Fifth gen Pokemon
- # Discovery Ball. Designed By Hyde @ http://w11.zetaboards.com/RMParadise
- # <discoveryball>
- # Does the same thing as the retro, but backwards.
- # 5th gen would be value *= 4.0
- # 1st gen would be value *= 0.5 .
- # Legend Ball. Designed By Hyde @ http://w11.zetaboards.com/RMParadise
- # <legendaryball>
- # value *= 10.0 if legendary pokemon
- # STACKABLE EFFECTS
- # <hp heal ball>
- # Heals HP
- # <mp heal ball>
- # Heals MP
- # <state heal ball>
- # Heals States
- # <shiny ball>
- # Turns captures pokemon into a shiny (requires my shiny script )
- # <boost iv ball>
- # Boosts iv value (requires my actor natures script)
- # <max iv ball>
- # Max iv value (requires my actor natures script)
- #==============================================================================
- module DataManager
- #==============================================================================
- class <<self; alias load_database_Poké_Capt_more_balls load_database; end
- def self.load_database
- load_database_Poké_Capt_more_balls
- load_notetags_Poké_Capt_more_balls
- end
- def self.load_notetags_Poké_Capt_more_balls
- groups = [$data_items]
- for group in groups
- for obj in group
- next if obj.nil?
- obj.load_notetags_Poké_Capt_more_balls
- end
- end
- end
- end # DataManager
- #==============================================================================
- class Game_Party < Game_Unit
- #==============================================================================
- alias pbeffzz get_pokeball_aftermod
- def get_pokeball_aftermod(actor_id)
- pbeffzz(actor_id)
- _GA = $game_actors[actor_id]
- _ITEM = $game_temp.pokeball_used
- return if _ITEM == ( [] || nil )
- pokeball_housing_type(_GA, _ITEM)
- pokeball_hp_heal(_GA) if _ITEM.pokeball_after_effects[0]
- pokeball_mp_heal(_GA) if _ITEM.pokeball_after_effects[1]
- pokeball_state_heal(_GA) if _ITEM.pokeball_after_effects[2]
- pokeball_shiny_mod(_GA) if _ITEM.pokeball_after_effects[3]
- pokeball_boost_iv(_GA) if _ITEM.pokeball_after_effects[4]
- pokeball_max_iv(_GA) if _ITEM.pokeball_after_effects[5]
- $game_temp.pokeball_used = []
- end
- def pokeball_housing_type(actor, item)
- actor.pokemons_pokeball = item
- end
- def pokeball_hp_heal(actor)
- actor.hp = actor.mhp
- end
- def pokeball_mp_heal(actor)
- actor.mp = actor.mmp
- end
- def pokeball_state_heal(actor)
- actor.clear_states
- end
- def pokeball_shiny_mod(actor)
- actor.setup_shiny
- end
- def pokeball_boost_iv(actor)
- 8.times {|i|
- actor.init_ivs[i] += 5
- actor.init_ivs[i] = 31 if actor.init_ivs[i] >= 31
- }
- end
- def pokeball_max_iv(actor)
- 8.times { |i| actor.init_ivs[i] = 31 }
- end
- end
- #==============================================================================
- class RPG::UsableItem < RPG::BaseItem
- #==============================================================================
- #attr_accessor :capture_item
- #attr_accessor :pokeball_capt_rate
- attr_accessor :pokeball_after_effects
- def load_notetags_Poké_Capt_more_balls
- @pokeball_after_effects = []
- @pokeball_after_effects[0] = false # heal hp
- @pokeball_after_effects[1] = false # heal mp
- @pokeball_after_effects[2] = false # heal states
- @pokeball_after_effects[3] = false # turn into shiny
- @pokeball_after_effects[4] = false # boosts iv value
- @pokeball_after_effects[5] = false # max iv value
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when /<levelball>/i
- @pokeball_effect = [true, 0]
- when /<lureball>/i
- @pokeball_effect = [true, 1]
- when /<loveball>/i
- @pokeball_effect = [true, 2]
- when /<heavyball>/i
- @pokeball_effect = [true, 3]
- when /<fastball>/i
- @pokeball_effect = [true, 4]
- when /<repeatball>/i
- @pokeball_effect = [true, 5]
- when /<timerball>/i
- @pokeball_effect = [true, 6]
- @capture_item = true
- when /<nestball>/i
- @pokeball_effect = [true, 7]
- @capture_item = true
- when /<netball>/i
- @pokeball_effect = [true, 8]
- when /<diveball>/i
- @pokeball_effect = [true, 9]
- when /<quickball>/i
- @pokeball_effect = [true, 10]
- when /<duskball>/i
- @pokeball_effect = [true, 11]
- when /<retroball>/i
- @pokeball_effect = [true, 12]
- when /<discoveryball>/i
- @pokeball_effect = [true, 13]
- when /<legendaryball>/i
- @pokeball_effect = [true, 14]
- when /<heavyball2>/i
- @pokeball_effect = [true, 15]
- # pokeball after effects
- when /<hp heal ball>/i
- @pokeball_after_effects[0] = true
- when /<mp heal ball>/i
- @pokeball_after_effects[1] = true
- when /<state heal ball>/i
- @pokeball_after_effects[2] = true
- when /<shiny ball>/i
- @pokeball_after_effects[3] = true
- when /<boost iv ball>/i
- @pokeball_after_effects[4] = true
- when /<max iv ball>/i
- @pokeball_after_effects[5] = true
- end
- } # self.note.split
- #---
- end
- end # RPG::Enemy
- #==============================================================================
- class Scene_Battle < Scene_Base
- #==============================================================================
- # Overwrite Method
- def get_pokeball_capture_rate(target, item)
- value = item.pokeball_capt_rate
- if item.pokeball_effect[0]
- case item.pokeball_effect[1]
- when 0 # level ball
- value = level_ball__values(value, target, item)
- when 1 # lure ball
- value = lure_ball__values(value, target, item)
- when 2 # love ball
- value = love_ball__values(value, target, item)
- when 3 # heavyball
- value = heavy_ball__values(value, target, item)
- when 4 # fast ball
- value = fast_ball__values(value, target, item)
- when 5 # repeat ball
- value = repeat_ball__values(value, target, item)
- when 6 # timer ball
- value = timer_ball__values(value, target, item)
- when 7 # nest ball
- value = nest_ball__values(value, target, item)
- when 8 # net ball
- value = net_ball__values(value, target, item)
- when 9 # dive ball
- value = dive_ball__values(value, target, item)
- when 10 # quick ball
- value = quick_ball__values(value, target, item)
- when 11 # dusk ball
- value = dusk_ball__values(value, target, item)
- when 12 # retro ball
- value = retro_ball__values(value, target, item)
- when 13 # discovery ball
- value = discovery_ball__values(value, target, item)
- when 14 # legendary ball
- value = legendary_ball__values(value, target, item)
- when 15 # heavyball 2
- value = heavy_ball_2_values(value, target, item)
- end
- end
- p "value= #{value}"
- return value
- end
- def level_ball__values(value, target, item)
- battler_lvl = $game_party.battle_members[0].level
- value *= 1.0 if battler_lvl <= target.level
- value *= 2.0 if battler_lvl >= target.level && (battler_lvl/2) <= target.level
- value *= 4.0 if (battler_lvl/4) >= target.level && (battler_lvl/8) <= target.level
- value *= 8.0 if (battler_lvl/8) >= target.level
- return value
- end
- def lure_ball__values(value, target, item)
- value *= 3.0 if $game_party.fishing
- return value
- end
- def love_ball__values(value, target, item)
- battler_gender = $game_party.battle_members[0].gender
- battler_species = $game_party.battle_members[0].species
- value *= 8.0 if !(battler_gender == target.gender) && battler_species == target.species
- return value
- end
- def heavy_ball__values(value, target, item)
- value -= value if target.weight <= 451.1
- value *= 20.0 if target.weight > 451.1 && target.weight <= 677.3
- value *= 30.0 if target.weight > 677.3 && target.weight <= 903.0
- value *= 40.0 if target.weight > 903.0
- return value
- end
- def fast_ball__values(value, target, item)
- value *= 4 if $data_enemies[target.enemy_id].params[6] >= 100
- return value
- end
- def repeat_ball__values(value, target, item)
- value *= 3.0 if pokemon_already_captured?(target.pokemon_id)
- return value
- end
- def timer_ball__values(value, target, item)
- tc = @battle_turn_count
- value = ((tc * 10).to_f / 100).to_f
- value = 4.0 if value > 4.0
- return value
- end
- def nest_ball__values(value, target, item)
- value = (40 - target.level / 10).to_f
- value = 1.0 if value < 1.0
- return value
- end
- def net_ball__values(value, target, item)
- value *= 3.0 if do_types_checker(target)
- return value
- end
- def do_types_checker(target)
- return true if target.type[0] == "water"
- return true if target.type[0] == "bug"
- return true if target.type[1] == "water"
- return true if target.type[1] == "bug"
- return false
- end
- def dive_ball__values(value, target, item)
- fish = $game_party.fishing
- dive = $game_party.diving
- surf = $game_party.surfing
- value *= 3.5 if (fish || dive || surf)
- return value
- end
- def quick_ball__values(value, target, item)
- value *= 4.0 if @battle_turn_count == 0
- return value
- end
- def dusk_ball__values(value, target, item)
- cave = $game_party.in_cave
- night = $game_system.night_time
- value *= 3.5 if (cave || night)
- return value
- end
- def retro_ball__values(value, target, item)
- p "Retro ball activated"
- case target.generation_id.to_i
- when 1
- return value *= 4.0
- when 2
- return value *= 3.0
- when 3
- return value *= 2.0
- when 4
- return value *= 1.5
- when 5
- return value *= 0.5
- else
- return value = 0.0
- end
- end
- def discovery_ball__values(value, target, item)
- p "Disco ball activated"
- case target.generation_id.to_i
- when 1
- return value *= 0.5
- when 2
- return value *= 1.5
- when 3
- return value *= 2.0
- when 4
- return value *= 3.0
- when 5
- return value *= 4.0
- else
- return value = 0.0
- end
- end
- def legendary_ball__values(value, target, item)
- p "Legend ball activated"
- return value *= 10.0 if target.legendary
- return value
- end
- def heavy_ball_2_values(value, target, item)
- value -= value if target.weight > 903.0
- value *= 20.0 if target.weight > 677.3 && target.weight <= 903.0
- value *= 30.0 if target.weight > 451.1 && target.weight <= 677.3
- value *= 40.0 if target.weight <= 451.1
- return value
- end
- end
- #===============================================================================#
- # - SCRIPT END - #
- #===============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement