mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
updated doccumentation
This commit is contained in:
parent
8a7a5f24d5
commit
84137946fd
@ -544,6 +544,7 @@ export class AquaRingTag extends BattlerTag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Tag used to allow moves that interact with {@link Moves.MINIMIZE} to function */
|
||||||
export class MinimizeTag extends BattlerTag {
|
export class MinimizeTag extends BattlerTag {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE, undefined);
|
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE, undefined);
|
||||||
@ -1385,7 +1386,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
|||||||
case BattlerTagType.MAGNET_RISEN:
|
case BattlerTagType.MAGNET_RISEN:
|
||||||
return new MagnetRisenTag(tagType, sourceMove);
|
return new MagnetRisenTag(tagType, sourceMove);
|
||||||
case BattlerTagType.MINIMIZED:
|
case BattlerTagType.MINIMIZED:
|
||||||
return new MinimizeTag()
|
return new MinimizeTag();
|
||||||
case BattlerTagType.NONE:
|
case BattlerTagType.NONE:
|
||||||
default:
|
default:
|
||||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||||
|
@ -2374,17 +2374,15 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute used for moves which never miss
|
* Attribute used for moves which never miss
|
||||||
* against pokemon that used Minimize
|
* against Pokemon with the {@link BattlerTagType.MINIMIZED}
|
||||||
|
* @param user N/A
|
||||||
|
* @param target Target of the move
|
||||||
|
* @param move N/A
|
||||||
|
* @param args [0] Accuracy of the move to be modified
|
||||||
|
* @returns true if the function succeeds
|
||||||
*/
|
*/
|
||||||
export class MinimizeAccuracyAttr extends VariableAccuracyAttr{
|
export class MinimizeAccuracyAttr extends VariableAccuracyAttr{
|
||||||
/**
|
|
||||||
* Swaps the user and the target's stat changes.
|
|
||||||
* @param user Pokemon that used the move
|
|
||||||
* @param target The target of the move
|
|
||||||
* @param move Move that never misses against Minimized targets
|
|
||||||
* @param args Accuracy of the move being used
|
|
||||||
* @returns true if the function succeeds
|
|
||||||
*/
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
if (target.getTag(BattlerTagType.MINIMIZED)){
|
if (target.getTag(BattlerTagType.MINIMIZED)){
|
||||||
const accuracy = args[0] as Utils.NumberHolder
|
const accuracy = args[0] as Utils.NumberHolder
|
||||||
@ -3111,8 +3109,11 @@ export class FaintCountdownAttr extends AddBattlerTagAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Attribute used when a move hits a {@link BattlerTagType} for double damage */
|
||||||
export class HitsTagAttr extends MoveAttr {
|
export class HitsTagAttr extends MoveAttr {
|
||||||
|
/** The {@link BattlerTagType} this move hits */
|
||||||
public tagType: BattlerTagType;
|
public tagType: BattlerTagType;
|
||||||
|
/** Should this move deal double damage against {@link HitsTagAttr.tagType}? */
|
||||||
public doubleDamage: boolean;
|
public doubleDamage: boolean;
|
||||||
|
|
||||||
constructor(tagType: BattlerTagType, doubleDamage?: boolean) {
|
constructor(tagType: BattlerTagType, doubleDamage?: boolean) {
|
||||||
|
@ -1550,6 +1550,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
|
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For each {@link HitsTagAttr} the move has, doubles the damage of the move if:
|
||||||
|
* The target has a {@link BattlerTagType} that this move interacts with
|
||||||
|
* AND
|
||||||
|
* The move doubles damage when used against that tag
|
||||||
|
* */
|
||||||
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
||||||
if (this.getTag(hta.tagType))
|
if (this.getTag(hta.tagType))
|
||||||
damage.value *= 2;
|
damage.value *= 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user