import { Color } from "../../body/color" ; import { Race } from "../../body/race" ; import { Entity } from "../../entity" ; import { GAME , WORLD , WorldTime } from "../../GAME" ; import { IStorage } from "../../istorage" ; import { ILocation } from "../../location" ; import { ITime , Time } from "../../time" ; import { VaughnFlags } from "./vaughn-flags" ; import { VaughnTasksScenes } from "./vaughn-tasks" ; export class Vaughn extends Entity { public taskTimer : Time ; constructor ( storage ? ) { super ( ) ; this . ID = "vaughn" ; this . name = "Vaughn" ; this . body . DefMale ( ) ; this . SetSkinColor ( Color . brown ) ; this . SetHairColor ( Color . brown ) ; this . SetEyeColor ( Color . brown ) ; this . body . SetRace ( Race . Fox ) ; this . SetLevelBonus ( ) ; this . RestFull ( ) ; this . flags . Met = 0 ; this . flags . Talk = 0 ; this . flags . TWar = 0 ; this . flags . Sex = 0 ; this . flags . T3 = 0 ; this . taskTimer = new Time ( ) ; if ( storage ) { this . FromStorage ( storage ) ; } } public Met ( ) { return this . flags . Met >= VaughnFlags . Met . Met ; } public FromStorage ( storage ) { this . LoadFlags ( storage ) ; this . taskTimer . FromStorage ( storage . Ttime ) ; } public ToStorage ( ) { const storage = { } ; this . SaveFlags ( storage ) ; storage . Ttime = this . taskTimer . ToStorage ( ) ; return storage ; } public Update ( step ) { super . Update ( step ) ; if ( VaughnTasksScenes . OnTask ( ) ) { this . taskTimer . Dec ( step ) ; } } public IsAtLocation ( location ? ) { location = location || GAME ( ) . party . location ; if ( location === WORLD ( ) . loc . Outlaws . Camp ) { return ( WorldTime ( ) . hour >= 18 || WorldTime ( ) . hour < 6 ) ; } return false ; } public IntroAvailable ( ) { const rigard = GAME ( ) . rigard ; const outlaws = GAME ( ) . outlaws ; if ( this . Met ( ) ) { return false ; } if ( ! outlaws . CompletedPathIntoRigard ( ) ) { return false ; } if ( ! rigard . RoyalAccess ( ) ) { return false ; } return true ; } public SexTime ( ) { return WorldTime ( ) . hour < 12 ; } public HaveDoneTerryRoleplay ( ) { return false ; } public Confronted ( ) { return this . flags . Talk & VaughnFlags . Talk . ConfrontFollowup ; } }