소스 검색

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())
}
}

불러오는 중...
취소
저장