diff --git a/src/App.vue b/src/App.vue index adb8ad1..9733f41 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@
- +
@@ -33,6 +33,7 @@ import { Town } from './game/maps/town' data () { return { world: null, + home: null, profileOn: false, props: { Explore: { @@ -74,8 +75,13 @@ export default class App extends Vue { player.items.push(new Items.Mace()) player.items.push(new Items.Dagger()) this.$data.world = new World(player) + this.$data.home = Town() + player.location = this.$data.home + } - player.location = Town() + gameOver () { + this.$data.world.encounter = null + this.$data.world.player.location = this.$data.home } } diff --git a/src/components/Combat.vue b/src/components/Combat.vue index da4d46e..ebafcd1 100644 --- a/src/components/Combat.vue +++ b/src/components/Combat.vue @@ -42,10 +42,13 @@
- + - @@ -87,6 +90,10 @@ export default class Combat extends Vue { Side = Side + get playerDigested () { + return this.world.player.destroyed && this.world.player.containedIn !== null + } + get running () { if (this.encounter.winner === null || (this.$data.continuing === true && this.encounter.totalWinner === null)) { return true @@ -310,7 +317,8 @@ export default class Combat extends Vue { } .exit-combat, -.continue-combat { +.continue-combat, +.give-in { width: 100%; padding: 4pt; flex: 0 1; @@ -322,6 +330,9 @@ export default class Combat extends Vue { font-size: 36px; } +.give-in { + grid-area: 2 / main-col-start / main-row-start / main-col-end; +} .exit-combat { grid-area: 2 / main-col-start / main-row-start / 3; } diff --git a/src/game/creatures.ts b/src/game/creatures.ts index 97ee062..3f89d05 100644 --- a/src/game/creatures.ts +++ b/src/game/creatures.ts @@ -1,4 +1,4 @@ -import { Wolf } from './creatures/wolf' +import { Wolf, DireWolf } from './creatures/wolves' import { Player } from './creatures/player' import { Cafat } from './creatures/cafat' import { Human } from './creatures/human' @@ -11,4 +11,4 @@ import { Kuro } from './creatures/kuro' import { Geta } from './creatures/geta' import { Werewolf } from './creatures/werewolf' -export { Wolf, Player, Cafat, Human, Withers, Kenzie, Dragon, Shingo, Goldeneye, Kuro, Geta, Werewolf } +export { Wolf, DireWolf, Player, Cafat, Human, Withers, Kenzie, Dragon, Shingo, Goldeneye, Kuro, Geta, Werewolf } diff --git a/src/game/creatures/wolf.ts b/src/game/creatures/wolf.ts deleted file mode 100644 index 6271e28..0000000 --- a/src/game/creatures/wolf.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Creature } from "../creature" -import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat } from '../combat' -import { MalePronouns, ImproperNoun, ProperNoun, ObjectPronouns, FemalePronouns, TheyPronouns, Verb } from '../language' -import { VoreType, Stomach, Bowels, Cock, Balls, anyVore, Slit, Womb, biconnectContainers } from '../vore' -import { AttackAction, TransferAction, FeedAction } from '../combat/actions' -import { Human } from '../creatures' - -export class Wolf extends Creature { - constructor () { - super( - new ImproperNoun('wolf', 'wolves'), - new ImproperNoun('wolf', 'wolves'), - [MalePronouns, FemalePronouns, TheyPronouns][Math.floor(Math.random() * 3)], - { Toughness: 20, Power: 20, Reflexes: 20, Agility: 20, Willpower: 20, Charm: 20 }, - anyVore, - anyVore, - 25 - ) - this.actions.push( - new AttackAction( - new StatDamageFormula([ - { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Pierce }, - { fraction: 0.5, stat: Stat.Power, target: Vigor.Health, type: DamageType.Crush } - ]), - new Verb("bite") - ) - ) - - this.side = Side.Monsters - - const stomach = new Stomach(this, 2, new ConstantDamageFormula(new Damage( - { amount: 60, type: DamageType.Acid, target: Vigor.Health }, - { amount: 30, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 30, type: DamageType.Dominance, target: Vigor.Resolve } - ))) - this.containers.push(stomach) - - const bowels = new Bowels(this, 2, new ConstantDamageFormula(new Damage( - { amount: 30, type: DamageType.Crush, target: Vigor.Health }, - { amount: 60, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 60, type: DamageType.Dominance, target: Vigor.Resolve } - ))) - - this.containers.push(bowels) - - this.actions.push(new TransferAction(bowels, stomach)) - - this.otherActions.push(new FeedAction(stomach)) - - const cock = new Cock(this, 2, new ConstantDamageFormula(new Damage( - { amount: 30, type: DamageType.Crush, target: Vigor.Health }, - { amount: 60, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 60, type: DamageType.Dominance, target: Vigor.Resolve } - ))) - - const balls = new Balls(this, 2, new ConstantDamageFormula(new Damage( - { amount: 30, type: DamageType.Crush, target: Vigor.Health }, - { amount: 60, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 60, type: DamageType.Dominance, target: Vigor.Resolve } - )), cock) - - const slit = new Slit(this, 2, new ConstantDamageFormula(new Damage( - { amount: 30, type: DamageType.Crush, target: Vigor.Health }, - { amount: 60, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 60, type: DamageType.Dominance, target: Vigor.Resolve } - ))) - - const womb = new Womb(this, 2, new ConstantDamageFormula(new Damage( - { amount: 30, type: DamageType.Crush, target: Vigor.Health }, - { amount: 60, type: DamageType.Crush, target: Vigor.Stamina }, - { amount: 60, type: DamageType.Dominance, target: Vigor.Resolve } - )), slit) - - this.containers.push(balls) - this.containers.push(cock) - this.containers.push(womb) - this.containers.push(slit) - - biconnectContainers(cock, balls) - biconnectContainers(slit, womb) - } -} diff --git a/src/game/creatures/wolves.ts b/src/game/creatures/wolves.ts new file mode 100644 index 0000000..11b6a32 --- /dev/null +++ b/src/game/creatures/wolves.ts @@ -0,0 +1,74 @@ +import { Creature } from "../creature" +import { Damage, DamageType, ConstantDamageFormula, Vigor, Side, StatDamageFormula, Stat } from '../combat' +import { MalePronouns, ImproperNoun, FemalePronouns, TheyPronouns, Verb } from '../language' +import { Stomach, Bowels, anyVore } from '../vore' +import { AttackAction, TransferAction } from '../combat/actions' +import { VoreAI } from '../ai' + +export class Wolf extends Creature { + constructor () { + super( + new ImproperNoun('wolf', 'wolves'), + new ImproperNoun('wolf', 'wolves'), + [MalePronouns, FemalePronouns, TheyPronouns][Math.floor(Math.random() * 3)], + { Toughness: 15, Power: 20, Reflexes: 25, Agility: 25, Willpower: 5, Charm: 10 }, + anyVore, + anyVore, + 25 + ) + + this.side = Side.Monsters + this.ai = new VoreAI() + + this.actions.push( + new AttackAction( + new StatDamageFormula([ + { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Pierce }, + { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Crush } + ]), + new Verb("bite") + ) + ) + + const stomach = new Stomach(this, 2, new StatDamageFormula([ + { fraction: 3, stat: Stat.Toughness, target: Vigor.Health, type: DamageType.Acid }, + { fraction: 2, stat: Stat.Power, target: Vigor.Stamina, type: DamageType.Crush }, + { fraction: 1, stat: Stat.Charm, target: Vigor.Resolve, type: DamageType.Dominance } + ])) + this.containers.push(stomach) + } +} + +export class DireWolf extends Creature { + constructor () { + super( + new ImproperNoun('dire wolf', 'dire wolves'), + new ImproperNoun('dire wolf', 'dire wolves'), + [MalePronouns, FemalePronouns, TheyPronouns][Math.floor(Math.random() * 3)], + { Toughness: 25, Power: 40, Reflexes: 35, Agility: 45, Willpower: 15, Charm: 20 }, + anyVore, + anyVore, + 75 + ) + + this.side = Side.Monsters + this.ai = new VoreAI() + + this.actions.push( + new AttackAction( + new StatDamageFormula([ + { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Pierce }, + { fraction: 1, stat: Stat.Power, target: Vigor.Health, type: DamageType.Crush } + ]), + new Verb("bite") + ) + ) + + const stomach = new Stomach(this, 2, new StatDamageFormula([ + { fraction: 3, stat: Stat.Toughness, target: Vigor.Health, type: DamageType.Acid }, + { fraction: 2, stat: Stat.Power, target: Vigor.Stamina, type: DamageType.Crush }, + { fraction: 1, stat: Stat.Charm, target: Vigor.Resolve, type: DamageType.Dominance } + ])) + this.containers.push(stomach) + } +} diff --git a/src/game/maps/town.ts b/src/game/maps/town.ts index e3af450..a92538c 100644 --- a/src/game/maps/town.ts +++ b/src/game/maps/town.ts @@ -137,6 +137,24 @@ export const Town = (): Place => { ) ) + woods.choices.push( + new Choice( + "Fight a dire wolf", + "yolo", + (world, executor) => { + world.encounter = new Encounter( + { + name: "You punched a dire wolf", + intro: (world: World) => new LogLine(`You punched a dire wolf. The wolf is angry.`) + }, + [executor, new Creatures.DireWolf()] + ) + + return new LogLine(`FIGHT TIME`) + } + ) + ) + woods.choices.push( new Choice( "Fight a werewolf", @@ -411,11 +429,11 @@ export const Town = (): Place => { ) home.biconnect(Direction.South, debug) + debug.biconnect(Direction.South, bosses) home.biconnect(Direction.North, westAve) westAve.biconnect(Direction.West, westRoad) westAve.biconnect(Direction.North, alley) westRoad.biconnect(Direction.South, woods) - westRoad.biconnect(Direction.North, bosses) square.biconnect(Direction.East, eastAve) square.biconnect(Direction.West, westAve) square.biconnect(Direction.North, northAve)