Skip to content

Commit

Permalink
Merge upstream and fix stats for monsters to include shield.
Browse files Browse the repository at this point in the history
  • Loading branch information
reissm committed Apr 15, 2018
1 parent 83a6b34 commit b94e0dd
Show file tree
Hide file tree
Showing 214 changed files with 1,156 additions and 383 deletions.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified e2e/app.e2e-spec.ts
100644 → 100755
Empty file.
Empty file modified e2e/app.po.ts
100644 → 100755
Empty file.
Empty file modified e2e/tsconfig.e2e.json
100644 → 100755
Empty file.
Empty file modified karma.conf.js
100644 → 100755
Empty file.
Empty file modified package-lock.json
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified protractor.conf.js
100644 → 100755
Empty file.
Empty file modified src/app/app.component.html
100644 → 100755
Empty file.
Empty file modified src/app/app.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/app.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/app.component.ts
100644 → 100755
Empty file.
12 changes: 11 additions & 1 deletion src/app/app.module.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ import { MonsterDeckComponent } from './components/monster-deck/monster-deck.com
import { CombatBandComponent } from './containers/combat-band/combat-band.component';
import { CombatDeckComponent } from './components/combat-deck/combat-deck.component';
import { CombatCardComponent } from './components/combat-card/combat-card.component';
import { TooltipComponent } from './components/tooltip/tooltip.component';

import { FilterPipe } from './pipes/filter.pipe';
import { OrderByPipe } from './pipes/order-by.pipe';

import { TooltipDirective } from './directives/tooltip.directive';

import { LineParserService } from './services/line-parser.service';
import { RetrievalService } from './services/retrieval.service';
import { ScenarioService } from './services/scenario.service';
import { MonsterCardService } from './services/monster-card.service';
import { CombatCardService } from './services/combat-card.service';
import { TooltipService } from './services/tooltip.service';

@NgModule({
declarations: [
Expand All @@ -48,6 +52,8 @@ import { CombatCardService } from './services/combat-card.service';
SearchDropdownComponent,
HealthTrackerComponent,
MonsterHealthComponent,
TooltipComponent,
TooltipDirective,
FilterPipe,
OrderByPipe
],
Expand All @@ -63,7 +69,11 @@ import { CombatCardService } from './services/combat-card.service';
RetrievalService,
ScenarioService,
MonsterCardService,
CombatCardService
CombatCardService,
TooltipService
],
entryComponents: [
TooltipComponent
],
bootstrap: [AppComponent]
})
Expand Down
Empty file modified src/app/components/action-button/action-button.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/components/action-button/action-button.component.ts
100644 → 100755
Empty file.
89 changes: 88 additions & 1 deletion src/app/components/combat-card/combat-card.component.scss
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,92 @@
height: 100%;
top: 0;
background-size: cover;
background-image: url(assets/cards/attack-modifiers/card-parts/attack-card-back.jpg);
background-image: url('assets/cards/attack-modifiers/card-parts/attack-card-back.jpg');
}

.blank-front {
position: absolute;
width: 100%;
height: 100%;
background-size: cover;
background-image: url('assets/cards/attack-modifiers/card-parts/attack-card-front.jpg');
}

.denomination {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
}

.denomination--min2 {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/minus2.png');
}

.denomination--min1 {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/minus1.png');
}

.denomination--zero {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/plus0.png');
}

.denomination--plus1 {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/plus1.png');
}

.denomination--plus2 {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/plus2.png');
}

.denomination--crit {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/crit.png');
}

.denomination--whiff {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/whiff.png');
}

.denomination--bless {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/crit-bless.png');
}

.denomination--curse {
width: 14em;
height: 12em;
background-size: cover;
position: absolute;
background-image: url('assets/cards/attack-modifiers/card-parts/whiff-curse.png');
}
10 changes: 8 additions & 2 deletions src/app/components/combat-card/combat-card.component.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ import { CombatCard } from '../../models/card.model';
template: `
<div class="card-back"></div>
<div class="card-front">
<div [ngClass]="getCardValue()"></div>
<div></div>
<div *ngIf="!showTwo" [ngClass]="getCardValue()"></div>
<div *ngIf="showTwo" class="blank-front">
<div [ngClass]="'denomination--' + advOne" [ngStyle]="{'left': '-4.5em'}"></div>
<div [ngClass]="'denomination--' + advTwo" [ngStyle]="{'left': '4.5em'}"></div>
</div>
</div>
`
})
export class CombatCardComponent {

@Input() card: CombatCard;
@Input() showTwo: boolean;
@Input() advOne: string;
@Input() advTwo: string;

constructor() {}

Expand Down
40 changes: 0 additions & 40 deletions src/app/components/combat-deck/combat-deck.component.scss
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,40 +0,0 @@
.denomination {
position: relative;
display: inline-block;

&-min2 {
background-image: url("assets/cards/attack-modifiers/card-parts/minus2.png");
}

&-min1 {
background-image: url("assets/cards/attack-modifiers/card-parts/minus1.png");
}

&-plus0 {
background-image: url("assets/cards/attack-modifiers/card-parts/plus0.png");
}

&-plus1 {
background-image: url("assets/cards/attack-modifiers/card-parts/plus1.png");
}

&-plus2 {
background-image: url("assets/cards/attack-modifiers/card-parts/plus2.png");
}

&-crit {
background-image: url("assets/cards/attack-modifiers/card-parts/crit.png");
}

&-whiff {
background-image: url("assets/cards/attack-modifiers/card-parts/whiff.png");
}

&-bless {
background-image: url("assets/cards/attack-modifiers/card-parts/crit-bless.png");
}

&-curse {
background-image: url("assets/cards/attack-modifiers/card-parts/whiff-curse.png");
}
}
18 changes: 15 additions & 3 deletions src/app/components/combat-deck/combat-deck.component.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { Card, CombatCard } from '../../models/card.model';
'flipped flip-to-front': toFlip,
'send-to-back': !toFlip
}"
[card]="activeCard">
[card]="activeCard"
[showTwo]="showTwo"
[advOne]="card1"
[advTwo]="card2">
</combat-card>
`
})
Expand All @@ -24,7 +27,10 @@ export class CombatDeckComponent implements OnInit{

deck: CombatDeck;
activeCard: CombatCard;
toFlip: boolean;
private toFlip: boolean;
private showTwo: boolean = false;
private card1: string;
private card2 : string;

ngOnInit() {
this.activeCard = new CombatCard(null, '');
Expand All @@ -37,6 +43,7 @@ export class CombatDeckComponent implements OnInit{
shuffle() {
this.deck.shuffle();
this.toFlip = false;
this.showTwo = false;

setTimeout(() => {
this.activeCard = this.deck.drawCard() as CombatCard;
Expand All @@ -49,10 +56,14 @@ export class CombatDeckComponent implements OnInit{
this.toFlip = false;
card1 = this.deck.drawCard() as CombatCard;
card2 = this.deck.drawCard() as CombatCard;
console.log(card1.value + ", " + card2.value);
this.card1 = card1.value;
this.card2 = card2.value;
this.showTwo = true;

this.toFlip = true;

this.activeCard = this.deck.drawCard() as CombatCard;
// this.activeCard = this.deck.drawCard() as CombatCard;
}

resetDeck() {
Expand All @@ -63,6 +74,7 @@ export class CombatDeckComponent implements OnInit{
flip() {
// Flip over previous card, show current one
this.toFlip = false;
this.showTwo = false;
if (['curse', 'bless'].includes(this.activeCard.value)) {
this.deck.removeCard(this.activeCard);
}
Expand Down
Empty file modified src/app/components/initative/initative.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/components/initative/initative.component.ts
100644 → 100755
Empty file.
11 changes: 4 additions & 7 deletions src/app/components/monster-card/monster-card.component.scss
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,10 @@
}

.shuffle {
grid-column-start: shuffle;
grid-column-end: span end-col;
grid-row-start: shuffle-row;
grid-row-end: span end-row;
align-self: end;
position: relative;
top: -1em;
position: absolute;
top: 82%;
left: 89%;
width: 2em;
height: 2em;
}
Expand All @@ -143,4 +140,4 @@
top: 0;
background-size: cover;
background-image: url(assets/cards/monster-ability-back.jpg);
}
}
Empty file modified src/app/components/monster-card/monster-card.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-deck/monster-deck.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-deck/monster-deck.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-health/monster-health.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-health/monster-health.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-modal/monster-modal.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/components/monster-modal/monster-modal.component.ts
100644 → 100755
Empty file.
Empty file.
Empty file modified src/app/components/search-dropdown/search-dropdown.component.ts
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions src/app/components/tooltip/tooltip.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.tooltip-container {
background-color: black;
color: #fff;
display: inline-block;
padding: 0.5em;
position: relative;
}
32 changes: 32 additions & 0 deletions src/app/components/tooltip/tooltip.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Component, Input, ElementRef, ChangeDetectorRef, AfterViewInit,
ViewChild, Inject, Directive } from "@angular/core";
import { TooltipDirective } from '../../directives/tooltip.directive';

@Directive({
selector: '.tooltip-container'
})
export class TooltipContainerDirective {
}

@Component({
styles: ['tooltip.component.scss'],
template: `
<div class="tooltip-container" [ngStyle]="{top: top}">
<ng-content></ng-content>
</div>
`
})
export class TooltipComponent implements AfterViewInit {
top: string;
@ViewChild(TooltipContainerDirective, { read: ElementRef }) private tooltipContainer;

constructor(@Inject('tooltipConfig') private config) { }

ngAfterViewInit() {
const {top} = this.config.host.getBoundingClientRect();
const {height} = this.tooltipContainer.nativeElement.getBoundingClientRect();
this.top = `${top - height}px`;
console.log("Hello");
}

}
Empty file modified src/app/containers/action-bar/action-bar.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/containers/action-bar/action-bar.component.ts
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions src/app/containers/combat-band/combat-band.component.scss
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ combat-deck {
background-image: url("assets/icons/shuffle-black.png");
}

.strengthen {
.draw-two {
position: relative;
display: inline-block;
background-image: url("assets/status/strengthen.png");
background-image: url("assets/icons/advantage.png");
}

.muddle {
.reset-deck {
position: relative;
display: inline-block;
background-image: url("assets/status/muddle.png");
background-image: url("assets/icons/reset-deck.png");
}
5 changes: 3 additions & 2 deletions src/app/containers/combat-band/combat-band.component.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { CombatCard } from '../../models/card.model';

import { CombatCardService } from '../../services/combat-card.service';
import { CombatDeckComponent } from '../../components/combat-deck/combat-deck.component';
import { TooltipComponent } from '../../components/tooltip/tooltip.component';

import 'rxjs/add/operator/map';

Expand All @@ -19,8 +20,8 @@ import 'rxjs/add/operator/map';
<div class="icon curse" (click)="addTempCard('curse')"></div>
<div class="icon bless" (click)="addTempCard('bless')"></div>
<div class="icon shuffle" (click)="shuffleDeck()"></div>
<div class="icon strengthen" (click)="drawTwo()"></div>
<div class="icon muddle" (click)="resetDeck()"></div>
<div class="icon draw-two" (click)="drawTwo()"></div>
<div class="icon reset-deck" (click)="resetDeck()"></div>
</div>
</div>
`
Expand Down
Empty file modified src/app/containers/health-tracker/health-tracker.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/containers/health-tracker/health-tracker.component.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified src/app/containers/monster-band/monster-band.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/containers/monster-band/monster-band.component.ts
100644 → 100755
Empty file.
Loading

0 comments on commit b94e0dd

Please sign in to comment.