Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit f85ab62da7dc764a52e00407539a88e503e6087b
- Author: Martin Griffin
- Date: Wed Jan 24 07:51:22 2018 +0000
- Add mutually exclusive Pokémon
- Set `Exclusive=True` in PBS/pokemon.txt to limit all of those Pokémon to
- one per party. For example setting it for Mew and Mewtwo means the
- player can have either Mew, Mewtwo or neither in the party but not both.
- Note that @exclusive is only set on new Pokémon, so if you already have
- a Pokémon that should be exclusive in your save file *it will not be*.
- diff --git a/Data/Scripts.rxdata b/Data/Scripts.rxdata
- index a6e06d6..9966313 100644
- --- a/Data/Scripts.rxdata
- +++ b/Data/Scripts.rxdata
- @@ -72804,6 +72804,7 @@ # PokeBattle_Pokemon.rb
- attr_accessor(:shinyflag) # Forces the shininess (true/false)
- attr_accessor(:ribbons) # Array of ribbons
- attr_accessor :cool,:beauty,:cute,:smart,:tough,:sheen # Contest stats
- + attr_accessor(:exclusive) # Mutually exclusive, i.e. one-per-party
- EVLIMIT = 510 # Max total EVs
- EVSTATLIMIT = 252 # Max EVs that a single stat can have
- @@ -73722,6 +73723,8 @@ # PokeBattle_Pokemon.rb
- dexdata = pbOpenDexData
- pbDexDataOffset(dexdata,self.fSpecies,19)
- @happiness = dexdata.fgetb
- + pbDexDataOffset(dexdata,self.fSpecies,59)
- + @exclusive = dexdata.fgetb != 0
- dexdata.close
- if withMoves
- self.resetMoves
- @@ -86922,6 +86925,13 @@ # PScreen_PokemonStorage.rb
- pbDisplay(_INTL("Your party's full!"))
- return false
- end
- + exclusive = pbPartyExclusive
- + pkmn = heldpoke || @storage[box,index]
- + if pkmn.exclusive && exclusive
- + pbDisplay(_INTL("{1} cannot be in the party with {2}.", pkmn.name, exclusive.name))
- + return false
- + end
- +
- @scene.pbWithdraw(selected,heldpoke,@storage.party.length)
- if heldpoke
- @storage.pbMoveCaughtToParty(heldpoke)
- @@ -86996,6 +87006,11 @@ # PScreen_PokemonStorage.rb
- pbDisplay("Please remove the mail.")
- return
- end
- + exclusive = pbPartyExclusive
- + if box==-1 && @heldpkmn.exclusive && exclusive
- + pbDisplay(_INTL("{1} cannot be in the party with {2}.", @heldpkmn.name, exclusive.name))
- + return
- + end
- if box>=0
- @heldpkmn.heal
- @heldpkmn.formTime = nil if @heldpkmn.respond_to?("formTime") && @heldpkmn.formTime
- @@ -87023,6 +87038,11 @@ # PScreen_PokemonStorage.rb
- pbDisplay("Please remove the mail.")
- return false
- end
- + exclusive = pbPartyExclusive
- + if box==-1 && @heldpkmn.exclusive && exclusive && exclusive != @storage[box,index]
- + pbDisplay(_INTL("{1} cannot be in the party with {2}.", heldpkmn.name, exclusive.name))
- + return
- + end
- @scene.pbSwap(selected,@heldpkmn)
- if box>=0
- @heldpkmn.heal
- @@ -101850,6 +101870,15 @@ # PSystem_PokemonUtilities.rb
- return !$Trainer || ($Trainer.party.length==6 && $PokemonStorage.full?)
- end
- +def pbPartyExclusive
- + if $Trainer
- + for pkmn in $Trainer.party
- + return pkmn if pkmn.exclusive
- + end
- + end
- + return nil
- +end
- +
- def pbNickname(pokemon)
- speciesname = PBSpecies.getName(pokemon.species)
- if Kernel.pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname))
- @@ -101866,7 +101895,7 @@ # PSystem_PokemonUtilities.rb
- return
- end
- pokemon.pbRecordFirstMoves
- - if $Trainer.party.length<6
- + if $Trainer.party.length<6 && (pbPartyExclusive==nil || !pokemon.exclusive)
- $Trainer.party[$Trainer.party.length] = pokemon
- else
- oldcurbox = $PokemonStorage.currentBox
- @@ -118349,7 +118378,7 @@ # Compiler.rb
- # Compile Pokémon
- #===============================================================================
- def pbCompilePokemonData
- - # Free bytes: 0, 1, 59-75
- + # Free bytes: 0, 1, 60-75
- # (Some bytes are used only by forms)
- sections = []
- requiredtypes = {
- @@ -118394,7 +118423,8 @@ # Compiler.rb
- "WildItemCommon" => [48,"E",PBItems],
- "WildItemUncommon" => [50,"E",PBItems],
- "WildItemRare" => [52,"E",PBItems],
- - "Incense" => [54,"E",PBItems]
- + "Incense" => [54,"E",PBItems],
- + "Exclusive" => [59,"b"],
- }
- currentmap = -1
- dexdatas = []
- @@ -118479,6 +118509,9 @@ # Compiler.rb
- when "S"
- value = secvalue
- secvalue = ""
- + when "b"
- + value = csvBoolean!(secvalue,key) ? 1 : 0
- + bytes = 1
- end
- case key
- when "Name"
Advertisement
Add Comment
Please, Sign In to add comment