- 73
- Posts
- 4
- Years
- Online now
I figured tbh. The bug just keeps getting weirder and weirder too. Now I used Thief before the opponent's Gem was used, and they were still able to use it lol. I think I might have to just start from scratch to fix this.
Nice work!Hello! I don't know if there is a script out there that includes gen 8 AI move selection. So I decided to tinker a little bit. Be warned that I'm a noob at coding and all I've done was adding lines from other moves to make it work the way they were supposed to....approximately. Please, be free to add/suggest anything. This is not a project, I just had a little free time. There might be errors (almost certainly). There is a ZUD reference in "Lash Out", "D003", ignore it if you don't use ZUD.
#---------------------------------------------------------------------------
when "17A" # Court Change, THIS SERIOUSLY NEEDS SOME OPTIMIZATION
score += 30 if target.pbOwnSide.effects[PBEffects::AuroraVeil]>0 ||
target.pbOwnSide.effects[PBEffects::Reflect]>0 ||
target.pbOwnSide.effects[PBEffects::LightScreen]>0 ||
target.pbOwnSide.effects[PBEffects::Mist]>0 ||
target.pbOwnSide.effects[PBEffects::Safeguard]>0
score -= 30 if target.pbOwnSide.effects[PBEffects::Spikes]>0 ||
target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 ||
target.pbOwnSide.effects[PBEffects::StealthRock] ||
target.pbOwnSide.effects[PBEffects::StickyWeb]
score -= 30 if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 ||
user.pbOwnSide.effects[PBEffects::Reflect]>0 ||
user.pbOwnSide.effects[PBEffects::LightScreen]>0 ||
user.pbOwnSide.effects[PBEffects::Mist]>0 ||
user.pbOwnSide.effects[PBEffects::Safeguard]>0
score += 30 if user.pbOwnSide.effects[PBEffects::Spikes]>0 ||
user.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 ||
user.pbOwnSide.effects[PBEffects::StealthRock] ||
user.pbOwnSide.effects[PBEffects::StickyWeb]
The way it's coded, the AI gets a base power of 50 and not 100. See the function:# Weather ------------------------------------------>I NEED CONFIRMATION to wether the "Weather Ball" "multipliers[BASE_DMG_MULT] *= 2" actually does the job or if the AI already detects the 50*2=100 damage if there's a weather condition...
#=============================================================================
# Get a better move's base damage value
#=============================================================================
def pbMoveBaseDamage(move,user,target,skill)
baseDmg = move.baseDamage
baseDmg = 60 if baseDmg==1
baseDmg = move.baseDamage
Hey guys :) will you actually adapt this project for v19 since it is out ?
does this project work on v19, or is there a different project for that
does this project work on v19, or is there a different project for that