Browse Source

Add the boss fights back

master
Fen Dweller 5 years ago
parent
commit
669ceed0ca
2 changed files with 87 additions and 51 deletions
  1. +0
    -49
      src/App.vue
  2. +87
    -2
      src/game/maps/town.ts

+ 0
- 49
src/App.vue View File

@@ -64,55 +64,6 @@ export default class App extends Vue {


player.location = Town() 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]
}
} }
</script> </script>




+ 87
- 2
src/game/maps/town.ts View File

@@ -1,8 +1,59 @@
import { Place, Choice, Direction } from '../world' import { Place, Choice, Direction } from '../world'
import { ProperNoun, ImproperNoun } from '../language'
import { ProperNoun, ImproperNoun, MalePronouns, FemalePronouns } from '../language'
import { Encounter } from '../combat' import { Encounter } from '../combat'
import * as Creatures from '../creatures' 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 => { export const Town = (): Place => {
const home = new Place( const home = new Place(
@@ -25,6 +76,11 @@ export const Town = (): Place => {
"Scary woods" "Scary woods"
) )


const bosses = new Place(
new ProperNoun("BOSS ZONE"),
"Extra scary"
)

woods.choices.push( woods.choices.push(
new Choice( new Choice(
"Fight a wolf", "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) home.biconnect(Direction.North, westAve)
westAve.biconnect(Direction.West, westRoad) westAve.biconnect(Direction.West, westRoad)
westRoad.biconnect(Direction.South, woods) westRoad.biconnect(Direction.South, woods)
westRoad.biconnect(Direction.North, bosses)


return home return home
} }

Loading…
Cancel
Save