Added documentation

pull/840/head
Jesse Lerner 2024-05-15 00:55:19 -04:00
parent 6641b17abd
commit b856aadae5
1 changed files with 12 additions and 1 deletions

View File

@ -2126,10 +2126,21 @@ export class PostTerrainChangeAddBattlerTagAttr extends PostTerrainChangeAbAttr
}
}
/**
* When the terrain changes or the pokemon is summoned, change its type according to
* a Record passed into the constructor.
* @
* @extends PostTerrainChangeAbAttr
* @see {@link applyPostTerrainChange}
*/
export class PostTerrainChangeTypeAttr extends PostTerrainChangeAbAttr {
private oldType: Type[];
private terrainToTypeMap: Record<TerrainType, Type>;
/**
* @param {Record<TerrainType, Type>} terrainToTypeMap a map from terrain types to pokemon
* types containing information about what type to change to.
* Type.UNKOWN reverts to original typing.
*/
constructor(terrainToTypeMap: Record<TerrainType, Type>) {
super();
this.terrainToTypeMap = terrainToTypeMap;