Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ed18a1613 | |||
| 02baa50ef2 |
@ -6,14 +6,14 @@ Discord Link: TESTING NOT YET OPEN.
|
|||||||
|
|
||||||
## Release Tracker
|
## Release Tracker
|
||||||
### Current Release Version:
|
### Current Release Version:
|
||||||
Draft 1
|
Draft 2
|
||||||
|
|
||||||
### Next Target Release Version:
|
### Next Target Release Version:
|
||||||
Draft 2
|
Draft 3
|
||||||
|
|
||||||
## How to Use
|
## How to Use
|
||||||
### Installation
|
### Installation
|
||||||
You can install the sytem using the latest manifest file, found [here](https://raw.githubusercontent.com/walcutt/hench/refs/heads/develop/system.json).
|
You can install the sytem using the latest manifest file, found [here](https://git.chloeherd.codes/walcutt/hench/raw/branch/develop/system.json).
|
||||||
|
|
||||||
### Gameplay
|
### Gameplay
|
||||||
- Make sure to add a deck in the cards section, using one of the presets.
|
- Make sure to add a deck in the cards section, using one of the presets.
|
||||||
@ -25,4 +25,4 @@ You can install the sytem using the latest manifest file, found [here](https://r
|
|||||||
- Make sure to give your players "Owner" access to the deck so they can use it! Even with that, only GMs can edit the deck.
|
- Make sure to give your players "Owner" access to the deck so they can use it! Even with that, only GMs can edit the deck.
|
||||||
|
|
||||||
### Bugs?
|
### Bugs?
|
||||||
Report them on the [issues](https://github.com/walcutt/hench/issues) page!
|
Report them on the [issues](https://git.chloeherd.codes/walcutt/hench/issues) page!
|
||||||
@ -13,6 +13,7 @@ export class HenchCardDataModel extends foundry.abstract.TypeDataModel {
|
|||||||
return {
|
return {
|
||||||
cue: new StringField({required: true, blank: true, initial: ""}),
|
cue: new StringField({required: true, blank: true, initial: ""}),
|
||||||
zone: new StringField({required: true, blank: false, initial: CARD_ZONES.DECK, options: CARD_ZONES}),
|
zone: new StringField({required: true, blank: false, initial: CARD_ZONES.DECK, options: CARD_ZONES}),
|
||||||
|
note: new StringField({required: false, blank: true, initial: ""}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -134,6 +134,7 @@ export class HenchCards extends Cards {
|
|||||||
return {
|
return {
|
||||||
_id: c._id,
|
_id: c._id,
|
||||||
['system.zone']: zone,
|
['system.zone']: zone,
|
||||||
|
['system.note']: "",
|
||||||
sort: destIndex
|
sort: destIndex
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,9 +25,9 @@ export class HenchCardsSheet extends CardsConfig {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.hench-cards-action-play').on('click', async (event) => {
|
html.find('.hench-cards-action-spread-play').on('click', async (event) => {
|
||||||
const element = event.currentTarget;
|
const element = event.currentTarget;
|
||||||
const index = element.dataset.cardIndex;
|
const index = parseInt(element.dataset.cardIndex);
|
||||||
|
|
||||||
// play the card!
|
// play the card!
|
||||||
const card = this.document.spread[index];
|
const card = this.document.spread[index];
|
||||||
@ -36,6 +36,23 @@ export class HenchCardsSheet extends CardsConfig {
|
|||||||
await this.document.sendCards(this.document.spread, CARD_ZONES.DECK, CONST.CARD_DRAW_MODES.BOTTOM);
|
await this.document.sendCards(this.document.spread, CARD_ZONES.DECK, CONST.CARD_DRAW_MODES.BOTTOM);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find('.hench-cards-action-hold-play').on('click', async (event) => {
|
||||||
|
const element = event.currentTarget;
|
||||||
|
const index = parseInt(element.dataset.cardIndex);
|
||||||
|
|
||||||
|
// play the card!
|
||||||
|
const card = this.document.held[index];
|
||||||
|
this.playCard(card);
|
||||||
|
await this.document.sendCards(this.document.held.slice(index, index + 1), CARD_ZONES.DISCARD, CONST.CARD_DRAW_MODES.TOP);
|
||||||
|
});
|
||||||
|
|
||||||
|
html.find('.hench-cards-action-spread-hold').on('click', async (event) => {
|
||||||
|
const element = event.currentTarget;
|
||||||
|
const index = parseInt(element.dataset.cardIndex);
|
||||||
|
|
||||||
|
await this.document.sendCards(this.document.spread.slice(index, index + 1), CARD_ZONES.HELD);
|
||||||
|
});
|
||||||
|
|
||||||
html.find('.hench-card-action-play-held').on('click', async (event) => {
|
html.find('.hench-card-action-play-held').on('click', async (event) => {
|
||||||
// play the card!
|
// play the card!
|
||||||
const card = this.document.held[0];
|
const card = this.document.held[0];
|
||||||
@ -66,6 +83,23 @@ export class HenchCardsSheet extends CardsConfig {
|
|||||||
const discard = new HenchDiscardView(this.document);
|
const discard = new HenchDiscardView(this.document);
|
||||||
discard.render(true);
|
discard.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find('.hench-cards-held-note').on('change', async (event) => {
|
||||||
|
const element = event.currentTarget;
|
||||||
|
const id = element.dataset.cardId;
|
||||||
|
|
||||||
|
const value = element.value;
|
||||||
|
const subPath = element.dataset.field;
|
||||||
|
|
||||||
|
const mutation = [
|
||||||
|
{
|
||||||
|
_id: id,
|
||||||
|
[subPath]: value,
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
await this.document.updateCards(mutation);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
|
|||||||
@ -29,11 +29,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#topCard document "HELD"}}
|
|
||||||
<div class="hench-box hench-flex-resizeable hench-card-fixed-item {{#if hasTopCard}}hench-card-action-play-held hench-clickable{{/if}}">
|
|
||||||
<img class="hench-image-resize-vertical" src="{{#if hasTopCard}}{{topCardImage}}{{/if}}" />
|
|
||||||
</div>
|
|
||||||
{{/topCard}}
|
|
||||||
<div class="hench-box hench-flex-resizeable hench-gap-narrow hench-row-even">
|
<div class="hench-box hench-flex-resizeable hench-gap-narrow hench-row-even">
|
||||||
<div class="hench-row hench-padding-narrow hench-white hench-centered hench-clickable hench-cards-action-reset">
|
<div class="hench-row hench-padding-narrow hench-white hench-centered hench-clickable hench-cards-action-reset">
|
||||||
<span class="hench-flex-resizeable">
|
<span class="hench-flex-resizeable">
|
||||||
@ -62,10 +57,44 @@
|
|||||||
<!-- Spread -->
|
<!-- Spread -->
|
||||||
<div class="hench-row hench-flex-resizeable hench-gap-wide">
|
<div class="hench-row hench-flex-resizeable hench-gap-wide">
|
||||||
<div class="hench-box hench-m-grey hench-flex-resizeable hench-padding-wide hench-gap-narrow">
|
<div class="hench-box hench-m-grey hench-flex-resizeable hench-padding-wide hench-gap-narrow">
|
||||||
|
<div class="hench-title hench-centered">
|
||||||
|
Spread
|
||||||
|
</div>
|
||||||
<div class="hench-row hench-row-even hench-gap-narrow">
|
<div class="hench-row hench-row-even hench-gap-narrow">
|
||||||
{{#each document.spread}}
|
{{#each document.spread}}
|
||||||
<div class="hench-box hench-flex-resizeable hench-card-fixed-item hench-clickable hench-cards-action-play" data-card-index="{{@index}}">
|
<div class="hench-box hench-flex-resizeable hench-card-fixed-item hench-gap-narrow" data-card-index="{{@index}}">
|
||||||
<img class="hench-image-resize-vertical" src="{{this.currentFace.img}}" title="{{this.system.cue}}" />
|
<img class="hench-image-resize-vertical hench-clickable hench-cards-action-spread-play" src="{{this.currentFace.img}}" title="{{this.system.cue}}" data-card-index="{{@index}}" />
|
||||||
|
<div class="hench-row hench-gap-narrow">
|
||||||
|
<div class="hench-flex-resizeable hench-white hench-padding-narrow hench-centered hench-clickable hench-cards-action-spread-hold" data-card-index="{{@index}}">
|
||||||
|
<span>
|
||||||
|
Hold
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="hench-flex-resizeable hench-white hench-padding-narrow hench-centered hench-clickable hench-cards-action-spread-play" data-card-index="{{@index}}">
|
||||||
|
<span>
|
||||||
|
Play
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="hench-box hench-flex-resizeable hench-card-fixed-item hench-card-empty"></div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hench-row hench-flex-resizeable hench-gap-wide">
|
||||||
|
<div class="hench-box hench-m-grey hench-flex-resizeable hench-padding-wide hench-gap-narrow">
|
||||||
|
<div class="hench-title hench-centered">
|
||||||
|
Held Cards
|
||||||
|
</div>
|
||||||
|
<div class="hench-row hench-row-even hench-gap-narrow">
|
||||||
|
{{#each document.held}}
|
||||||
|
<div class="hench-box hench-flex-resizeable hench-card-fixed-item">
|
||||||
|
<img class="hench-image-resize-vertical hench-clickable hench-cards-action-hold-play" src="{{this.currentFace.img}}" title="{{this.system.cue}}" data-card-index="{{@index}}" />
|
||||||
|
<div>
|
||||||
|
<input type="text" name="hold-{{@index}}-note" class="hench-text-input hench-flex-resizeable hench-cards-held-note" value="{{this.system.note}}" data-card-id="{{this._id}}" data-field="system.note" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="hench-box hench-flex-resizeable hench-card-fixed-item hench-card-empty"></div>
|
<div class="hench-box hench-flex-resizeable hench-card-fixed-item hench-card-empty"></div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user