# Interface: StageInterface (/jsdoc/nqtr/index/interfaces/StageInterface)



Defined in: [src/interface/quest/StageInterface.ts:5](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L5)

## Extends [#extends]

* `StageBaseInternalInterface`

## Properties [#properties]

### canStart [#canstart]

\> `readonly` **canStart**: `boolean`

Defined in: [src/interface/quest/StageInterface.ts:72](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L72)

Check if the stage can start.

#### Example [#example]

```ts
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 [#inherited-from]

`StageBaseInternalInterface.canStart`

***

### completed [#completed]

\> **completed**: `boolean`

Defined in: [src/interface/quest/StageInterface.ts:46](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L46)

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

#### Example [#example-1]

```ts
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 [#inherited-from-1]

`StageBaseInternalInterface.completed`

***

### deltaDateRequired [#deltadaterequired]

\> `readonly` **deltaDateRequired**: `number`

Defined in: [src/interface/quest/StageInterface.ts:82](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L82)

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

#### Inherited from [#inherited-from-2]

`StageBaseInternalInterface.deltaDateRequired`

***

### id [#id]

\> `readonly` **id**: `string`

Defined in: [src/interface/quest/StageInterface.ts:11](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L11)

The id of the stage.

#### Inherited from [#inherited-from-3]

`StageBaseInternalInterface.id`

***

### onEnd? [#onend]

\> `readonly` `optional` &#x2A;*onEnd?**: [`OnRunEvent`](/jsdoc/nqtr/index/type-aliases/OnRunEvent)\<`StageInterface`>

Defined in: [src/interface/quest/StageInterface.ts:20](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L20)

The function that will be called when the stage ends.

#### Inherited from [#inherited-from-4]

`StageBaseInternalInterface.onEnd`

***

### onStart? [#onstart]

\> `readonly` `optional` &#x2A;*onStart?**: [`OnRunEvent`](/jsdoc/nqtr/index/type-aliases/OnRunEvent)\<`StageInterface`>

Defined in: [src/interface/quest/StageInterface.ts:15](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L15)

The function that will be called when the stage starts.

#### Inherited from [#inherited-from-5]

`StageBaseInternalInterface.onStart`

***

### questsRequired [#questsrequired]

\> `readonly` **questsRequired**: [`QuestsRequiredType`](/jsdoc/nqtr/index/type-aliases/QuestsRequiredType)\[]

Defined in: [src/interface/quest/StageInterface.ts:87](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L87)

The list of quests required to start the stage.

#### Inherited from [#inherited-from-6]

`StageBaseInternalInterface.questsRequired`

***

### startDate? [#startdate]

\> `readonly` `optional` &#x2A;*startDate?**: `number`

Defined in: [src/interface/quest/StageInterface.ts:56](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L56)

The date when the stage starts.

#### Inherited from [#inherited-from-7]

`StageBaseInternalInterface.startDate`

***

### started [#started]

\> **started**: `boolean`

Defined in: [src/interface/quest/StageInterface.ts:51](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L51)

If the stage is started.

#### Inherited from [#inherited-from-8]

`StageBaseInternalInterface.started`

## Methods [#methods]

### start() [#start]

\> **start**(`props`): `Promise`\<`void`>

Defined in: [src/interface/quest/StageInterface.ts:77](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/interface/quest/StageInterface.ts#L77)

The function that will be called when the stage starts.

#### Parameters [#parameters]

##### props [#props]

[`OnRunProps`](/jsdoc/nqtr/index/interfaces/OnRunProps)

#### Returns [#returns]

`Promise`\<`void`>

#### Inherited from [#inherited-from-9]

`StageBaseInternalInterface.start`
