| @@ -1,10 +1,10 @@ | |||
| <template> | |||
| <div class="combat-layout"> | |||
| <div @wheel="horizWheelLeft" class="stat-column" id="left-stats"> | |||
| <Statblock v-on:click.native="left = combatant" class="left-stats" :data-active="combatant === left" v-for="(combatant, index) in combatants.filter(c => c.side == Side.Heroes && !c.digested)" v-bind:key="'left-stat-' + index" :subject="combatant" /> | |||
| <Statblock @selectAlly="right = combatant" @select="left = combatant" class="left-stats" :data-active="combatant === left" :data-active-ally="combatant === right" v-for="(combatant, index) in combatants.filter(c => c.side == Side.Heroes && !c.digested)" v-bind:key="'left-stat-' + index" :subject="combatant" /> | |||
| </div> | |||
| <div @wheel="horizWheelRight" class="stat-column" id="right-stats"> | |||
| <Statblock v-on:click.native="right = combatant" class="right-stats" :data-active="combatant === right" v-for="(combatant, index) in combatants.filter(c => c.side == Side.Monsters && !c.digested)" v-bind:key="'right-stat-' + index" :subject="combatant" /> | |||
| <Statblock @selectAlly="left = combatant" @select="right = combatant" class="right-stats" :data-active="combatant === right" :data-active-ally="combatant === left" v-for="(combatant, index) in combatants.filter(c => c.side == Side.Monsters && !c.digested)" v-bind:key="'right-stat-' + index" :subject="combatant" /> | |||
| </div> | |||
| <div id="log"> | |||
| </div> | |||
| @@ -258,6 +258,9 @@ a { | |||
| .statblock:hover[data-active] { | |||
| background: #666; | |||
| } | |||
| .statblock:hover[data-active-ally] { | |||
| background: #966; | |||
| } | |||
| .action-label { | |||
| font-size: 200%; | |||
| } | |||
| @@ -1,5 +1,5 @@ | |||
| <template> | |||
| <div class="statblock"> | |||
| <div @click="$emit('select')" class="statblock"> | |||
| <h2 class="name" v-if="subject.perspective === firstperson"> | |||
| You | |||
| <div class="tooltip-template"> | |||
| @@ -45,7 +45,9 @@ | |||
| </div> | |||
| </div> | |||
| <div>Status: {{subject.status}}</div> | |||
| <button @click="subject.perspective = firstperson">First-person</button> | |||
| <button v-if="subject.perspective !== firstperson" @click="subject.perspective = firstperson">First-person</button> | |||
| <button v-if="subject.perspective !== thirdperson" @click="subject.perspective = thirdperson">Third-person</button> | |||
| <button @click.stop="$emit('selectAlly')">Select ally as target</button> | |||
| </div> | |||
| </template> | |||
| @@ -95,6 +97,7 @@ export default class Statblock extends Vue { | |||
| private vigor = Vigor | |||
| firstperson: POV = POV.First | |||
| thirdperson: POV = POV.Third | |||
| mounted () { | |||
| const statEntries = Array.from(this.$el.querySelectorAll(".stat-entry")) | |||
| @@ -202,6 +205,11 @@ a { | |||
| border-radius: 4px; | |||
| } | |||
| .statblock[data-active-ally] { | |||
| background: #744; | |||
| border-radius: 4px; | |||
| } | |||
| .statblock[data-active] .stats, | |||
| .statblock[data-active] .vore-stats { | |||
| display: flex; | |||
| @@ -4,7 +4,7 @@ import { Entity, POV, Creature } from '../entity' | |||
| import { Damage, DamageFormula, Stat, Vigor, Action } from '../combat' | |||
| import { LogLine, LogLines, LogEntry, CompositeLog } from '../interface' | |||
| import { VoreContainer, Container } from '../vore' | |||
| import { CapableCondition, DrainedVigorCondition, TogetherCondition, EnemyCondition, SoloCondition, PairCondition } from './conditions' | |||
| import { CapableCondition, UserDrainedVigorCondition, TogetherCondition, EnemyCondition, SoloCondition, PairCondition } from './conditions' | |||
| export class AttackAction extends Action { | |||
| protected test: StatTest | |||
| @@ -123,7 +123,7 @@ export class FeedAction extends Action { | |||
| super( | |||
| 'Feed', | |||
| 'Feed yourself to your opponent', | |||
| [new DrainedVigorCondition(Vigor.Resolve), new TogetherCondition()] | |||
| [new UserDrainedVigorCondition(Vigor.Resolve), new TogetherCondition()] | |||
| ) | |||
| this.name += ` (${container.name})` | |||
| this.test = new StatTest(Stat.Power) | |||
| @@ -260,7 +260,7 @@ export class TransferAction extends Action { | |||
| lines: POVPairArgs<Entity, Entity, { from: Container; to: Container }> = new POVPairArgs([ | |||
| [[POV.First, POV.Third], (user, target, args) => new LogLine(`You squeeze ${target.name} from your ${args.from.name} to your ${args.to.name}`)], | |||
| [[POV.Third, POV.First], (user, target, args) => new LogLine(`You're squeezed from ${user.name}'s ${args.from.name} to ${user.pronouns.possessive} ${args.to.name}`)], | |||
| [[POV.Third, POV.Third], (user, target, args) => new LogLine(`${user.name} squeezes ${target.name} from ${user.pronouns.possessive} ${args.from.name.all} to ${user.pronouns.possessive} ${args.to.name.all}`)] | |||
| [[POV.Third, POV.Third], (user, target, args) => new LogLine(`${user.name} sends ${target.name} from ${user.pronouns.possessive} ${args.from.name.all} to ${user.pronouns.possessive} ${args.to.name.all}`)] | |||
| ]) | |||
| allowed (user: Creature, target: Creature) { | |||
| @@ -11,13 +11,14 @@ export class InverseCondition implements Condition { | |||
| } | |||
| } | |||
| export class CapableCondition implements Condition { | |||
| allowed (user: Creature, target: Creature): boolean { | |||
| return !user.disabled | |||
| } | |||
| } | |||
| export class DrainedVigorCondition implements Condition { | |||
| export class UserDrainedVigorCondition implements Condition { | |||
| allowed (user: Creature, target: Creature): boolean { | |||
| return user.vigors[this.vigor] <= 0 | |||
| } | |||
| @@ -27,6 +28,16 @@ export class DrainedVigorCondition implements Condition { | |||
| } | |||
| } | |||
| export class TargetDrainedVigorCondition implements Condition { | |||
| allowed (user: Creature, target: Creature): boolean { | |||
| return target.vigors[this.vigor] <= 0 | |||
| } | |||
| constructor (private vigor: Vigor) { | |||
| } | |||
| } | |||
| export class SoloCondition implements Condition { | |||
| allowed (user: Creature, target: Creature): boolean { | |||
| return user === target | |||
| @@ -16,7 +16,7 @@ export class Kenzie extends Creature { | |||
| new ImproperNoun('lycanroc', 'lycanrocs'), | |||
| FemalePronouns, | |||
| { Toughness: 60, Power: 70, Speed: 40, Willpower: 60, Charm: 120 }, | |||
| new Set(), | |||
| new Set([VoreType.Oral]), | |||
| new Set([VoreType.Oral]), | |||
| 1000 | |||
| ) | |||