mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-25 07:57:01 -05:00
Fix Reflect Type copying types (#1182)
This commit is contained in:
parent
67a87fb169
commit
01f764f2ec
|
|
@ -2087,14 +2087,17 @@ class Battle {
|
|||
this.activateAbility(ofpoke || poke, fromeffect);
|
||||
switch (effect.id) {
|
||||
case 'typechange':
|
||||
const types = Tools.sanitizeName(args[3] || '???');
|
||||
poke.removeVolatile('typeadd' as ID);
|
||||
poke.addVolatile('typechange' as ID, types);
|
||||
if (kwArgs.silent) {
|
||||
this.scene.updateStatbar(poke);
|
||||
break;
|
||||
if (ofpoke && fromeffect.id == 'reflecttype') {
|
||||
poke.copyTypesFrom(ofpoke);
|
||||
} else {
|
||||
const types = Tools.sanitizeName(args[3] || '???');
|
||||
poke.removeVolatile('typeadd' as ID);
|
||||
poke.addVolatile('typechange' as ID, types);
|
||||
if (!kwArgs.silent) {
|
||||
this.scene.typeAnim(poke, types);
|
||||
}
|
||||
}
|
||||
this.scene.typeAnim(poke, types);
|
||||
this.scene.updateStatbar(poke);
|
||||
break;
|
||||
case 'typeadd':
|
||||
const type = Tools.sanitizeName(args[3]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user