mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-08 16:39:26 +02:00
Removed default value from maxStackCount
This commit is contained in:
parent
d0ebb32f9e
commit
61cd122223
@ -15,7 +15,7 @@ export class AccuracyBoosterHeldItem extends HeldItem {
|
||||
|
||||
private accuracyAmount: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, accuracy: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, accuracy: number) {
|
||||
super(type, maxStackCount);
|
||||
this.accuracyAmount = accuracy;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export class AttackTypeBoosterHeldItem extends HeldItem {
|
||||
public powerBoost: number;
|
||||
|
||||
// This constructor may need a revision
|
||||
constructor(type: HeldItemId, maxStackCount = 1, moveType: PokemonType, powerBoost: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, moveType: PokemonType, powerBoost: number) {
|
||||
super(type, maxStackCount);
|
||||
this.moveType = moveType;
|
||||
this.powerBoost = powerBoost;
|
||||
|
@ -36,7 +36,7 @@ export class BaseStatBoosterHeldItem extends HeldItem {
|
||||
public effects: HeldItemEffect[] = [HeldItemEffect.BASE_STAT_BOOSTER];
|
||||
public stat: PermanentStat;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, stat: PermanentStat) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, stat: PermanentStat) {
|
||||
super(type, maxStackCount);
|
||||
this.stat = stat;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export class BaseStatTotalHeldItem extends HeldItem {
|
||||
public isTransferable = false;
|
||||
public statModifier: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, statModifier: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, statModifier: number) {
|
||||
super(type, maxStackCount);
|
||||
this.statModifier = statModifier;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export class CritBoostHeldItem extends HeldItem {
|
||||
/** The amount of stages by which the held item increases the current critical-hit stage value */
|
||||
protected stageIncrement: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, stageIncrement: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, stageIncrement: number) {
|
||||
super(type, maxStackCount);
|
||||
|
||||
this.stageIncrement = stageIncrement;
|
||||
@ -50,7 +50,7 @@ export class SpeciesCritBoostHeldItem extends CritBoostHeldItem {
|
||||
/** The species that the held item's critical-hit stage boost applies to */
|
||||
private species: SpeciesId[];
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, stageIncrement: number, species: SpeciesId[]) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, stageIncrement: number, species: SpeciesId[]) {
|
||||
super(type, maxStackCount, stageIncrement);
|
||||
|
||||
this.species = species;
|
||||
|
@ -18,7 +18,7 @@ export class EvoTrackerHeldItem extends HeldItem {
|
||||
protected required: number;
|
||||
public isTransferable = false;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, species: SpeciesId, required: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, species: SpeciesId, required: number) {
|
||||
super(type, maxStackCount);
|
||||
this.species = species;
|
||||
this.required = required;
|
||||
|
@ -16,7 +16,7 @@ export class ExpBoosterHeldItem extends HeldItem {
|
||||
private boostPercent: number;
|
||||
private boostMultiplier: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, boostPercent: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, boostPercent: number) {
|
||||
super(type, maxStackCount);
|
||||
this.boostPercent = boostPercent;
|
||||
this.boostMultiplier = boostPercent * 0.01;
|
||||
|
@ -19,7 +19,7 @@ export class FlinchChanceHeldItem extends HeldItem {
|
||||
public effects: HeldItemEffect[] = [HeldItemEffect.FLINCH_CHANCE];
|
||||
private chance: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, chance: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, chance: number) {
|
||||
super(type, maxStackCount);
|
||||
|
||||
this.chance = chance; // 10
|
||||
|
@ -15,7 +15,7 @@ export interface ItemStealParams {
|
||||
target?: Pokemon;
|
||||
}
|
||||
|
||||
// constructor(type: HeldItemId, maxStackCount = 1, boostPercent: number) {
|
||||
// constructor(type: HeldItemId, maxStackCount: number, boostPercent: number) {
|
||||
|
||||
/**
|
||||
* Abstract class for held items that steal other Pokemon's items.
|
||||
@ -129,7 +129,7 @@ export class ContactItemStealChanceHeldItem extends ItemTransferHeldItem {
|
||||
public readonly chancePercent: number;
|
||||
public readonly chance: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, chancePercent: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, chancePercent: number) {
|
||||
super(type, maxStackCount);
|
||||
|
||||
this.chancePercent = chancePercent;
|
||||
|
@ -26,7 +26,7 @@ export class StatBoostHeldItem extends HeldItem {
|
||||
/** The multiplier used to increase the relevant stat(s) */
|
||||
protected multiplier: number;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, stats: Stat[], multiplier: number) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, stats: Stat[], multiplier: number) {
|
||||
super(type, maxStackCount);
|
||||
|
||||
this.stats = stats;
|
||||
@ -141,7 +141,7 @@ export class SpeciesStatBoostHeldItem extends StatBoostHeldItem {
|
||||
|
||||
constructor(
|
||||
type: SpeciesStatBoosterItemId,
|
||||
maxStackCount = 1,
|
||||
maxStackCount: number,
|
||||
stats: Stat[],
|
||||
multiplier: number,
|
||||
species: SpeciesId[],
|
||||
|
@ -19,7 +19,7 @@ export class TurnEndStatusHeldItem extends HeldItem {
|
||||
/** The status effect to be applied by the held item */
|
||||
public effect: StatusEffect;
|
||||
|
||||
constructor(type: HeldItemId, maxStackCount = 1, effect: StatusEffect) {
|
||||
constructor(type: HeldItemId, maxStackCount: number, effect: StatusEffect) {
|
||||
super(type, maxStackCount);
|
||||
|
||||
this.effect = effect;
|
||||
|
Loading…
Reference in New Issue
Block a user