소스 검색

Add test descriptions to CompositionActions

vintage
Fen Dweller 5 년 전
부모
커밋
305e29ed64
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      src/game/combat.ts
  2. +6
    -0
      src/game/combat/consequences.ts

+ 3
- 1
src/game/combat.ts 파일 보기

@@ -408,7 +408,9 @@ export class CompositionAction extends Action {

describe (user: Creature, target: Creature): LogEntry {
return new LogLines(
...this.consequences.map(consequence => consequence.describePair(user, target))
...this.consequences.map(consequence => consequence.describePair(user, target)).concat(
super.describe(user, target)
)
)
}
}


+ 6
- 0
src/game/combat/consequences.ts 파일 보기

@@ -92,4 +92,10 @@ export class StatusConsequence extends Consequence {
apply (user: Creature, target: Creature): LogEntry {
return target.applyEffect(this.statusMaker())
}

describePair (user: Creature, target: Creature): LogEntry {
return new LogLine(
`Applies a ${this.statusMaker().name} effect.`
)
}
}

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