class PokeBattle_Battle alias __c__pbGetMoveScoreFunctions pbGetMoveScoreFunctions ############################################################################## # Get a score for each move being considered (trainer-owned Pokémon only). # Moves with higher scores are more likely to be chosen. ############################################################################## def pbGetMoveScoreFunctions(move,attacker,opponent,skill,roughdamage,initialscores,scoreindex, score, oppitemworks, attitemworks, aimem, bettertype, roles, tempdam) score = __c__pbGetMoveScoreFunctions(move,attacker,opponent,skill,roughdamage,initialscores,scoreindex, score, oppitemworks, attitemworks, aimem, bettertype, roles, tempdam) case move.function when 0x80 # Brine when 0x81 # Revenge if (pbRoughStat(opponent,PBStats::SPEED,skill)attacker.hp end score*=0.8 if checkAImoves(PBStuff::SETUPMOVE,aimem) #miniscore=attacker.hp*(1.0/attacker.totalhp) #score*=miniscore when 0x82 # Assurance if (pbRoughStat(opponent,PBStats::SPEED,skill)>attacker.pbSpeed) ^ (@trickroom!=0) score*=1.5 end when 0x83 # Round if @doublebattle && attacker.pbPartner.pbHasMove?(:ROUND) score*=1.5 end when 0x84 # Payback if (pbRoughStat(opponent,PBStats::SPEED,skill)>attacker.pbSpeed) ^ (@trickroom!=0) score*=2 end when 0x85 # Retaliate when 0x86 # Acrobatics when 0x87 # Weather Ball when 0x88 # Pursuit miniscore=(-10)*statchangecounter(opponent,1,7,-1) miniscore+=100 miniscore/=100.0 score*=miniscore if opponent.effects[PBEffects::Confusion]>0 score*=1.2 end if opponent.effects[PBEffects::LeechSeed]>=0 score*=1.5 end if opponent.effects[PBEffects::Attract]>=0 score*=1.3 end if opponent.effects[PBEffects::Substitute]>0 score*=0.7 end if opponent.effects[PBEffects::Yawn]>0 score*=1.5 end if pbTypeModNoMessages(bettertype,attacker,opponent,move,skill)>4 score*=1.5 end when 0x89 # Return when 0x8A # Frustration when 0x8B # Water Spout if (attacker.pbSpeed