| @@ -26,8 +26,6 @@ export default class App extends Vue { | |||||
| constructor () { | constructor () { | ||||
| super() | super() | ||||
| console.log(new Creatures.Cafat()) | |||||
| const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, { | const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, { | ||||
| stats: { | stats: { | ||||
| Toughness: 20, | Toughness: 20, | ||||
| @@ -77,7 +75,8 @@ export default class App extends Vue { | |||||
| const kenzie = new Creatures.Kenzie() | const kenzie = new Creatures.Kenzie() | ||||
| const cafat = new Creatures.Cafat() | const cafat = new Creatures.Cafat() | ||||
| const wolf = new Creatures.Wolf() | const wolf = new Creatures.Wolf() | ||||
| const combatants = [fighter, withers, wizard, rogue, cleric, kenzie, cafat, wolf] | |||||
| const dragon = new Creatures.Dragon() | |||||
| const combatants = [fighter, wizard, rogue, cleric, withers, kenzie, cafat, wolf, dragon] | |||||
| this.encounter = new Encounter(combatants) | this.encounter = new Encounter(combatants) | ||||
| console.log(this.encounter) | console.log(this.encounter) | ||||
| } | } | ||||
| @@ -188,6 +188,21 @@ export default class Combat extends Vue { | |||||
| if (leftStats !== null) { | if (leftStats !== null) { | ||||
| leftStats.scrollTo(leftStats.getBoundingClientRect().width * 2, 0) | leftStats.scrollTo(leftStats.getBoundingClientRect().width * 2, 0) | ||||
| } | } | ||||
| this.encounter.nextMove() | |||||
| if (this.encounter.currentMove.side === Side.Heroes) { | |||||
| this.$data.left = this.encounter.currentMove | |||||
| } else if (this.encounter.currentMove.side === Side.Monsters) { | |||||
| this.$data.right = this.encounter.currentMove | |||||
| } | |||||
| // scroll to the newly selected creature | |||||
| this.$nextTick(() => { | |||||
| const creature: HTMLElement|null = this.$el.querySelector("[data-current-turn]") | |||||
| if (creature !== null) { | |||||
| creature.scrollIntoView() | |||||
| } | |||||
| }) | |||||
| } | } | ||||
| } | } | ||||
| </script> | </script> | ||||
| @@ -4,5 +4,5 @@ import { Cafat } from './creatures/cafat' | |||||
| import { Human } from './creatures/human' | import { Human } from './creatures/human' | ||||
| import { Withers } from './creatures/withers' | import { Withers } from './creatures/withers' | ||||
| import { Kenzie } from './creatures/kenzie' | import { Kenzie } from './creatures/kenzie' | ||||
| export { Wolf, Player, Cafat, Human, Withers, Kenzie } | |||||
| import { Dragon } from './creatures/dragon' | |||||
| export { Wolf, Player, Cafat, Human, Withers, Kenzie, Dragon } | |||||
| @@ -0,0 +1,44 @@ | |||||
| import { Creature } from "../creature" | |||||
| import { Damage, DamageType, ConstantDamageFormula, Vigor, Side } from '../combat' | |||||
| import { MalePronouns, ImproperNoun, FemalePronouns, Verb } from '../language' | |||||
| import { VoreType, Stomach, Bowels } from '../vore' | |||||
| import { AttackAction, TransferAction, FeedAction } from '../combat/actions' | |||||
| export class Dragon extends Creature { | |||||
| constructor () { | |||||
| super(new ImproperNoun('dragon', 'dragons'), new ImproperNoun('wolf', 'wolves'), FemalePronouns, { Toughness: 35, Power: 35, Speed: 15, Willpower: 30, Charm: 20 }, new Set([VoreType.Oral, VoreType.Anal]), new Set([VoreType.Oral, VoreType.Anal]), 300) | |||||
| this.actions.push( | |||||
| new AttackAction( | |||||
| new ConstantDamageFormula( | |||||
| new Damage( | |||||
| { amount: 20, type: DamageType.Pierce, target: Vigor.Health } | |||||
| ) | |||||
| ), | |||||
| new Verb("bite", "bites", "biting", "bit") | |||||
| ) | |||||
| ) | |||||
| this.side = Side.Monsters | |||||
| const stomach = new Stomach(this, 50, new Damage( | |||||
| { amount: 40, type: DamageType.Acid, target: Vigor.Health }, | |||||
| { amount: 20, type: DamageType.Crush, target: Vigor.Stamina }, | |||||
| { amount: 20, type: DamageType.Dominance, target: Vigor.Resolve } | |||||
| )) | |||||
| this.containers.push(stomach) | |||||
| const bowels = new Bowels(this, 50, new Damage( | |||||
| { amount: 10, type: DamageType.Crush, target: Vigor.Health }, | |||||
| { amount: 25, type: DamageType.Crush, target: Vigor.Stamina }, | |||||
| { amount: 50, type: DamageType.Dominance, target: Vigor.Resolve } | |||||
| )) | |||||
| this.containers.push(bowels) | |||||
| this.actions.push(new TransferAction(bowels, stomach)) | |||||
| this.actions.push(new TransferAction(stomach, bowels)) | |||||
| this.otherActions.push(new FeedAction(stomach)) | |||||
| } | |||||
| } | |||||