{ "version": 3, "sources": ["../../../../../data/mods/vaporemons/conditions.ts"], "sourcesContent": ["export const Conditions: {[k: string]: ConditionData} = {\n\tpartiallytrapped: {\n\t\tname: 'partiallytrapped',\n\t\tduration: 5,\n\t\tdurationCallback(target, source) {\n\t\t\tif (source?.hasItem('gripclaw')) return 8;\n\t\t\treturn this.random(5, 7);\n\t\t},\n\t\tonStart(pokemon, source) {\n\t\t\tthis.add('-activate', pokemon, 'move: ' + this.effectState.sourceEffect, '[of] ' + source);\n\t\t\tthis.effectState.boundDivisor = source.hasItem('bindingband') ? 8 : 8;\n\t\t},\n\t\tonResidualOrder: 13,\n\t\tonResidual(pokemon) {\n\t\t\tconst source = this.effectState.source;\n\t\t\t// G-Max Centiferno and G-Max Sandblast continue even after the user leaves the field\n\t\t\tconst gmaxEffect = ['gmaxcentiferno', 'gmaxsandblast'].includes(this.effectState.sourceEffect.id);\n\t\t\tif (source && (!source.isActive || source.hp <= 0 || !source.activeTurns) && !gmaxEffect) {\n\t\t\t\tdelete pokemon.volatiles['partiallytrapped'];\n\t\t\t\tthis.add('-end', pokemon, this.effectState.sourceEffect, '[partiallytrapped]', '[silent]');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.damage(pokemon.baseMaxhp / this.effectState.boundDivisor);\n\t\t},\n\t\tonEnd(pokemon) {\n\t\t\tthis.add('-end', pokemon, this.effectState.sourceEffect, '[partiallytrapped]');\n\t\t},\n\t\tonTrapPokemon(pokemon) {\n\t\t\tconst gmaxEffect = ['gmaxcentiferno', 'gmaxsandblast'].includes(this.effectState.sourceEffect.id);\n\t\t\tif (this.effectState.source?.isActive || gmaxEffect) pokemon.tryTrap();\n\t\t},\n\t},\n};\n"], "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,aAA2C;AAAA,EACvD,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,iBAAiB,QAAQ,QAAQ;AAChC,UAAI,Q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