Advertisement
TechSkylander1518

PhoenixDex Abilities Script Changes

Jun 16th, 2023 (edited)
1,061
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.49 KB | None | 0 0
  1. #Aerialist
  2. #In target, add these lines
  3. # Aromatic Mist, Helping Hand, Hold Hands
  4. GameData::Target.register({
  5.   :id               => :Ally,
  6.   :name             => _INTL("Ally"),
  7.   :num_targets      => 1,
  8.   :long_range       => true
  9. })
  10.  
  11. # Acupressure
  12. GameData::Target.register({
  13.   :id               => :UserOrAlly,
  14.   :name             => _INTL("User or Ally"),
  15.   :num_targets      => 1,
  16.   :long_range       => true
  17. })
  18.  
  19. # Petal Dance, Outrage, Struggle, Thrash, Uproar
  20. GameData::Target.register({
  21.   :id               => :RandomFoe,
  22.   :name             => _INTL("Random Foe"),
  23.   :num_targets      => 1,
  24.   :targets_foe      => true,
  25.   :long_range       => true
  26. })
  27.  
  28. GameData::Target.register({
  29.   :id               => :AllOthers,
  30.   :name             => _INTL("All Others"),
  31.   :num_targets      => 2,
  32.   :targets_foe      => true,
  33.   :long_range       => true
  34. })
  35.      
  36. #In Battle_ActionAttacksPriority, find this line:
  37. case target_data.id
  38. #and change it to:
  39.     target = target_data.id
  40.     #It's unintuitive, but this is checked with idxTarget rather than idxUser?
  41.     if @battlers[idxTarget].hasActiveAbility?(:AERIALIST)
  42.       target = target.to_s
  43.       target.slice!("Near")
  44.       target = target.to_sym
  45.     end
  46.     case target
  47. #In Battler_UseMoveTargeting, find this line
  48.     case move.pbTarget(user).id   # Curse can change its target type
  49. #and change it to:
  50.     target = move.pbTarget(user).id   # Curse can change its target type
  51.     if user.hasActiveAbility?(:AERIALIST)
  52.       target = target.to_s
  53.       target.slice!("Near")
  54.       target = target.to_sym
  55.     end
  56.     case target
  57. #In Scene_ChooseCommands, find BOTH instances of this line:
  58. case target_data.id
  59. #and in both locations, replace it with this
  60.     target = target_data.id
  61.     if @battle.battlers[idxBattler].hasActiveAbility?(:AERIALIST)
  62.       target = target.to_s
  63.       target.slice!("Near")
  64.       target = target.to_sym
  65.     end
  66.     case target
  67.  
  68.  
  69.  
  70. #Frozen Armor
  71. #In script section Battle_Battler, find this line:
  72.     return false if hasActiveAbility?([:OVERCOAT, :ICEBODY, :SNOWCLOAK])
  73. #Add :FROZENARMOR to the list, like so
  74.     return false if hasActiveAbility?([:OVERCOAT, :ICEBODY, :SNOWCLOAK, :FROZENARMOR])
  75. #In script section AI_Move_Utilities, under this line
  76.       when :GRASS
  77.         return true if target.hasActiveAbility?(:SAPSIPPER)
  78. #Add
  79.       when :ICE
  80.         return true if target.hasActiveAbility?(:FROZENARMOR)
  81.  
  82. #Sidestep - Avoids traps and hazards when entering battle.
  83. #Go to this line in Battle_ActionSwitching
  84.       pbEntryHazards(b)
  85. #And change it to
  86.       pbEntryHazards(b) unless b.hasActiveAbility?(:SIDESTEP)
  87.  
  88.  
  89. #Spirit Call
  90. #In Battler_UseMoveTargeting, under this line
  91.     targets = pbChangeTargetByAbility(:STORMDRAIN, :WATER, move, user, targets, priority, nearOnly)
  92. add
  93.     targets = pbChangeTargetByAbility(:SPIRITCALL, :GHOST, move, user, targets, priority, nearOnly)
  94. #In AI_Move_Utilities, under this section
  95.       when :FIRE
  96.         return true if target.hasActiveAbility?(:FLASHFIRE)
  97. #Add
  98.       when :GHOST
  99.         return true if target.hasActiveAbility?(:SPIRITCALL)
  100. #In AI_Move_EffectScores_3, under this line
  101.            (b.hasActiveAbility?(:LIGHTNINGROD) && move.pbCalcType == :ELECTRIC) ||
  102. #add
  103.            (b.hasActiveAbility?(:SPIRITCALL) && move.pbCalcType == :GHOST) ||
  104.  
  105.  
  106.  
  107. #Tough Hide - Thick skin prevents extra side-effects on contact.
  108. #In Battle_Battler
  109.   def affectedByContactEffect?(showMsg = false)
  110.     return false if fainted?
  111.     if hasActiveItem?(:PROTECTIVEPADS)
  112.       @battle.pbDisplay(_INTL("{1} protected itself with the {2}!", pbThis, itemName)) if showMsg
  113.       return false
  114.     end
  115.     return true
  116.   end
  117. #Change it to
  118.   def affectedByContactEffect?(showMsg = false)
  119.     return false if fainted?
  120.     if hasActiveItem?(:PROTECTIVEPADS)
  121.       @battle.pbDisplay(_INTL("{1} protected itself with the {2}!", pbThis, itemName)) if showMsg
  122.       return false
  123.     end
  124.     if hasActiveAbility?(:TOUGHHIDE)
  125.       if showMsg
  126.         @battle.pbShowAbilitySplash(self)
  127.         if Battle::Scene::USE_ABILITY_SPLASH
  128.           @battle.pbDisplay(_INTL("{1} is unaffected!", pbThis))
  129.         else
  130.           @battle.pbDisplay(_INTL("{1} is unaffected because of its {2}!", pbThis, abilityName))
  131.         end
  132.         @battle.pbHideAbilitySplash(self)
  133.       end
  134.       @battle.pbDisplay(_INTL("{1} protected itself with its {2}!", pbThis, abilityName)) if showMsg
  135.       return false
  136.     end
  137.     return true
  138.   end
  139.  
  140. #All the overworld encounter abilities
  141. #Script section Overworld_WildEncounters, find this line:
  142.         when :STENCH, :WHITESMOKE, :QUICKFEET
  143. #Add :ECLIPSEVEIL to the list, like so
  144.         when :STENCH, :WHITESMOKE, :QUICKFEET, :ECLIPSEVEIL
  145.  
  146. #Script section Overworld_WildEncounters, under
  147.         when :SANDVEIL
  148.           if GameData::Weather.get($game_screen.weather_type).category == :Sandstorm
  149.             encounter_chance /= 2
  150.             min_steps_needed *= 2
  151.           end
  152. #Add:
  153.         when :GRASSCLOAK
  154.           terrain = $game_map.terrain_tag($game_player.x, $game_player.y)
  155.           if terrain.land_wild_encounters || terrain.shows_grass_rustle
  156.             encounter_chance /= 2
  157.             min_steps_needed *= 2
  158.           end
  159.  
  160. #Under this section
  161. when :STORMDRAIN
  162.         favored_type = :WATER if Settings::MORE_ABILITIES_AFFECT_WILD_ENCOUNTERS &&
  163.                                  GameData::Type.exists?(:WATER) && rand(100) < 50
  164. #add
  165. when :SPIRITCALL
  166.         favored_type = :GHOST if GameData::Type.exists?(:GHOST) && rand(100) < 50
  167.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement