forked from public/foundryvtt-reve-de-dragon
Jet de compétence V2
This commit is contained in:
@@ -20,7 +20,7 @@ export default class ChatRollResult {
|
|||||||
'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs',
|
'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs',
|
||||||
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
||||||
'partial-info-appel-moral': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-info-appel-moral.hbs',
|
'partial-info-appel-moral': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-info-appel-moral.hbs',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async display(roll) {
|
async display(roll) {
|
||||||
@@ -44,7 +44,7 @@ export default class ChatRollResult {
|
|||||||
roll.show.chance = this.isAppelChancePossible(roll)
|
roll.show.chance = this.isAppelChancePossible(roll)
|
||||||
roll.show.encaissement = this.isShowEncaissement(roll)
|
roll.show.encaissement = this.isShowEncaissement(roll)
|
||||||
roll.show.recul = this.getRecul(roll)
|
roll.show.recul = this.getRecul(roll)
|
||||||
roll.show.particuliere = roll.show.particuliere ?? []
|
//roll.show.particuliere = roll.show.particuliere ?? []
|
||||||
}
|
}
|
||||||
|
|
||||||
isAppelChancePossible(roll) {
|
isAppelChancePossible(roll) {
|
||||||
@@ -54,12 +54,16 @@ export default class ChatRollResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isShowEncaissement(roll) {
|
isShowEncaissement(roll) {
|
||||||
return roll.rolled.isEchec &&
|
switch (roll.type.current) {
|
||||||
roll.attackerRoll?.dmg.mortalite != 'empoignade'
|
case ROLL_TYPE_DEFENSE:
|
||||||
|
return roll.rolled.isEchec &&
|
||||||
|
roll.attackerRoll?.dmg.mortalite != 'empoignade'
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getRecul(roll, defender = roll.active.actor, attacker = roll.opponent.actor) {
|
getRecul(roll, defender = roll.active.actor, attacker = roll.opponent?.actor) {
|
||||||
switch (roll.type.current) {
|
switch (roll.type.current) {
|
||||||
case ROLL_TYPE_DEFENSE:
|
case ROLL_TYPE_DEFENSE:
|
||||||
{
|
{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="roll-chat">
|
<div class="roll-chat">
|
||||||
<div class="chat-img">
|
<div class="chat-img">
|
||||||
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
||||||
<img src="{{competence.img}}" data-tooltip="{{competence.name}}" />
|
<img src="{{current.comp.img}}" data-tooltip="{{current.comp.name}}" />
|
||||||
<img src="{{opponent.img}}" data-tooltip="{{opponent.name}}" />
|
<img src="{{opponent.img}}" data-tooltip="{{opponent.name}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
23
templates/roll/result/chat-comp.hbs
Normal file
23
templates/roll/result/chat-comp.hbs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<div class="roll-chat">
|
||||||
|
<div class="chat-img">
|
||||||
|
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
||||||
|
<img src="{{current.comp.img}}" data-tooltip="{{current.comp.name}}" />
|
||||||
|
</div>
|
||||||
|
<div class="chat-header">
|
||||||
|
{{active.name}} fait un jet de {{current.comp.label}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chat-resume">
|
||||||
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
|
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chat-details">
|
||||||
|
<p>Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptQualite}}
|
||||||
|
</p>
|
||||||
|
{{> 'partial-info-appel-moral'}}
|
||||||
|
</div>
|
||||||
|
<div class="chat-buttons">
|
||||||
|
{{> 'partial-appel-chance'}}
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="roll-chat">
|
<div class="roll-chat">
|
||||||
<div class="chat-img">
|
<div class="chat-img">
|
||||||
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
||||||
<img src="{{competence.img}}" data-tooltip="{{competence.name}}" />
|
<img src="{{current.comp.img}}" data-tooltip="{{current.comp.name}}" />
|
||||||
<img src="{{opponent.img}}" data-tooltip="{{opponent.name}}" />
|
<img src="{{opponent.img}}" data-tooltip="{{opponent.name}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="roll-chat">
|
<div class="roll-chat">
|
||||||
<div class="chat-img">
|
<div class="chat-img">
|
||||||
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
<img src="{{active.img}}" data-tooltip="{{active.name}}" />
|
||||||
<img src="{{competence.img}}" data-tooltip="{{competence.name}}" />
|
<img src="{{current.comp.img}}" data-tooltip="{{current.comp.name}}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-header">
|
<div class="chat-header">
|
||||||
{{active.name}} {{current.oeuvre.art.action}}: {{current.oeuvre.label}} (de niveau {{current.oeuvre.oeuvre.system.niveau}})
|
{{active.name}} {{current.oeuvre.art.action}}: {{current.oeuvre.label}} (de niveau {{current.oeuvre.oeuvre.system.niveau}})
|
||||||
|
Reference in New Issue
Block a user