| @@ -6,7 +6,7 @@ module.exports = { | |||||
| extends: [ | extends: [ | ||||
| 'plugin:vue/essential', | 'plugin:vue/essential', | ||||
| '@vue/standard', | '@vue/standard', | ||||
| '@vue/typescript/recommended' | |||||
| '@vue/typescript/recommended', | |||||
| ], | ], | ||||
| parserOptions: { | parserOptions: { | ||||
| ecmaVersion: 2020 | ecmaVersion: 2020 | ||||
| @@ -18,6 +18,11 @@ module.exports = { | |||||
| '@typescript-eslint/no-unused-vars': 'off', | '@typescript-eslint/no-unused-vars': 'off', | ||||
| 'quotes': 'off', | 'quotes': 'off', | ||||
| 'function-paren-newline': ['error', 'multiline-arguments'], | 'function-paren-newline': ['error', 'multiline-arguments'], | ||||
| '@typescript-eslint/member-ordering': ['warn'] | |||||
| '@typescript-eslint/member-ordering': ['warn'], | |||||
| 'indent': 'off', | |||||
| '@typescript-eslint/indent': [ | |||||
| 'error', | |||||
| 2 | |||||
| ], | |||||
| } | } | ||||
| } | } | ||||
| @@ -222,6 +222,15 @@ export default class Combat extends Vue { | |||||
| } else { | } else { | ||||
| this.executedRight(this.encounter.currentMove.ai.decide(this.encounter.currentMove, this.encounter)) | this.executedRight(this.encounter.currentMove.ai.decide(this.encounter.currentMove, this.encounter)) | ||||
| } | } | ||||
| } else { | |||||
| if (this.encounter.currentMove.containedIn) { | |||||
| this.writeLog( | |||||
| this.encounter.currentMove.containedIn.statusLine( | |||||
| this.encounter.currentMove.containedIn.owner, | |||||
| this.encounter.currentMove | |||||
| ) | |||||
| ) | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,39 @@ | |||||
| import { VoreAI } from '@/game/ai' | |||||
| import { DamageType, Side, Stat, StatDamageFormula, Vigor } from '@/game/combat' | |||||
| import { Creature } from '@/game/creature' | |||||
| import { ImproperNoun, ObjectPronouns } from '@/game/language' | |||||
| import { anyVore, Goo, Stomach } from '@/game/vore' | |||||
| export default class Werewolf extends Creature { | |||||
| constructor () { | |||||
| super( | |||||
| new ImproperNoun("werewolf", "werewolves"), | |||||
| new ImproperNoun("werewolf", "werewolves"), | |||||
| ObjectPronouns, | |||||
| { | |||||
| Power: 45, | |||||
| Toughness: 30, | |||||
| Agility: 25, | |||||
| Reflexes: 25, | |||||
| Charm: 10, | |||||
| Willpower: 15 | |||||
| }, | |||||
| anyVore, | |||||
| anyVore, | |||||
| 75 | |||||
| ) | |||||
| const stomach = new Stomach( | |||||
| this, | |||||
| 50, | |||||
| new StatDamageFormula([ | |||||
| { fraction: 1, stat: Stat.Toughness, type: DamageType.Acid, target: Vigor.Health } | |||||
| ]) | |||||
| ) | |||||
| this.addVoreContainer(stomach) | |||||
| this.side = Side.Monsters | |||||
| this.ai = new VoreAI(this) | |||||
| } | |||||
| } | |||||
| @@ -12,6 +12,7 @@ import { DeliciousPerk } from '@/game/combat/perks' | |||||
| import Inazuma from '../creatures/characters/inazuma' | import Inazuma from '../creatures/characters/inazuma' | ||||
| import Human from '../creatures/human' | import Human from '../creatures/human' | ||||
| import Slime from '../creatures/monsters/slime' | import Slime from '../creatures/monsters/slime' | ||||
| import Werewolf from '../creatures/monsters/werewolf' | |||||
| function makeParty (): Creature[] { | function makeParty (): Creature[] { | ||||
| const fighter = new Human(new ProperNoun("Redgar"), MalePronouns, { | const fighter = new Human(new ProperNoun("Redgar"), MalePronouns, { | ||||
| @@ -340,6 +341,26 @@ export const Town = (): Place => { | |||||
| ) | ) | ||||
| ) | ) | ||||
| woods.choices.push( | |||||
| new Choice( | |||||
| "Fight a werewolf", | |||||
| "Go fight a werewolf", | |||||
| (world, executor) => { | |||||
| const enemy = new Werewolf() | |||||
| enemy.location = world.player.location | |||||
| const encounter = new Encounter( | |||||
| { | |||||
| name: "Fight some tasty nerd", | |||||
| intro: () => new LogLine(`A werewolf draws near!`) | |||||
| }, | |||||
| [world.player, enemy].concat(world.party) | |||||
| ) | |||||
| world.encounter = encounter | |||||
| return nilLog | |||||
| } | |||||
| ) | |||||
| ) | |||||
| debug.choices.push( | debug.choices.push( | ||||
| new Choice( | new Choice( | ||||
| "Add money", | "Add money", | ||||
| @@ -1,6 +1,6 @@ | |||||
| import { Damage, DamageType, Actionable, Action, Vigor, DamageInstance, DamageFormula } from '@/game/combat' | import { Damage, DamageType, Actionable, Action, Vigor, DamageInstance, DamageFormula } from '@/game/combat' | ||||
| import { LogLines, LogEntry, LogLine, nilLog, RandomEntry } from '@/game/interface' | import { LogLines, LogEntry, LogLine, nilLog, RandomEntry } from '@/game/interface' | ||||
| import { Noun, ImproperNoun, Verb, RandomWord, Word, Preposition } from '@/game/language' | |||||
| import { Noun, ImproperNoun, Verb, RandomWord, Word, Preposition, ToBe } from '@/game/language' | |||||
| import { RubAction, DevourAction, ReleaseAction, StruggleAction, TransferAction } from '@/game/combat/actions' | import { RubAction, DevourAction, ReleaseAction, StruggleAction, TransferAction } from '@/game/combat/actions' | ||||
| import * as Words from '@/game/words' | import * as Words from '@/game/words' | ||||
| import { Creature } from '@/game/creature' | import { Creature } from '@/game/creature' | ||||
| @@ -53,6 +53,8 @@ export interface Container extends Actionable { | |||||
| consumeLine (user: Creature, target: Creature): LogEntry; | consumeLine (user: Creature, target: Creature): LogEntry; | ||||
| statusLine (user: Creature, target: Creature): LogEntry; | |||||
| } | } | ||||
| export abstract class NormalContainer implements Container { | export abstract class NormalContainer implements Container { | ||||
| @@ -82,6 +84,12 @@ export abstract class NormalContainer implements Container { | |||||
| return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} ${this.consumePreposition} ${user.pronouns.possessive} ${this.name}.`) | return new LogLine(`${user.name.capital} ${user.name.conjugate(this.consumeVerb)} ${target.name.objective} ${this.consumePreposition} ${user.pronouns.possessive} ${this.name}.`) | ||||
| } | } | ||||
| statusLine (user: Creature, target: Creature): LogEntry { | |||||
| return new LogLine( | |||||
| `${target.name.capital} ${target.name.conjugate(new ToBe())} ${Words.Stuck} inside ${user.name.possessive} ${this.name}.` | |||||
| ) | |||||
| } | |||||
| releaseLine (user: Creature, target: Creature): LogEntry { | releaseLine (user: Creature, target: Creature): LogEntry { | ||||
| return new LogLine(`${user.name.capital} ${user.name.conjugate(this.releaseVerb)} ${target.name.objective} ${this.releasePreposition} ${user.pronouns.possessive} ${this.name}.`) | return new LogLine(`${user.name.capital} ${user.name.conjugate(this.releaseVerb)} ${target.name.objective} ${this.releasePreposition} ${user.pronouns.possessive} ${this.name}.`) | ||||
| } | } | ||||
| @@ -120,3 +120,9 @@ export const Sloppily = new RandomWord([ | |||||
| new Adverb("sloppily"), | new Adverb("sloppily"), | ||||
| new Adverb("messily") | new Adverb("messily") | ||||
| ]) | ]) | ||||
| export const Stuck = new RandomWord([ | |||||
| new Adjective("stuck"), | |||||
| new Adjective("trapped"), | |||||
| new Adjective("imprisoned") | |||||
| ]) | |||||