ソースを参照

Add a hypnotize action that changes the target's side

master
Fen Dweller 5年前
コミット
b69f5ab3fa
1個のファイルの変更29行の追加0行の削除
  1. +29
    -0
      src/game/creatures/withers.ts

+ 29
- 0
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<Creature, Creature>([
[[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())
}
}

読み込み中…
キャンセル
保存