# Cherrim
if isConst?(self.species,PBSpecies,:CHERRIM)
if self.hasWorkingAbility(:FLOWERGIFT) && (@battle.pbWeather==PBWeather::SUNNYDAY ||
@battle.pbWeather==PBWeather::HARSHSUN)
if self.form!=1 && !self.hasWorkingItem(:UTILITYUMBRELLA)
self.form=1; transformed=true
elsif self.form==1 && self.hasWorkingItem(:UTILITYUMBRELLA)
self.form=0; transformed=true
end
else
if self.form!=0 || self.hasWorkingItem(:UTILITYUMBRELLA) && self.form==1
self.form=0; transformed=true
end
end
end
def pbPrimordialWeather
# End Primordial Sea, Desolate Land, Delta Stream
hasabil=false
case @weather
when PBWeather::HEAVYRAIN
for i in 0...4
if isConst?(@battlers[i].ability,PBAbilities,:PRIMORDIALSEA) &&
!@battlers[i].fainted?
hasabil=true; break
end
end
if !hasabil
@weather=0
pbDisplayBrief("The heavy rain has lifted!")
end
when PBWeather::HARSHSUN
for i in 0...4
if isConst?(@battlers[i].ability,PBAbilities,:DESOLATELAND) &&
!@battlers[i].fainted?
hasabil=true; break
end
end
if !hasabil
@weather=0
pbDisplayBrief("The harsh sunlight faded!")
end
when PBWeather::STRONGWINDS
for i in 0...4
if isConst?(@battlers[i].ability,PBAbilities,:DELTASTREAM) &&
!@battlers[i].fainted?
hasabil=true; break
end
end
if !hasabil
@weather=0
pbDisplayBrief("The mysterious air current has dissipated!")
end
end
end
Mints' Mechanic:
Spoiler:
In item.txt,add ("XXX" will be your last numbers):
Spoiler:
XXX,LONELYMINT,Lonely Mint,Lonely Mints,1,10,"When a Pokémon smells this mint, its Attack will grow more easily, but its Defense will grow more slowly.",1,0,0,
XXX,ADAMANTMINT,Adamant Mint,Adamant Mints,1,10,"When a Pokémon smells this mint, its Attack will grow more easily, but its Sp. Atk will grow more slowly.",1,0,0,
XXX,NAUGHTYMINT,Naughty Mint,Naughty Mints,1,10,"When a Pokémon smells this mint, its Attack will grow more easily, but its Sp. Def will grow more slowly.",1,0,0,
XXX,BRAVEMINT,Brave Mint,Brave Mints,1,10,"When a Pokémon smells this mint, its Attack will grow more easily, but its Speed will grow more slowly.",1,0,0,
XXX,BOLDMINT,Bold Mint,Bold Mints,1,10,"When a Pokémon smells this mint, its Defense will grow more easily, but its Attack will grow more slowly.",1,0,0,
XXX,IMPISHMINT,Impish Mint,Impish Mints,1,10,"When a Pokémon smells this mint, its Defense will grow more easily, but its Sp. Atk will grow more slowly.",1,0,0,
XXX,LAXMINT,Lax Mint,Lax Mints,1,10,"When a Pokémon smells this mint, its Defense will grow more easily, but its Sp. Def will grow more slowly.",1,0,0,
XXX,RELAXEDMINT,Relaxed Mint,Relaxed Mints,1,10,"When a Pokémon smells this mint, its Defense will grow more easily, but its Speed will grow more slowly.",1,0,0,
XXX,MODESTMINT,Modest Mint,Modest Mints,1,10,"When a Pokémon smells this mint, its Sp. Atk will grow more easily, but its Attack will grow more slowly.",1,0,0,
XXX,MILDMINT,Mild Mint,Mild Mints,1,10,"When a Pokémon smells this mint, its Sp. Atk will grow more easily, but its Defense will grow more slowly.",1,0,0,
XXX,RASHMINT,Rash Mint,Rash Mints,1,10,"When a Pokémon smells this mint, its Sp. Atk will grow more easily, but its Sp. Def will grow more slowly.",1,0,0,
XXX,QUIETMINT,Quiet Mint,Quiet Mints,1,10,"When a Pokémon smells this mint, its Sp. Atk will grow more easily, but its Speed will grow more slowly.",1,0,0,
XXX,CALMMINT,Calm Mint,Calm Mints,1,10,"When a Pokémon smells this mint, its Sp. Def will grow more easily, but its Attack will grow more slowly.",1,0,0,
XXX,GENTLEMINT,Gentle Mint,Gentle Mints,1,10,"When a Pokémon smells this mint, its Sp. Def will grow more easily, but its Defense will grow more slowly.",1,0,0,
XXX,CAREFULMINT,Careful Mint,Careful Mints,1,10,"When a Pokémon smells this mint, its Sp. Def will grow more easily, but its Speed will grow more slowly.",1,0,0,
XXX,SASSYMINT,Sassy Mint,Sassy Mints,1,10,"When a Pokémon smells this mint, its Sp. Def will grow more easily, but its Sp. Atk will grow more slowly.",1,0,0,
XXX,TIMIDMINT,Timid Mint,Timid Mints,1,10,"When a Pokémon smells this mint, its Speed will grow more easily, but its Attack will grow more slowly.",1,0,0,
XXX,HASTYMINT,Hasty Mint,Hasty Mints,1,10,"When a Pokémon smells this mint, its Speed will grow more easily, but its Defense will grow more slowly.",1,0,0,
XXX,JOLLYMINT,Jolly Mint,Jolly Mints,1,10,"When a Pokémon smells this mint, its Speed will grow more easily, but its Sp. Atk will grow more slowly.",1,0,0,
XXX,NAIVEMINT,Naive Mint,Naive Mints,1,10,"When a Pokémon smells this mint, its Speed will grow more easily, but its Sp. Def will grow more slowly.",1,0,0,
XXX,SERIOUSMINT,Serious Mint,Serious Mints,1,10,"When a Pokémon smells this mint, all of its stats will grow at an equal rate.",1,0,0,
You can find the icons here but you need to change the numbers about the icons:
https://cdn.discordapp.com/attachments/511646491153137664/694183997630316594/Icons.rar
In 'PItem_Items' script, above 'def pbItemRestoreHP(pokemon,restorehp)' add a new def:
Spoiler:
Code:#=============================================================================== # Convert a Pokémon's stats #=============================================================================== def pbConvertStats(pokemon,scene,item,nature,mints) if nature==pokemon.nature || mints==pokemon.mint scene.pbDisplay(_INTL("It won't have any effect.")) return false end if scene.pbConfirm(_INTL("It might affect {1}'s stats.\nAre you sure you want to use it?",pokemon.name)) pokemon.mint=mints pokemon.calcStats scene.pbRefresh scene.pbDisplay(_INTL("{1}'s stats may have changed due to the effects of the {2}!",pokemon.name,PBItems.getName(item))) return true end end #=============================================================================== # Restore HP #=============================================================================== def pbItemRestoreHP(pokemon,restorehp)
In 'PItem_ItemEffects' script, paste below Prison Bottle's script:
Spoiler:
Code:ItemHandlers::UseOnPokemon.add(:LONELYMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::LONELY,1) }) ItemHandlers::UseOnPokemon.add(:ADAMANTMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::ADAMANT,3) }) ItemHandlers::UseOnPokemon.add(:NAUGHTYMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::NAUGHTY,4) }) ItemHandlers::UseOnPokemon.add(:BRAVEMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::BRAVE,2) }) ItemHandlers::UseOnPokemon.add(:BOLDMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::BOLD,5) }) ItemHandlers::UseOnPokemon.add(:IMPISHMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::IMPISH,8) }) ItemHandlers::UseOnPokemon.add(:LAXMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::LAX,9) }) ItemHandlers::UseOnPokemon.add(:RELAXEDMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::RELAXED,7) }) ItemHandlers::UseOnPokemon.add(:MODESTMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::MODEST,15) }) ItemHandlers::UseOnPokemon.add(:MILDMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::MILD,16) }) ItemHandlers::UseOnPokemon.add(:RASHMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::RASH,19) }) ItemHandlers::UseOnPokemon.add(:QUIETMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::QUIET,17) }) ItemHandlers::UseOnPokemon.add(:CALMMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::CALM,20) }) ItemHandlers::UseOnPokemon.add(:GENTLEMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::GENTLE,21) }) ItemHandlers::UseOnPokemon.add(:CAREFULMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::CAREFUL,23) }) ItemHandlers::UseOnPokemon.add(:SASSYMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::SASSY,22) }) ItemHandlers::UseOnPokemon.add(:TIMIDMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::TIMID,10) }) ItemHandlers::UseOnPokemon.add(:HASTYMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::HASTY,11) }) ItemHandlers::UseOnPokemon.add(:JOLLYMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::JOLLY,13) }) ItemHandlers::UseOnPokemon.add(:NAIVEMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::NAIVE,14) }) ItemHandlers::UseOnPokemon.add(:SERIOUSMINT,proc{|item,pokemon,scene| next pbConvertStats(pokemon,scene,item,PBNatures::SERIOUS,12) })
Now, in 'PokeBattle_Pokemon' script, inside 'class PokeBattle_Pokemon' add 'attr_accessor(:mint)' below 'attr_accessor :cool,:beauty,:cute,:smart,:tough,:sheen # Contest stats'
Then, above 'def speciesName', paste:
Code:################################################################################ # Other ################################################################################ # Overrides mint (Default is -1, no effect) def mint return @mint end def mint=(value) @mint=value end # Returns the species name of this Pokémon. # def speciesName # return PBSpecies.getName(@species) #end
Look for 'def calcStats' and replace 'nature=self.nature' to 'nature=(self.mint!=-1) ? self.mint : self.nature'
Find 'def initialize(species,level,player=nil,withMoves=true)' and paste '@mint = -1' above '@species = species'
Finally, to show "the correct stats" in Summary Screen, go to 'PScreen_Summary' script, and replace (or compare with yours) 'def drawPageThree' to:
Spoiler:
Code:def drawPageThree overlay = @sprites["overlay"].bitmap base = Color.new(248,248,248) shadow = Color.new(104,104,104) # Determine which stats are boosted and lowered by the Pokémon's nature nat = (@pokemon.mint!=-1) ? @pokemon.mint : @pokemon.nature statshadows = [] for i in 0...5; statshadows[i] = shadow; end if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false) natup = (nat/5).floor natdn = (nat%5).floor natureup = (@pokemon.nature/5).floor naturedn = (@pokemon.nature%5).floor statshadows[natureup] = Color.new(136,96,72) if natureup!=naturedn statshadows[naturedn] = Color.new(64,120,152) if natureup!=naturedn end # Write various bits of text textpos = [ [_INTL("HP"),292,76,2,base,shadow], [sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),462,76,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Attack"),248,120,0,base,statshadows[0]], [sprintf("%d",@pokemon.attack),456,120,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Defense"),248,152,0,base,statshadows[1]], [sprintf("%d",@pokemon.defense),456,152,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]], [sprintf("%d",@pokemon.spatk),456,184,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Sp. Def"),248,216,0,base,statshadows[4]], [sprintf("%d",@pokemon.spdef),456,216,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Speed"),248,248,0,base,statshadows[2]], [sprintf("%d",@pokemon.speed),456,248,1,Color.new(64,64,64),Color.new(176,176,176)], [_INTL("Ability"),224,284,0,base,shadow], [PBAbilities.getName(@pokemon.ability),362,284,0,Color.new(64,64,64),Color.new(176,176,176)], ] # Draw all text pbDrawTextPositions(overlay,textpos) # Draw ability description abilitydesc = pbGetMessage(MessageTypes::AbilityDescs,@pokemon.ability) drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176)) # Draw HP bar if @pokemon.hp>0 hpzone = 0 hpzone = 1 if @pokemon.hp<=(@pokemon.totalhp/2).floor hpzone = 2 if @pokemon.hp<=(@pokemon.totalhp/4).floor imagepos = [ ["Graphics/Pictures/Summary/overlay_hp",360,110,0,hpzone*6,@pokemon.hp*96/@pokemon.totalhp,6] ] pbDrawImagePositions(overlay,imagepos) end end
I tried implementing this code, but I'm getting this error whenever an opposing Pokemon faints or I run away from a wild battle.
Spoiler:
[Pokémon Essentials version 17.2]
Exception: NoMethodError
Message: undefined method `/' for nil:NilClass
PokeBattle_Pokemon:962:in `calcStats'
PokeBattle_Battler:1045:in `pbUpdate'
PokeBattle_Battler:1706:in `pbResetForm'
PokeBattle_Battle:6485:in `pbEndOfBattle'
PokeBattle_Battle:6484:in `each'
PokeBattle_Battle:6484:in `pbEndOfBattle'
PokeBattle_Battle:3906:in `pbStartBattleCore'
PokeBattle_Battle:3597:in `pbStartBattle'
PField_Battles:98:in `pbWildBattle'
PField_Battles:97:in `pbSceneStandby'
Line 962 in PokeBattle_Pokemon is this if it helps: nd5=(nature/5).floor. If I replace nature=(self.mint!=-1) ? self.mint : self.nature with its original code, I don't get an error. Does anyone know what might cause this?
I tested about battle (faint and run cases) and works fine. Double check how you added.
if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false)
natup = (nat/5).floor
natdn = (nat%5).floor
natureup = (@pokemon.nature/5).floor
naturedn = (@pokemon.nature%5).floor
statshadows[natureup] = Color.new(136,96,72) if natureup!=naturedn
statshadows[naturedn] = Color.new(64,120,152) if natureup!=naturedn
end
if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false)
natup = (@pokemon.nature/5).floor
natdn = (@pokemon.nature%5).floor
statshadows[natup] = Color.new(136,96,72) if natup!=natdn
statshadows[natdn] = Color.new(64,120,152) if natup!=natdn
end
I reviewed everything but it's still causing the same problem. I made several edits to my scripts so maybe something I did is preventing this from working properly. I realized that even if I change what I said in my last post, the same error appears when going into page 3 of the summary screen. Upon further investigation, it seems that this segment of the drawpagethree method is causing the problems, as reverting this section to its original form eliminates all errors (the only other code added in this method as far as I could tell was nat = (@pokemon.mint!=-1) ? @pokemon.mint : @pokemon.nature):
Spoiler:
The code above is the change you made, while the code below is what it previously was:Code:if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false) natup = (nat/5).floor natdn = (nat%5).floor natureup = (@pokemon.nature/5).floor naturedn = (@pokemon.nature%5).floor statshadows[natureup] = Color.new(136,96,72) if natureup!=naturedn statshadows[naturedn] = Color.new(64,120,152) if natureup!=naturedn end
Code:if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false) natup = (@pokemon.nature/5).floor natdn = (@pokemon.nature%5).floor statshadows[natup] = Color.new(136,96,72) if natup!=natdn statshadows[natdn] = Color.new(64,120,152) if natup!=natdn end
However, I don't see how this changes anything because in the edit you made, the variables natup, natdn, and nat aren't used except for defining them, as natureup and naturedn are used in the same way that natup and natdn previously were. Unless I'm missing something, don't these 2 segments essentially do the same thing?
Also I just realized that you had the prices of the mints as 10 in the PBS file, but shouldn't they be priced at 20 so they can be sold for 10 (Bulbapedia says 10 is their sell price).
I tested my tutorial installing it into a vanilla essentials and it works fine. You need to triple check what you did then.
About the price feel free to change it. o.o I just posted a base and you guys need to edit as you want.
I believe I ran into the same problem when implementing mints, which came down to testing using Pokémon initialised from before implementing. Can't remember exactly how the code works, but think new Pokémon are initialised with some default mint value, and therefore when trying to access this for old mons, it breaks. So try with newly initialised Pokemon instead and should be fine? Was at least the case for me so hopefully this helps.
Also as my first time talking on here, thanks a lot to all the contributors!
Let's start it!
In the file attached below it shows that I get a syntax error at line 3626 in PokeBattle_Battler whenever I try to playtest the game but line 3626 in the last line of the the script. Do I have to restart?
679,OCTOLOCK,Octolock,CF21,0,FIGHTING,Status,100,15,0,00,0,be,"The user locks the target in and prevents it from fleeing. This move also lowers the target's Defense and Sp. Def every turn."
Yawn = 108
BattleBond = 109
BeakBlast = 110
LaserFocus = 111
BlunderPolicy = 112
Octolock = 113
OctolockUser = 114
JawLock = 115
JawLockUser = 116
@effects[PBEffects::Ingrain] = false
@effects[PBEffects::Octolock] = false
@effects[PBEffects::OctolockUser]= -1
for i in 0...4
next if [email protected][i]
if @battle.battlers[i].effects[PBEffects::OctolockUser]==@index &&
@battle.battlers[i].effects[PBEffects::Octolock]
@battle.battlers[i].effects[PBEffects::Octolock]=false
@battle.battlers[i].effects[PBEffects::OctolockUser]=-1
end
end
@effects[PBEffects::JawLock] = false
@effects[PBEffects::JawLockUser] = -1
for i in 0...4
next if [email protected][i]
if @battle.battlers[i].effects[PBEffects::JawLockUser]==@index &&
@battle.battlers[i].effects[PBEffects::JawLock]
@battle.battlers[i].effects[PBEffects::JawLock]=false
@battle.battlers[i].effects[PBEffects::JawLockUser]=-1
end
end
################################################################################
# Lowers target's Defense and Special Defense by 1 stage at the end of each
# turn. Prevents target from retreating. (Octolock)
################################################################################
class PokeBattle_Move_CF21 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if opponent.effects[PBEffects::Octolock] ||
(opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker))
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
if USENEWBATTLEMECHANICS && opponent.pbHasType?(:GHOST)
@battle.pbDisplay(_INTL("It doesn't affect {1}...",opponent.pbThis(true)))
return -1
end
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
opponent.effects[PBEffects::OctolockUser]=attacker.index
opponent.effects[PBEffects::Octolock]=true
@battle.pbDisplay(_INTL("{1} can no longer escape because of {2}!",opponent.pbThis,@name))
return 0
end
end
if thispkmn.effects[PBEffects::Ingrain]
pbDisplayPaused(_INTL("{1} can't be switched out!",thispkmn.pbThis)) if showMessages
return false
end
if thispkmn.effects[PBEffects::Octolock]
for i in battlers
if i.pokemonIndex==thispkmn.effects[PBEffects::OctolockUser] && !i.fainted?
movename=PBMoves.getName(move)
pbDisplayPaused(_INTL("{1}'s {2} prevents switching!",thispkmn.pbThis,movename)) if showMessages
return false
end
end
end
if thispkmn.effects[PBEffects::JawLock]
for i in battlers
if i.pokemonIndex==thispkmn.effects[PBEffects::JawLockUser] && !i.fainted?
pbDisplayPaused(_INTL("{1} can't be switched out!",thispkmn.pbThis)) if showMessages
return false
end
end
end
return true if thispkmn.hasWorkingAbility(:RUNAWAY)
return false if thispkmn.effects[PBEffects::Octolock] && thispkmn.effects[PBEffects::OctolockUser]>=0
return pbCanSwitch?(idxPokemon,-1,false)
if thispkmn.effects[PBEffects::JawLock]
for i in battlers
if i.pokemonIndex==thispkmn.effects[PBEffects::JawLockUser] && !i.fainted?
return false
end
end
end
return pbCanSwitch?(idxPokemon,-1,false)
end
# Octolock
for i in priority
next if i.fainted?
if i.effects[PBEffects::Octolock]
octolock=@battlers[i.effects[PBEffects::OctolockUser]]
if octolock && !octolock.fainted?
downanim=true
if i.pbCanReduceStatStage?(PBStats::DEFENSE,i,false,self)
i.pbReduceStat(PBStats::DEFENSE,1,i,false,self,downanim)
downanim=false
end
if i.pbCanReduceStatStage?(PBStats::SPDEF,i,false,self)
i.pbReduceStat(PBStats::SPDEF,1,i,false,self,downanim)
downanim=false
end
end
end
end
# Taunt
for i in priority
next if i.fainted?
if i.effects[PBEffects::Taunt]>0
i.effects[PBEffects::Taunt]-=1
if i.effects[PBEffects::Taunt]==0
pbDisplay(_INTL("{1}'s taunt wore off!",i.pbThis))
PBDebug.log("[End of effect] #{i.pbThis} is no longer taunted")
end
end
end
but my Pokemon can still switch out and I can still flee from wild Pokemon that use it.
def pbIsMegaStone?(item) # Does NOT include Red Orb/Blue Orb
return $ItemData[item] && $ItemData[item][ITEMTYPE]==12
end
def pbIsSweet?(item) # Milcery's evolution method
return $ItemData[item] && $ItemData[item][ITEMTYPE]==13
end
XXX,STRAWBERRYSWEET,Strawberry Sweet,Strawberry Sweets,1,500,"A strawberry-shaped sweet. When a Milcery holds this, it will spin around happily.",0,0,13,
XXX,LOVESWEET,Love Sweet,Love Sweets,1,500,"A heart-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
XXX,BERRYSWEET,Berry Sweet,Berry Sweets,1,500,"A berry-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
XXX,CLOVERSWEET,Clover Sweet,Clover Sweets,1,500,"A clover-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
XXX,FLOWERSWEET,Flower Sweet,Flower Sweets,1,500,"A flower-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
XXX,STARSWEET,Star Sweet,Star Sweets,1,500,"A star-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
XXX,RIBBONSWEET,Ribbon Sweet,Ribbon Sweets,1,500,"A ribbon-shaped sweet. When a Milcery holds this, it spins around happily.",0,0,13,
#-------------------------------
[868]
Name=Milcery
InternalName=MILCERY
Type1=FAIRY
BaseStats=45,40,40,34,50,61
GenderRate=AlwaysFemale
GrowthRate=Medium
BaseEXP=54
EffortPoints=0,0,0,0,0,1
Rareness=200
Happiness=50
Abilities=SWEETVEIL
HiddenAbility=AROMAVEIL
Moves=1,TACKLE,1,AROMATICMIST,5,SWEETKISS,10,SWEETSCENT,15,DRAININGKISS,20,AROMATHERAPY,25,ATTRACT,30,ACIDARMOR,35,DAZZLINGGLEAM,40,RECOVER,45,MISTYTERRAIN,50,ENTRAINMENT
EggMoves=BABYDOLLEYES,LASTRESORT
Compatibility=Fairy,Amorphous
StepsToHatch=5396
Height=0.2
Weight=0.3
Color=White
Shape=0
Habitat=Urban
RegionalNumbers=0,0,0,0,0,0,0,59,868
Kind=Cream
Pokedex=This Pokémon was born from sweet-smelling particles in the air. Its body is made of cream.
BattlerPlayerY=22
BattlerEnemyY=22
BattlerAltitude=1
Evolutions=ALCREMIE,HoldSweetItem,
#-------------------------------
[869]
Name=Alcremie
InternalName=ALCREMIE
Type1=FAIRY
BaseStats=65,60,75,64,110,121
GenderRate=AlwaysFemale
GrowthRate=Medium
BaseEXP=173
EffortPoints=0,0,0,0,0,2
Rareness=100
Happiness=50
Abilities=SWEETVEIL
HiddenAbility=AROMAVEIL
Moves=0,DECORATE,1,DECORATE,1,TACKLE,1,AROMATICMIST,1,SWEETKISS,1,SWEETSCENT,15,DRAININGKISS,20,AROMATHERAPY,25,ATTRACT,30,ACIDARMOR,35,DAZZLINGGLEAM,40,RECOVER,45,MISTYTERRAIN,50,ENTRAINMENT
EggMoves=BABYDOLLEYES,LASTRESORT
Compatibility=Fairy,Amorphous
StepsToHatch=5396
Height=0.3
Weight=0.5
Color=White
Shape=5
Habitat=Urban
RegionalNumbers=0,0,0,0,0,0,0,60,869
Kind=Cream
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
FormName=Vanilla Cream
BattlerPlayerY=16
BattlerEnemyY=25
BattlerAltitude=0
Evolutions=
#-------------------------------
#-------------------------------
[ALCREMIE-1]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-2]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-3]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-4]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-5]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-6]
FormName=Vanilla Cream
Color=White
Pokedex=When Alcremie is content, the cream it secretes from its hands becomes sweeter and richer.
#-------------------------------
[ALCREMIE-7]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-8]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-9]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-10]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-11]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-12]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-13]
FormName=Ruby Cream
Color=Pink
Pokedex=The moment it evolved, it took on a sweet and tart flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-14]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-15]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-16]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-17]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-18]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-19]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-20]
FormName=Matcha Cream
Color=Green
Pokedex=The moment it evolved, it took on an aromatic flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-21]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-22]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-23]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-24]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-25]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-26]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-27]
FormName=Mint Cream
Color=Blue
Pokedex=The moment it evolved, it took on a refreshing flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-28]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-29]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-30]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-31]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-32]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-33]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-34]
FormName=Lemon Cream
Color=Yellow
Pokedex=The moment it evolved, it took on a sour flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-35]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-36]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-37]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-38]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-39]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-40]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-41]
FormName=Salted Cream
Pokedex=The moment it evolved, it took on a salty flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-42]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-43]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-44]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-45]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-46]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-47]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-48]
FormName=Ruby Swirl
Color=Pink
Pokedex=The moment it evolved, it took on a mixed flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-49]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-50]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-51]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-52]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-53]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-54]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-55]
FormName=Caramel Swirl
Color=Brown
Pokedex=The moment it evolved, it took on a bitter flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-56]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-57]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-58]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-59]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-60]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-61]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
[ALCREMIE-62]
FormName=Rainbow Swirl
Color=Yellow
Pokedex=The moment it evolved, it took on a complex flavor. This is because of the way its cells spontaneously shifted during evolution.
#-------------------------------
HappinessMoveType = 30
HoldSweetItem = 31
EVONAMES=["Unknown",
"Happiness","HappinessDay","HappinessNight","Level","Trade",
"TradeItem","Item","AttackGreater","AtkDefEqual","DefenseGreater",
"Silcoon","Cascoon","Ninjask","Shedinja","Beauty",
"ItemMale","ItemFemale","DayHoldItem","NightHoldItem","HasMove",
"HasInParty","LevelMale","LevelFemale","Location","TradeSpecies",
"LevelDay","LevelNight","LevelDarkInParty","LevelRain","HappinessMoveType",
"HoldSweetItem"
]
# 0 = no parameter
# 1 = Positive integer
# 2 = Item internal name
# 3 = Move internal name
# 4 = Species internal name
# 5 = Type internal name
EVOPARAM=[0, # Unknown (do not use)
0,0,0,1,0, # Happiness, HappinessDay, HappinessNight, Level, Trade
2,2,1,1,1, # TradeItem, Item, AttackGreater, AtkDefEqual, DefenseGreater
1,1,1,1,1, # Silcoon, Cascoon, Ninjask, Shedinja, Beauty
2,2,2,2,3, # ItemMale, ItemFemale, DayHoldItem, NightHoldItem, HasMove
4,1,1,1,4, # HasInParty, LevelMale, LevelFemale, Location, TradeSpecies
1,1,1,1,5, # LevelDay, LevelNight, LevelDarkInParty, LevelRain, HappinessMoveType
0 # HoldSweetItem
]
removeItem = false
createSpecies = pbCheckEvolutionEx(@pokemon){|pokemon,evonib,level,poke|
case evonib
when PBEvolution::Shedinja
next poke if $PokemonBag.pbHasItem?(getConst(PBItems,:POKEBALL))
when PBEvolution::TradeItem,PBEvolution::DayHoldItem,PBEvolution::NightHoldItem,PBEvolution::HoldSweetItem
removeItem = true if poke==@newspecies # Item is now consumed
end
next -1
when PBEvolution::Beauty # Feebas
return poke if pokemon.beauty>=level
when PBEvolution::Trade, PBEvolution::TradeItem, PBEvolution::TradeSpecies
return -1
when PBEvolution::HoldSweetItem
pokemon.form=$game_variables[ALCREMIE_FORM]
return poke if $game_switches[STARTING_OVER_SWITCH]
return -1
end
def pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item)
def update
# Remember whether or not moving in local variables
last_moving = moving?
# If moving, event running, move route forcing, and message window
# display are all not occurring
dir=Input.dir4
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing or
$PokemonTemp.miniupdate
# Move player in the direction the directional button is being pressed
if dir==@lastdir && Graphics.frame_count-@lastdirframe>2 and
!Input.press?(Input::L) # Milcery's evo method
case dir
when 2; move_down
when 4; move_left
when 6; move_right
when 8; move_up
end
elsif dir!=@lastdir
case dir
when 2; turn_down
when 4; turn_left
when 6; turn_right
when 8; turn_up
end
end
end
$PokemonTemp.dependentEvents.updateDependentEvents
# Returns true if it's the evening.
def self.isEvening?(time=nil)
time = pbGetTimeNow if !time
return (time.hour>=17 && time.hour<20)
end
# Returns true if it's dusk (used to Milcery's evo method only)
def self.isRainbowSwirl?(time=nil)
time = pbGetTimeNow if !time
return (time.hour>=19 && time.hour<20)
end
#===============================================================================
# * Milcery's Evolution Method -
# * Credits goes to FL, Nuri Yuri and WolfPP
#===============================================================================
ALCREMIE_FORM = 28 # Global Variable
class PokemonTemp
attr_accessor :last_directions
attr_accessor :last_spin_input
end
class Game_Player
alias old_update update
def update
pbMilceryEvoMethod
old_update
end
CLOCK_WISE_TURNS = [2,4,8,6]
TRIGO_WISE_TURNS = [2,6,8,4]
SECONDS_LIMIT = 10
SPINNING_MAX_INTERVAL = 0.6
def pbMilceryEvoMethod
return if $game_system.map_interpreter.running?
if !$PokemonTemp.last_directions
$PokemonTemp.last_directions = Array.new(Graphics.frame_rate*(SECONDS_LIMIT+SPINNING_MAX_INTERVAL),0)
end
$PokemonTemp.last_directions.shift
$PokemonTemp.last_directions.push(Input.press?(Input::L) ? @direction : $PokemonTemp.last_directions[-1]) # last one is more recent
if !Input.press?(Input::L) && $PokemonTemp.last_spin_input # input release
clock_wise_spin = getSecondsAndTurnsSpinning(CLOCK_WISE_TURNS)
clock_wise_spin_time = clock_wise_spin[0]; clock_wise_spin_turns = clock_wise_spin[1]
trigo_wise_spin = getSecondsAndTurnsSpinning(TRIGO_WISE_TURNS)
trigo_wise_spin_time = trigo_wise_spin[0]; trigo_wise_spin_turns = trigo_wise_spin[1]
if trigo_wise_spin_turns>=16 || clock_wise_spin_turns>=16
$PokemonTemp.last_directions = Array.new(Graphics.frame_rate*(SECONDS_LIMIT+SPINNING_MAX_INTERVAL),0)
for i in $Trainer.pokemonParty
if i.species==PBSpecies::MILCERY && pbIsSweet?(i.item)
evolution=nil
if trigo_wise_spin_time>10 # Rainbow Swirl
if PBDayNight.isRainbowSwirl?
case i.item
when PBItems::STRAWBERRYSWEET; evolution=56
when PBItems::BERRYSWEET; evolution=57
when PBItems::LOVESWEET; evolution=58
when PBItems::STARSWEET; evolution=59
when PBItems::CLOVERSWEET; evolution=60
when PBItems::FLOWERSWEET; evolution=61
when PBItems::RIBBONSWEET; evolution=62
end
end
elsif clock_wise_spin_time>5
if PBDayNight.isDay? # Caramel Swirl
case i.item
when PBItems::STRAWBERRYSWEET; evolution=49
when PBItems::BERRYSWEET; evolution=50
when PBItems::LOVESWEET; evolution=51
when PBItems::STARSWEET; evolution=52
when PBItems::CLOVERSWEET; evolution=53
when PBItems::FLOWERSWEET; evolution=54
when PBItems::RIBBONSWEET; evolution=55
end
elsif PBDayNight.isNight? # Lemon Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=28
when PBItems::BERRYSWEET; evolution=29
when PBItems::LOVESWEET; evolution=30
when PBItems::STARSWEET; evolution=31
when PBItems::CLOVERSWEET; evolution=32
when PBItems::FLOWERSWEET; evolution=33
when PBItems::RIBBONSWEET; evolution=34
end
end
elsif clock_wise_spin_turns>=4
if PBDayNight.isDay? # Vanilla Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=0
when PBItems::BERRYSWEET; evolution=1
when PBItems::LOVESWEET; evolution=2
when PBItems::STARSWEET; evolution=3
when PBItems::CLOVERSWEET; evolution=4
when PBItems::FLOWERSWEET; evolution=5
when PBItems::RIBBONSWEET; evolution=6
end
elsif PBDayNight.isNight? # Matcha Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=14
when PBItems::BERRYSWEET; evolution=15
when PBItems::LOVESWEET; evolution=16
when PBItems::STARSWEET; evolution=17
when PBItems::CLOVERSWEET; evolution=18
when PBItems::FLOWERSWEET; evolution=19
when PBItems::RIBBONSWEET; evolution=20
end
end
elsif trigo_wise_spin_time>5
if PBDayNight.isDay? # Ruby Swirl
case i.item
when PBItems::STRAWBERRYSWEET; evolution=42
when PBItems::BERRYSWEET; evolution=43
when PBItems::LOVESWEET; evolution=44
when PBItems::STARSWEET; evolution=45
when PBItems::CLOVERSWEET; evolution=46
when PBItems::FLOWERSWEET; evolution=47
when PBItems::RIBBONSWEET; evolution=48
end
elsif PBDayNight.isNight? # Mint Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=21
when PBItems::BERRYSWEET; evolution=22
when PBItems::LOVESWEET; evolution=23
when PBItems::STARSWEET; evolution=24
when PBItems::CLOVERSWEET; evolution=25
when PBItems::FLOWERSWEET; evolution=26
when PBItems::RIBBONSWEET; evolution=27
end
end
elsif trigo_wise_spin_turns>=4
if PBDayNight.isDay? # Ruby Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=7
when PBItems::BERRYSWEET; evolution=8
when PBItems::LOVESWEET; evolution=9
when PBItems::STARSWEET; evolution=10
when PBItems::CLOVERSWEET; evolution=11
when PBItems::FLOWERSWEET; evolution=12
when PBItems::RIBBONSWEET; evolution=13
end
elsif PBDayNight.isNight? # Salted Cream
case i.item
when PBItems::STRAWBERRYSWEET; evolution=35
when PBItems::BERRYSWEET; evolution=36
when PBItems::LOVESWEET; evolution=37
when PBItems::STARSWEET; evolution=38
when PBItems::CLOVERSWEET; evolution=39
when PBItems::FLOWERSWEET; evolution=40
when PBItems::RIBBONSWEET; evolution=41
end
end
end
if evolution!=nil
sprite = $scene.spriteset.addUserAnimation(EXCLAMATION_ANIMATION_ID, $game_player.x,$game_player.y-1,2)
while !sprite.disposed?
Graphics.update
Input.update
pbUpdateSceneMap
end
$game_variables[ALCREMIE_FORM]=evolution
$game_switches[STARTING_OVER_SWITCH]=true
newspecies = Kernel.pbCheckEvolution(i)
if newspecies>0
pbFadeOutInWithMusic(99999){
evo=PokemonEvolutionScene.new
evo.pbStartScreen(i,newspecies)
evo.pbEvolution
evo.pbEndScreen
}
$game_switches[STARTING_OVER_SWITCH]=false
end
end
end
end
end
$PokemonTemp.last_directions = Array.new(Graphics.frame_rate*(SECONDS_LIMIT+SPINNING_MAX_INTERVAL),0)
end
$PokemonTemp.last_spin_input = Input.press?(Input::L)
end
def getSecondsAndTurnsSpinning(commandSequence)
spinning_max_frame_interval = SPINNING_MAX_INTERVAL*Graphics.frame_rate
frames_spinning = 0
frames_spinning_record = 0
turns_spinning = 0
turns_spinning_record = 0
frames_waiting = 0
lastFrameDirection = $PokemonTemp.last_directions[0]
nextIndex = -1
for i in 1...$PokemonTemp.last_directions.size
frames_spinning+=1
if lastFrameDirection == $PokemonTemp.last_directions[i]
frames_waiting+=1
if frames_waiting >= spinning_max_frame_interval
frames_waiting = 0
frames_spinning = 0
end
else
if commandSequence.index(lastFrameDirection)
nextIndex = (
commandSequence.index(lastFrameDirection)+1
) % commandSequence.size
end
frames_waiting = 0
commandIndex = commandSequence.index($PokemonTemp.last_directions[i])
if commandIndex && commandIndex==nextIndex
turns_spinning+=1
else
frames_spinning = 0
turns_spinning = 0
end
lastFrameDirection = $PokemonTemp.last_directions[i]
turns_spinning_record = [turns_spinning_record, turns_spinning].max
end
frames_spinning_record = [frames_spinning_record, frames_spinning].max
end
return [
frames_spinning/Graphics.frame_rate.to_f,
turns_spinning
]
end
end
def pbChangeLevel(pokemon,newlevel,scene)
newlevel=1 if newlevel<1
newlevel=PBExperience::MAXLEVEL if newlevel>PBExperience::MAXLEVEL
if pokemon.level>newlevel
attackdiff=pokemon.attack
defensediff=pokemon.defense
speeddiff=pokemon.speed
spatkdiff=pokemon.spatk
spdefdiff=pokemon.spdef
totalhpdiff=pokemon.totalhp
pokemon.level=newlevel
pokemon.calcStats
scene.pbRefresh
Kernel.pbMessage(_INTL("{1} was downgraded to Level {2}!",pokemon.name,pokemon.level))
attackdiff=pokemon.attack-attackdiff
defensediff=pokemon.defense-defensediff
speeddiff=pokemon.speed-speeddiff
spatkdiff=pokemon.spatk-spatkdiff
spdefdiff=pokemon.spdef-spdefdiff
totalhpdiff=pokemon.totalhp-totalhpdiff
pbTopRightWindow(_INTL("Max. HP<r>{1}\r\nAttack<r>{2}\r\nDefense<r>{3}\r\nSp. Atk<r>{4}\r\nSp. Def<r>{5}\r\nSpeed<r>{6}",
totalhpdiff,attackdiff,defensediff,spatkdiff,spdefdiff,speeddiff))
pbTopRightWindow(_INTL("Max. HP<r>{1}\r\nAttack<r>{2}\r\nDefense<r>{3}\r\nSp. Atk<r>{4}\r\nSp. Def<r>{5}\r\nSpeed<r>{6}",
pokemon.totalhp,pokemon.attack,pokemon.defense,pokemon.spatk,pokemon.spdef,pokemon.speed))
elsif pokemon.level==newlevel
Kernel.pbMessage(_INTL("{1}'s level remained unchanged.",pokemon.name))
else
attackdiff=pokemon.attack
defensediff=pokemon.defense
speeddiff=pokemon.speed
spatkdiff=pokemon.spatk
spdefdiff=pokemon.spdef
totalhpdiff=pokemon.totalhp
oldlevel=pokemon.level
pokemon.level=newlevel
pokemon.changeHappiness("levelup")
pokemon.calcStats
scene.pbRefresh
Kernel.pbMessage(_INTL("\\se[Pkmn level up]{1} was elevated to Level {2}!",pokemon.name,pokemon.level))
attackdiff=pokemon.attack-attackdiff
defensediff=pokemon.defense-defensediff
speeddiff=pokemon.speed-speeddiff
spatkdiff=pokemon.spatk-spatkdiff
spdefdiff=pokemon.spdef-spdefdiff
totalhpdiff=pokemon.totalhp-totalhpdiff
pbTopRightWindow(_INTL("Max. HP<r>+{1}\r\nAttack<r>+{2}\r\nDefense<r>+{3}\r\nSp. Atk<r>+{4}\r\nSp. Def<r>+{5}\r\nSpeed<r>+{6}",
totalhpdiff,attackdiff,defensediff,spatkdiff,spdefdiff,speeddiff))
pbTopRightWindow(_INTL("Max. HP<r>{1}\r\nAttack<r>{2}\r\nDefense<r>{3}\r\nSp. Atk<r>{4}\r\nSp. Def<r>{5}\r\nSpeed<r>{6}",
pokemon.totalhp,pokemon.attack,pokemon.defense,pokemon.spatk,pokemon.spdef,pokemon.speed))
movelist=pokemon.getMoveList
for i in movelist
if i[0]==pokemon.level # Learned a new move
pbLearnMove(pokemon,i[1],true)
end
end
return if (isConst?(pokemon.species,PBSpecies,:FARFETCHD) && pokemon.form==1) ||
(isConst?(pokemon.species,PBSpecies,:YAMASK) && pokemon.form==1) ||
isConst?(pokemon.species,PBSpecies,:MILCERY)
newspecies=pbCheckEvolution(pokemon)
if newspecies>0 &&
pbFadeOutInWithMusic(99999){
evo=PokemonEvolutionScene.new
evo.pbStartScreen(pokemon,newspecies)
evo.pbEvolution
evo.pbEndScreen
}
end
end
end
Milcery's evo method (Credits to FL, Nuri Yuri and WolfPP if used):