diff --git a/src/App.vue b/src/App.vue index 2b8e10e..5d1dced 100644 --- a/src/App.vue +++ b/src/App.vue @@ -64,55 +64,6 @@ export default class App extends Vue { player.location = Town() } - - makeParty (): Creature[] { - const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, { - stats: { - Toughness: 20, - Power: 20, - Speed: 15, - Willpower: 15, - Charm: 10 - } - }) - fighter.title = "Lv. 6 Fighter" - fighter.items.push(Items.Sword) - const rogue = new Creatures.Human(new ProperNoun('Lidda'), FemalePronouns, { - stats: { - Toughness: 10, - Power: 15, - Speed: 20, - Willpower: 15, - Charm: 20 - } - }) - rogue.title = "Lv. 5 Rogue" - rogue.items.push(Items.Dagger) - const wizard = new Creatures.Human(new ProperNoun('Mialee'), FemalePronouns, { - stats: { - Toughness: 10, - Power: 10, - Speed: 15, - Willpower: 20, - Charm: 25 - } - }) - wizard.title = "Lv. 6 Wizard" - wizard.items.push(Items.Wand) - const cleric = new Creatures.Human(new ProperNoun('Jozan'), MalePronouns, { - stats: { - Toughness: 15, - Power: 15, - Speed: 10, - Willpower: 20, - Charm: 15 - } - }) - cleric.title = "Lv. 5 Cleric" - cleric.items.push(Items.Mace) - - return [fighter, cleric, rogue, wizard] - } } diff --git a/src/game/maps/town.ts b/src/game/maps/town.ts index 74a4168..9732a37 100644 --- a/src/game/maps/town.ts +++ b/src/game/maps/town.ts @@ -1,8 +1,59 @@ import { Place, Choice, Direction } from '../world' -import { ProperNoun, ImproperNoun } from '../language' +import { ProperNoun, ImproperNoun, MalePronouns, FemalePronouns } from '../language' import { Encounter } from '../combat' import * as Creatures from '../creatures' -import { LogLine } from '../interface' +import * as Items from '../items' +import { LogLine, nilLog } from '../interface' +import { Creature } from '../creature' + +function makeParty (): Creature[] { + const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, { + stats: { + Toughness: 20, + Power: 20, + Speed: 15, + Willpower: 15, + Charm: 10 + } + }) + fighter.title = "Lv. 6 Fighter" + fighter.items.push(Items.Sword) + const rogue = new Creatures.Human(new ProperNoun('Lidda'), FemalePronouns, { + stats: { + Toughness: 10, + Power: 15, + Speed: 20, + Willpower: 15, + Charm: 20 + } + }) + rogue.title = "Lv. 5 Rogue" + rogue.items.push(Items.Dagger) + const wizard = new Creatures.Human(new ProperNoun('Mialee'), FemalePronouns, { + stats: { + Toughness: 10, + Power: 10, + Speed: 15, + Willpower: 20, + Charm: 25 + } + }) + wizard.title = "Lv. 6 Wizard" + wizard.items.push(Items.Wand) + const cleric = new Creatures.Human(new ProperNoun('Jozan'), MalePronouns, { + stats: { + Toughness: 15, + Power: 15, + Speed: 10, + Willpower: 20, + Charm: 15 + } + }) + cleric.title = "Lv. 5 Cleric" + cleric.items.push(Items.Mace) + + return [fighter, cleric, rogue, wizard] +} export const Town = (): Place => { const home = new Place( @@ -25,6 +76,11 @@ export const Town = (): Place => { "Scary woods" ) + const bosses = new Place( + new ProperNoun("BOSS ZONE"), + "Extra scary" + ) + woods.choices.push( new Choice( "Fight a wolf", @@ -40,9 +96,38 @@ export const Town = (): Place => { ) ) + const bossEncounters = [ + new Encounter( + { name: "Withers & Kenzie" }, + makeParty().concat([new Creatures.Withers(), new Creatures.Kenzie()]) + ), + new Encounter( + { name: "Goldeneye" }, + makeParty().concat([new Creatures.Goldeneye()]) + ), + new Encounter( + { name: "Large Wah" }, + makeParty().concat([new Creatures.Shingo()]) + ) + ] + + bossEncounters.forEach(encounter => { + bosses.choices.push( + new Choice( + encounter.desc.name, + "Boss fight!", + (world, executor) => { + world.encounter = encounter + return nilLog + } + ) + ) + }) + home.biconnect(Direction.North, westAve) westAve.biconnect(Direction.West, westRoad) westRoad.biconnect(Direction.South, woods) + westRoad.biconnect(Direction.North, bosses) return home }