Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: NightKev <[email protected]>
  • Loading branch information
innerthunder and DayKev authored Oct 23, 2024
1 parent c6f401c commit e4f2d00
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ interface MoveEffectAttrOptions {
export class MoveEffectAttr extends MoveAttr {
/**
* Defines when this effect should trigger in the move's effect order
* @see {@linkcode phases.MoveEffectPhase.start}
* @see {@linkcode MoveEffectPhase}
*/
public trigger: MoveEffectTrigger;
/**
Expand All @@ -1002,15 +1002,17 @@ export class MoveEffectAttr extends MoveAttr {

/**
* `true` if this effect should only trigger on the first hit of
* multi-hit moves. Defaults to `false`.
* multi-hit moves.
* @default false
*/
public get firstHitOnly () {
return this.options?.firstHitOnly ?? false;
}

/**
* `true` if this effect should only trigger on the last hit of
* multi-hit moves. Defaults to `false`.
* multi-hit moves.
* @default false
*/
public get lastHitOnly () {
return this.options?.lastHitOnly ?? false;
Expand All @@ -1019,7 +1021,7 @@ export class MoveEffectAttr extends MoveAttr {
/**
* `true` if this effect should apply only upon hitting a target
* for the first time when targeting multiple {@linkcode Pokemon}.
* Defaults to `false`.
* @default false
*/
public get firstTargetOnly () {
return this.options?.firstTargetOnly ?? false;
Expand Down Expand Up @@ -2839,14 +2841,14 @@ interface StatStageChangeAttrOptions extends MoveEffectAttrOptions {
*/
export class StatStageChangeAttr extends MoveEffectAttr {
public stats: BattleStat[];
public stages: integer;
public stages: number;
/**
* Container for optional parameters to this attribute.
* @see {@linkcode StatStageChangeAttrOptions} for available optional params
*/
protected override options?: StatStageChangeAttrOptions;

constructor(stats: BattleStat[], stages: integer, selfTarget?: boolean, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT, options?: StatStageChangeAttrOptions) {
constructor(stats: BattleStat[], stages: number, selfTarget?: boolean, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT, options?: StatStageChangeAttrOptions) {
super(selfTarget, moveEffectTrigger, options);
this.stats = stats;
this.stages = stages;
Expand All @@ -2863,7 +2865,7 @@ export class StatStageChangeAttr extends MoveEffectAttr {

/**
* `true` to display a message for the stat change.
* Defaults to `true`.
* @default true
*/
private get showMessage () {
return this.options?.showMessage ?? true;
Expand Down

0 comments on commit e4f2d00

Please sign in to comment.