Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
let choice1 = [
|
||||
{
|
||||
type : "skill",
|
||||
name : "Melee (Basic)",
|
||||
name : "Corps à corps (Base)",
|
||||
diff : {
|
||||
system : {
|
||||
advances : {
|
||||
@@ -14,7 +14,7 @@ let choice1 = [
|
||||
let choice2 = [
|
||||
{
|
||||
type : "skill",
|
||||
name : "Melee (Polearm)",
|
||||
name : "Corps à corps (Armes d'hast)",
|
||||
diff : {
|
||||
system : {
|
||||
advances : {
|
||||
@@ -28,7 +28,7 @@ let choice2 = [
|
||||
let choice3 = [
|
||||
{
|
||||
type : "skill",
|
||||
name : "Melee (Two-Handed)",
|
||||
name : "Corps à corps (A deux mains)",
|
||||
diff : {
|
||||
system : {
|
||||
advances : {
|
||||
@@ -39,45 +39,48 @@ let choice3 = [
|
||||
}
|
||||
]
|
||||
|
||||
let choice = await Dialog.wait({
|
||||
title : "Choice",
|
||||
content :
|
||||
let choice = await foundry.applications.api.DialogV2.wait({
|
||||
window : {title : "Choix"},
|
||||
content :
|
||||
`<p>
|
||||
Select your choice
|
||||
Sélectionnez votre choix
|
||||
</p>
|
||||
<ol>
|
||||
<li>Melee (Basic)</li>
|
||||
<li>Melee (Polearm)</li>
|
||||
<li>Melee (Two-Handed)</li>
|
||||
</ol>
|
||||
<li>Corps à corps (Base)</li>
|
||||
<li>Corps à corps (Armes d'hast)</li>
|
||||
<li>Corps à corps (A deux mains)</li>
|
||||
</ol>
|
||||
`,
|
||||
buttons : {
|
||||
1 : {
|
||||
label : "Basic",
|
||||
buttons : [
|
||||
{
|
||||
label : "Base",
|
||||
action : "basic",
|
||||
callback : () => {
|
||||
return choice1
|
||||
}
|
||||
},
|
||||
2 : {
|
||||
label : "Polearm",
|
||||
{
|
||||
label : "Armesd'hast",
|
||||
action : "polearm",
|
||||
callback : () => {
|
||||
return choice2
|
||||
}
|
||||
},
|
||||
3 : {
|
||||
label : "Two-Handed",
|
||||
{
|
||||
label : "A deux mains",
|
||||
action : "two-handed",
|
||||
callback : () => {
|
||||
return choice3
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
let updateObj = this.actor.toObject();
|
||||
let items = []
|
||||
for (let c of choice)
|
||||
{
|
||||
let existing
|
||||
let existing
|
||||
if (c.type == "skill")
|
||||
{
|
||||
existing = updateObj.items.find(i => i.name == c.name && i.type == c.type)
|
||||
|
||||
Reference in New Issue
Block a user