LogoPixi’VN
indexInterfaces

Interface: StageInterface

Defined in: src/interface/quest/StageInterface.ts:5

Extends

  • StageBaseInternalInterface

Properties

canStart

> readonly canStart: boolean

Defined in: src/interface/quest/StageInterface.ts:72

Check if the stage can start.

Example

export default class Stage extends StageStoredClass {
	override get canStart(): boolean {
		if (this.flagsRequired.length > 0 && !this.flagsRequired.every((flag) => storage.getFlag(flag.flag))) {
			return false;
		}
		return super.canStart;
	}
}

Inherited from

StageBaseInternalInterface.canStart


completed

> completed: boolean

Defined in: src/interface/quest/StageInterface.ts:46

Check if the flag and goals are completed. You can force the completion of the stage by setting the completed property to true.

Example

export default class Stage extends StageStoredClass {
	override get completed(): boolean {
		if (super.completed) {
			return true;
		}
		if (this.flags.length > 0) {
			if (!this.flags.every((flag) => storage.getFlag(flag.flag))) {
				return false;
			}
			return true;
		}
		return false;
	}
	override set completed(value: boolean) {
		super.completed = value;
	}
}

Inherited from

StageBaseInternalInterface.completed


deltaDateRequired

> readonly deltaDateRequired: number

Defined in: src/interface/quest/StageInterface.ts:82

The number of day/date required to start the stage.

Inherited from

StageBaseInternalInterface.deltaDateRequired


id

> readonly id: string

Defined in: src/interface/quest/StageInterface.ts:11

The id of the stage.

Inherited from

StageBaseInternalInterface.id


onEnd?

> readonly optional onEnd?: OnRunEvent<StageInterface>

Defined in: src/interface/quest/StageInterface.ts:20

The function that will be called when the stage ends.

Inherited from

StageBaseInternalInterface.onEnd


onStart?

> readonly optional onStart?: OnRunEvent<StageInterface>

Defined in: src/interface/quest/StageInterface.ts:15

The function that will be called when the stage starts.

Inherited from

StageBaseInternalInterface.onStart


questsRequired

> readonly questsRequired: QuestsRequiredType[]

Defined in: src/interface/quest/StageInterface.ts:87

The list of quests required to start the stage.

Inherited from

StageBaseInternalInterface.questsRequired


startDate?

> readonly optional startDate?: number

Defined in: src/interface/quest/StageInterface.ts:56

The date when the stage starts.

Inherited from

StageBaseInternalInterface.startDate


started

> started: boolean

Defined in: src/interface/quest/StageInterface.ts:51

If the stage is started.

Inherited from

StageBaseInternalInterface.started

Methods

start()

> start(props): Promise<void>

Defined in: src/interface/quest/StageInterface.ts:77

The function that will be called when the stage starts.

Parameters

props

OnRunProps

Returns

Promise<void>

Inherited from

StageBaseInternalInterface.start

On this page