import { Abilities } from "../../abilities" ; import { Images } from "../../assets" ; import { Color } from "../../body/color" ; import { Entity , ICombatEncounter , ICombatOrder } from "../../entity" ; import { GAME , WORLD , WorldTime } from "../../GAME" ; import { IStorage } from "../../istorage" ; import { CombatItems } from "../../items/combatitems" ; import { ILocation } from "../../location" ; import { StatusEffect } from "../../statuseffect" ; import { Text } from "../../text" ; import { ITime , Time } from "../../time" ; import { OutlawsFlags } from "./outlaws-flags" ; export class Maria extends Entity { public DDtimer : Time ; public pots : number ; constructor ( storage ? ) { super ( ) ; this . ID = "maria" ; this . name = "Maria" ; this . avatar . combat = Images . maria ; this . maxHp . base = 100 ; this . maxSp . base = 80 ; this . maxLust . base = 50 ; this . strength . base = 20 ; this . stamina . base = 22 ; this . dexterity . base = 16 ; this . intelligence . base = 17 ; this . spirit . base = 15 ; this . libido . base = 20 ; this . charisma . base = 18 ; this . level = 5 ; this . sexlevel = 3 ; this . SetExpToLevel ( ) ; this . body . DefFemale ( ) ; this . FirstVag ( ) . virgin = false ; this . FirstBreastRow ( ) . size . base = 12.5 ; this . Butt ( ) . buttSize . base = 5 ; this . SetSkinColor ( Color . brown ) ; this . SetHairColor ( Color . black ) ; this . SetEyeColor ( Color . blue ) ; this . SetLevelBonus ( ) ; this . RestFull ( ) ; this . flags . Met = 0 ; this . flags . DD = 0 ; this . flags . Ranger = 0 ; this . DDtimer = new Time ( ) ; if ( storage ) { this . FromStorage ( storage ) ; } } public FromStorage ( storage ) { this . Butt ( ) . virgin = parseInt ( storage . avirgin , 10 ) === 1 ; this . LoadPersonalityStats ( storage ) ; this . LoadFlags ( storage ) ; this . DDtimer . FromStorage ( storage . DDtime ) ; } public ToStorage ( ) { const storage = { avirgin : ( this . Butt ( ) . virgin ? 1 : 0 ) . toString ( ) , } ; this . SavePersonalityStats ( storage ) ; this . SaveFlags ( storage ) ; storage . DDtime = this . DDtimer . ToStorage ( ) ; return storage ; } public Update ( step ) { super . Update ( step ) ; this . DDtimer . Dec ( step ) ; } public IsAtLocation ( location ? ) { location = location || GAME ( ) . party . location ; if ( location === WORLD ( ) . loc . Outlaws . Camp ) { return ( WorldTime ( ) . hour >= 7 && WorldTime ( ) . hour < 22 ) ; } return false ; } public EligableForDeaddropAlert ( ) { const outlaws = GAME ( ) . outlaws ; const maria = GAME ( ) . maria ; if ( maria . flags . DD !== 0 ) { return false ; } if ( outlaws . flags . Met < OutlawsFlags . Met . Bouqet ) { return false ; } return true ; } public Act ( encounter , activeChar ) { Text . Add ( "The huntress hops around nimbly." ) ; Text . NL ( ) ; const t = this . GetSingleTarget ( encounter , activeChar ) ; const choice = Math . random ( ) ; const trap = this . combatStatus . stats [ StatusEffect . Counter ] ; if ( this . HPLevel ( ) < 0.3 && this . pots > 0 ) { this . pots -- ; CombatItems . HPotion . combat . Use ( encounter , this , this ) ; } else if ( choice < 0.2 && Abilities . Physical . SetTrap . enabledCondition ( encounter , this ) && trap === undefined ) { Abilities . Physical . SetTrap . Use ( encounter , this , this ) ; } else if ( choice < 0.4 && Abilities . Physical . Hamstring . enabledCondition ( encounter , this ) ) { Abilities . Physical . Hamstring . Use ( encounter , this , t ) ; } else if ( choice < 0.6 && Abilities . Physical . FocusStrike . enabledCondition ( encounter , this ) ) { Abilities . Physical . FocusStrike . Use ( encounter , this , t ) ; } else if ( choice < 0.8 && Abilities . Physical . Ensnare . enabledCondition ( encounter , this ) ) { Abilities . Physical . Ensnare . Use ( encounter , this , t ) ; } else { Abilities . Attack . Use ( encounter , this , t ) ; } } }