agents-flow
Version:
Framework for multi-agent interactive fiction videogame.
49 lines • 1.84 kB
TypeScript
import { Effect } from "npc-emotional";
import { Sentence } from "first-order-logic";
import { Roles } from "./roles";
import { Crowd } from "./agent";
export declare class PhraseResult {
private _content;
private _effect;
private _sentence;
constructor(content: string, effect: Effect, sentence?: Sentence);
get content(): string;
get effect(): Effect;
get sentence(): Sentence;
get hasSentence(): boolean;
}
export declare type TextFunc = (roles: Roles) => string;
export declare type EffectFunc = (roles: Roles) => Effect;
export declare type SentenceFunc = (roles: Roles) => Sentence;
export declare class Alternative {
private _text;
private _effect;
private _sentence;
constructor(text: TextFunc, effect?: EffectFunc, sentence?: SentenceFunc);
get text(): TextFunc;
get effect(): EffectFunc;
get sentence(): SentenceFunc;
}
export declare class Phrase {
private _alternatives;
private _performerRole;
private _targetRole;
private _isIntimate;
constructor(performerRole: string, targetRole?: string);
get performerRole(): string;
get targetRole(): string;
get isIntimate(): boolean;
get isMultialternative(): boolean;
allAlternatives(roles: Roles): string[];
withAlternative(alternative: TextFunc, effect?: EffectFunc, sentence?: SentenceFunc): Phrase;
intimate(): void;
action(roles: Roles, crowd: Crowd, alternativeIndex?: number): PhraseResult;
private chooseAlternative;
private performerHasMeaningfulDesires;
private calculateAlternativeBasedOnDesires;
private calculateAlternativeBasedOnEmotions;
private calculateEffectDirection;
private calculateEffectDirectionWithRelation;
private static uncorcheted;
}
//# sourceMappingURL=phrase.d.ts.map