import { Creature } from '../entity' import { LogEntry, LogLine, FAElem } from '../interface' import { Effect } from '../combat' import { SoloLine, ToBe } from '../language' export class InstantKill implements Effect { line: SoloLine = (victim) => new LogLine( `${victim.name.capital} ${victim.name.conjugate(new ToBe())} killed instantly!`, new FAElem('fas fa-skull') ) name = "Instant Kill" desc = "Instantly kills its victim" apply (target: Creature): LogEntry { target.vigors.Health = Math.min(0, target.vigors.Health) return this.line(target) } }