Merge pull request #2314 from ascriptmaster/randoms

Random Battle: Fix dual STAB for Psychic-type Pokemon
This commit is contained in:
The Immortal 2015-12-11 00:40:44 +04:00
commit affe8c9be6

View File

@ -1540,7 +1540,7 @@ exports.BattleScripts = {
(hasType['Fire'] && !counter['Fire']) ||
(hasType['Ground'] && !counter['Ground'] && (counter.setupType || counter['speedsetup'])) ||
(hasType['Ice'] && !counter['Ice']) ||
(hasType['Psychic'] && !!counter['Psychic'] && !hasType['Flying'] && !hasAbility['Pixilate'] && template.types.length > 1 && counter.stab < 2) ||
(hasType['Psychic'] && !!counter['Psychic'] && !hasType['Flying'] && !hasAbility['Pixilate'] && template.types.length > 1 && !counter[template.types.filter(t => t !== 'Psychic')[0]]) ||
(hasMove['raindance'] && hasType['Water'] && !counter['Water']) ||
(movePool.indexOf('technoblast') >= 0 || template.requiredMove && movePool.indexOf(toId(template.requiredMove)) >= 0)) &&
(counter['physicalsetup'] + counter['specialsetup'] < 2 && (!counter.setupType || counter.setupType === 'Mixed' || (move.category !== counter.setupType && move.category !== 'Status') || counter[counter.setupType] + counter.Status > 3))) {