# Defrost if thismove.canThawOpponent? && target.status==PBStatuses::FROZEN && !(target.hasWorkingAbility(:FLASHFIRE)) target.pbCureStatus end

# If target is frozen, don't prefer moves that could thaw them # TODO if opponent.status==PBStatuses::FROZEN if skill>=PBTrainerAI.mediumSkill if move.canThawOpponent? && !(opponent.hasWorkingAbility(:FLASHFIRE)) score-=60 end end end

def canThawOpponent? # if move type is Fire (includes Hidden Power Fire?) if isConst?(@type,PBTypes,:FIRE) || isConst?(@id,PBMoves,:SCALD) return true else return false end end

Firstly, I noticed the thawing doesn't take into account that the pokemon will not thaw if it has Flash Fire , or Scald thawing the target. Here's a fixed version of that.For the code for the AI, I added this where Maruno put the if target is frozen TODONot sure exactly how the scoring should be, but I figured -60 was appropriateBoth of these use this method (Goes under def canThawUser?)