|
|
|
@@ -35,6 +35,7 @@ export type Gas = { |
|
|
|
smell: Adjective; |
|
|
|
bubbleVerb: Verb; |
|
|
|
releaseVerb: Verb; |
|
|
|
exit: Noun; |
|
|
|
} |
|
|
|
|
|
|
|
export enum ContainerCapability { |
|
|
|
@@ -394,7 +395,13 @@ export abstract class DefaultContainer implements Container { |
|
|
|
} |
|
|
|
|
|
|
|
digest (preys: Creature[]): LogEntry { |
|
|
|
return new LogLines(...preys.map(prey => this.digestLine(this.owner, prey))) |
|
|
|
const results = preys.map(prey => this.digestLine(this.owner, prey)) |
|
|
|
if (preys.length > 0 && this.gas) { |
|
|
|
results.push(new LogLine( |
|
|
|
`A crass ${this.gas.releaseVerb} escapes ${this.owner.name.possessive} ${this.gas.exit} as ${this.owner.name.possessive} prey is digested, spewing ${this.gas.color} ${this.gas.name}.` |
|
|
|
)) |
|
|
|
} |
|
|
|
return new LogLines(...results) |
|
|
|
} |
|
|
|
|
|
|
|
onAbsorb (prey: Creature): LogEntry { |
|
|
|
@@ -419,7 +426,8 @@ export class Stomach extends DefaultContainer { |
|
|
|
color: new Adjective("hazy"), |
|
|
|
name: new Noun("fume", "fumes"), |
|
|
|
releaseVerb: new Verb("belch", "belches", "belching", "belched"), |
|
|
|
smell: new Adjective("acrid") |
|
|
|
smell: new Adjective("acrid"), |
|
|
|
exit: new Noun("jaws") |
|
|
|
} |
|
|
|
|
|
|
|
wall = { |
|
|
|
|