diff --git a/src/game/creatures/withers.ts b/src/game/creatures/withers.ts index 5af9f70..321ba54 100644 --- a/src/game/creatures/withers.ts +++ b/src/game/creatures/withers.ts @@ -9,6 +9,33 @@ import { InstantKill } from '../combat/effects' import * as Words from '../words' import { StatVigorTest } from '../combat/tests' +class HypnotizeAction extends Action { + lines = new POVPair([ + [[POV.First, POV.Third], (user, target) => new LogLine(`Your hypnotic gaze enthralls ${target.name}, putting ${target.pronouns.objective} under your control!`)], + [[POV.Third, POV.First], (user, target) => new LogLine(`${user.name.capital}'s hypnotic gaze enthralls you, putting you under ${user.pronouns.possessive} control!`)], + [[POV.Third, POV.Third], (user, target) => new LogLine(`${user.name.capital}'s hypnotic gaze enthralls ${target.name}, putting ${target.pronouns.objective} under ${user.pronouns.possessive} control!`)] + ]) + + execute (user: Creature, target: Creature): LogEntry { + target.side = user.side + return this.lines.run(user, target) + } + + describe (user: Creature, target: Creature): LogEntry { + return new LogLine(`Force your target to fight by your side`) + } + + constructor () { + super( + `Hypnotize`, + `Change their mind!`, + [ + new TogetherCondition(), + new EnemyCondition() + ] + ) + } +} class MawContainer extends NormalContainer { consumeVerb = new Verb('grab', 'grabs', 'grabbing', 'grabbed') releaseVerb = new Verb('release') @@ -342,5 +369,7 @@ export class Withers extends Creature { new Verb('stomp') ) ) + + this.actions.push(new HypnotizeAction()) } }