@@ -7,58 +7,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
//pop up the death save dialog box
|
||||
new Dialog({
|
||||
title: `Death Save`,
|
||||
new new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Death Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/rolltables/death_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Death Save</h3><strong>Whenever you reach 0 Health, make a Body Save: Failure means you die.</strong> Success means you fall unconscious, make a <strong>Death Save</strong> to find out when you regain consciousness. Crew members with a medscanner, relevant skills like First Aid or Biology, or scientists and androids who pass an <strong>Intellect Check</strong> can determine your condition.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Death Save</h4>
|
||||
<strong>Whenever you reach 0 Health, make a Body Save: Failure means you die.</strong> Success means you fall unconscious, make a <strong>Death Save</strong> to find out when you regain consciousness. Crew members with a medscanner, relevant skills like First Aid or Biology, or scientists and androids who pass an <strong>Intellect Check</strong> can determine your condition.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Select your roll type:</h4>
|
||||
<div class="macro_prompt">
|
||||
Select your roll type:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Advantage`,
|
||||
action: `action_advantage`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [+]`,`high`,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Normal`,
|
||||
action: `action_normal`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10`,`high`,false,false,null,null),
|
||||
icon: `<i class="fas fa-minus"></i>`
|
||||
icon: `fas fa-minus`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Disadvantage`,
|
||||
action: `action_disadvantage`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table0eDeath'),`1d10 [-]`,`high`,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,59 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Calm`,
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Gain Calm"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Gain Calm</h3>Occasionally, certain moments, places, or events can automatically <strong>calm you down.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.</div>
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Gain Calm</h4>
|
||||
Occasionally, certain moments, places, or events can automatically <strong>calm you down.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
<h4>Select your modification:</h4>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
label: `Gain 5 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),
|
||||
icon: `<i class="fas fa-angle-up"></i>`
|
||||
},
|
||||
button2: {
|
||||
label: `Gain 10 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
},
|
||||
button3: {
|
||||
label: `Gain 1d20 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-up"></i>`
|
||||
}
|
||||
`,
|
||||
buttons: [
|
||||
{
|
||||
label: `Gain 5 Calm`,
|
||||
action: `gain_5`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),
|
||||
icon: `fas fa-angle-up`
|
||||
},
|
||||
{
|
||||
label: `Gain 10 Calm`,
|
||||
action: `gain_10`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
{
|
||||
label: `Gain 1d20 Calm`,
|
||||
action: `gain_1d20`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),
|
||||
icon: `fas fa-arrow-circle-up`
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Stress`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Gain Stress"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Gain Stress</h3><strong>You gain 1 Stress every time you fail a Stat Check or Save.</strong> Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your <strong>Minimum Stress</strong> starts at 2, and the <strong>Maximum Stress you can have is 20.</strong> Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Gain Stress</h4>
|
||||
<strong>You gain 1 Stress every time you fail a Stat Check or Save.</strong> Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your <strong>Minimum Stress</strong> starts at 2, and the <strong>Maximum Stress you can have is 20.</strong> Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Gain 1 Stress`,
|
||||
action: `gain_1`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),
|
||||
icon: `<i class="fas fa-angle-up"></i>`
|
||||
icon: `fas fa-angle-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Gain 2 Stress`,
|
||||
action: `gain_2`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Gain 1d5 Stress`,
|
||||
action: `gain_1d5`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-up"></i>`
|
||||
icon: `fas fa-arrow-circle-up`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Lose Calm`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Lose Calm"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Lose Calm</h3>Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your <strong>Maximum Calm</strong> caps out at 85 and cannot go lower than zero.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Lose Calm</h4>
|
||||
Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your <strong>Maximum Calm</strong> caps out at 85 and cannot go lower than zero.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Lose 5 Calm`,
|
||||
action: `lose_5`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),
|
||||
icon: `<i class="fas fa-angle-down"></i>`
|
||||
icon: `fas fa-angle-down`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Lose 10 Calm`,
|
||||
action: `lose_10`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Lose 1d20 Calm`,
|
||||
action: `lose_1d20`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-down"></i>`
|
||||
icon: `fas fa-arrow-circle-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -7,59 +7,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
//pop up the panic check dialog box
|
||||
new Dialog({
|
||||
title: `Panic Check`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Panic Check"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/rolltables/panic_check.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Panic Check</h3>Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a <strong>Panic Check</strong>. Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called <strong>Conditions</strong>, and they affect you until you are able to treat them.
|
||||
<div class="macro_desc">
|
||||
<h4>Panic Check</h4>
|
||||
Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a <strong>Panic Check</strong>. Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called <strong>Conditions</strong>, and they affect you until you are able to treat them.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Select your roll type:</h4>
|
||||
<div class="macro_prompt">
|
||||
Select your roll type:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Advantage`,
|
||||
action: `action_advantage`,
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Normal`,
|
||||
action: `action_normal`,
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-minus"></i>`
|
||||
icon: `fas fa-minus`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Disadvantage`,
|
||||
action: `action_disadvantage`,
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Stress`,
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Relieve Stress"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Relieve Stress</h3>Occasionally, certain moments, places, or events can automatically <strong>relieve your stress.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.</div>
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Relieve Stress</h4>
|
||||
Occasionally, certain moments, places, or events can automatically <strong>relieve your stress.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
label: `Relieve 1 Stress`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),
|
||||
icon: `<i class="fas fa-angle-down"></i>`
|
||||
},
|
||||
button2: {
|
||||
label: `Relieve 2 Stress`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
},
|
||||
button3: {
|
||||
label: `Relieve 1d5 Stress`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-down"></i>`
|
||||
}
|
||||
`,
|
||||
buttons: [
|
||||
{
|
||||
label: `Relieve 1 Stress`,
|
||||
action: `relieve_1`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),
|
||||
icon: `fas fa-angle-down`
|
||||
},
|
||||
{
|
||||
label: `Relieve 2 Stress`,
|
||||
action: `relieve_2`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),
|
||||
icon: `fas fa-angle-double-down`
|
||||
},
|
||||
{
|
||||
label: `Relieve 1d5 Stress`,
|
||||
action: `relieve_1d5`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),
|
||||
icon: `fas fa-arrow-circle-down`
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,47 +6,30 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Rest Save`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Rest Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/rest_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Rest Save</h3>You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; <strong>if you fail, you gain 1 Stress instead.</strong> Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/rest_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Rest Save</h4>
|
||||
You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; <strong>if you fail, you gain 1 Stress instead.</strong> Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
action: `next`,
|
||||
callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 237}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
+25
-42
@@ -6,43 +6,25 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Save`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center; //do I need this
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Save</h3>You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. <strong>If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Save</h4>
|
||||
You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. <strong>If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="san">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="san" name="save" value="sanity" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/sanity.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -54,8 +36,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="fer">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="fer" name="save" value="fear">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/fear.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -67,8 +49,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="bod">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="bod" name="save" value="body">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/body.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -80,8 +62,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="arm">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="arm" name="save" value="armor">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/armor.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -93,12 +75,13 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
action: `next`,
|
||||
callback: (html) => game.mosh.initRollCheck(null,'low',html.find("input[name='save']:checked").val(),null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 545}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,44 +6,25 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Stat Check`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Stat Check"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center; //do I need this
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/stat_check.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Stat Check</h3>You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. <strong>If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Stat Check</h4>
|
||||
You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. <strong>If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="str">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="str" name="stat" value="strength" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/strength.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -55,8 +36,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="spd">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="spd" name="stat" value="speed">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/speed.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -68,8 +49,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="int">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="int" name="stat" value="intellect">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/intellect.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -81,8 +62,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="com">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="com" name="stat" value="combat">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/combat.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -94,12 +75,13 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
action: `next`,
|
||||
callback: (html) => game.mosh.initRollCheck(null,'low',html.find("input[name='stat']:checked").val(),null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 545}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -7,58 +7,47 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
//pop up the death save dialog box
|
||||
new Dialog({
|
||||
title: `Death Save`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Death Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: { width: 600 },
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/rolltables/death_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Death Save</h3>Your character is incapacitated when you receive a fatal wound, or once your Current Wounds equal your Maximum Wounds. As soon as someone spends a turn checking your vitals, make a <strong>Death Save</strong> to reveal your fate. If your death seems imminent, make your last moments count: save someone’s life, solve an important mystery, or give the others time to escape.</div>
|
||||
<div class="macro_img">
|
||||
<img src="systems/mosh/images/icons/ui/rolltables/death_save.png" />
|
||||
</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Death Save</h4>
|
||||
Your character is incapacitated when you receive a fatal wound, or once your Current Wounds equal your Maximum Wounds. As soon as someone spends a turn checking your vitals, make a <strong>Death Save</strong> to reveal your fate. If your death seems imminent, make your last moments count: save someone’s life, solve an important mystery, or give the others time to escape.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Select your roll type:</h4>
|
||||
<div class="macro_prompt">
|
||||
Select your roll type:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
label: `Advantage`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10 [+]`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
buttons: [
|
||||
{
|
||||
label: "Advantage",
|
||||
action: "action_advantage",
|
||||
callback: () => game.mosh.initRollTable(game.settings.get("mosh","table1eDeath"), "1d10 [+]", "low", true, false, null, null),
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button2: {
|
||||
label: `Normal`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-minus"></i>`
|
||||
{
|
||||
label: "Normal",
|
||||
action: "action_normal",
|
||||
callback: () => game.mosh.initRollTable(game.settings.get("mosh","table1eDeath"), "1d10", "low", true, false, null, null),
|
||||
icon: `fas fa-minus`
|
||||
},
|
||||
button3: {
|
||||
label: `Disadvantage`,
|
||||
callback: () => game.mosh.initRollTable(game.settings.get('mosh','table1eDeath'),`1d10 [-]`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
{
|
||||
label: "Disadvantage",
|
||||
action: "action_disadvantage",
|
||||
callback: () => game.mosh.initRollTable(game.settings.get("mosh","table1eDeath"), "1d10 [-]", "low", true, false, null, null),
|
||||
icon: `fas fa-angle-double-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({ force: true });
|
||||
}
|
||||
@@ -6,59 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Calm`,
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Gain Calm"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Gain Calm</h3>Occasionally, certain moments, places, or events can automatically <strong>calm you down.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.</div>
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Gain Calm</h4>
|
||||
Occasionally, certain moments, places, or events can automatically <strong>calm you down.</strong> Escaping perilous situations, like finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your Calm is getting close to 0, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
<h4>Select your modification:</h4>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
label: `Gain 5 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),
|
||||
icon: `<i class="fas fa-angle-up"></i>`
|
||||
},
|
||||
button2: {
|
||||
label: `Gain 10 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
},
|
||||
button3: {
|
||||
label: `Gain 1d20 Calm`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-up"></i>`
|
||||
}
|
||||
`,
|
||||
buttons: [
|
||||
{
|
||||
label: `Gain 5 Calm`,
|
||||
action: 'button_1',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',5,null,true),
|
||||
icon: `fas fa-angle-up`
|
||||
},
|
||||
{
|
||||
label: `Gain 10 Calm`,
|
||||
action: 'button_2',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',10,null,true),
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
{
|
||||
label: `Gain 1d20 Calm`,
|
||||
action: 'button_3',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d20`,true),
|
||||
icon: `fas fa-arrow-circle-up`
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Stress`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Gain Stress"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Gain Stress</h3><strong>You gain 1 Stress every time you fail a Stat Check or Save.</strong> Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your <strong>Minimum Stress</strong> starts at 2, and the <strong>Maximum Stress you can have is 20.</strong> Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Gain Stress</h4>
|
||||
<strong>You gain 1 Stress every time you fail a Stat Check or Save.</strong> Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. Your <strong>Minimum Stress</strong> starts at 2, and the <strong>Maximum Stress you can have is 20.</strong> Any Stress you take over 20 instead reduces the most relevant Stat or Save by that amount.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Gain 1 Stress`,
|
||||
action: 'button_1',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',1,null,true),
|
||||
icon: `<i class="fas fa-angle-up"></i>`
|
||||
icon: `fas fa-angle-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Gain 2 Stress`,
|
||||
action: 'button_2',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',2,null,true),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Gain 1d5 Stress`,
|
||||
action: 'button_3',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`1d5`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-up"></i>`
|
||||
icon: `fas fa-arrow-circle-up`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Lose Calm`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Lose Calm"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/gain_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Lose Calm</h3>Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your <strong>Maximum Calm</strong> caps out at 85 and cannot go lower than zero.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
<div class ='macro_window' style='margin-bottom : 7px;'>
|
||||
<div class='grid grid-2col' style='grid-template-columns: 150px auto'>
|
||||
<div class='macro_img'><img src='systems/mosh/images/icons/ui/macros/gain_stress.png' style='border:none'/></div>
|
||||
<div class='macro_desc'>
|
||||
<h4>Lose Calm</h4>
|
||||
Occasionally, certain locations or entities can automatically give you Stress from interacting with or witnessing them. You live in a terrifying, uncaring universe, so your <strong>Maximum Calm</strong> caps out at 85 and cannot go lower than zero.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Lose 5 Calm`,
|
||||
action: `lose_5`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-5,null,true),
|
||||
icon: `<i class="fas fa-angle-down"></i>`
|
||||
icon: `fas fa-angle-down`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Lose 10 Calm`,
|
||||
action: `lose_10`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-10,null,true),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Lose 1d20 Calm`,
|
||||
action: `lose_1d20`,
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d20`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-down"></i>`
|
||||
icon: `fas fa-arrow-circle-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -7,59 +7,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
//pop up the panic check dialog box
|
||||
new Dialog({
|
||||
title: `Panic Check`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Panic Check"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/rolltables/panic_check.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Panic Check</h3>Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a <strong>Panic Check</strong>. Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called <strong>Conditions</strong>, and they affect you until you are able to treat them.
|
||||
</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Panic Check</h4>
|
||||
Stress, Damage, and emotional wear and tear eventually bring characters to their breaking point. When that happens, there’s a chance they Panic. You determine this by making a <strong>Panic Check</strong>. Some results of the Panic Table are so severe that they leave a lasting impression on you. These are called <strong>Conditions</strong>, and they affect you until you are able to treat them.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Select your roll type:</h4>
|
||||
<div class="macro_prompt">
|
||||
Select your roll type:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Advantage`,
|
||||
action: 'button_advantage',
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,`[+]`,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Normal`,
|
||||
action: 'button_normal',
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,``,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-minus"></i>`
|
||||
icon: `fas fa-minus`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Disadvantage`,
|
||||
action: 'button_disadvantage',
|
||||
callback: () => game.mosh.initRollTable(`panicCheck`,`[-]`,null,false,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,60 +6,45 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Gain Stress`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Relieve Stress"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Relieve Stress</h3>Occasionally, certain moments, places, or events can automatically <strong>relieve your stress.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Select your modification:</h4>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/relieve_stress.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Relieve Stress</h4>
|
||||
Occasionally, certain moments, places, or events can automatically <strong>relieve your stress.</strong> Escaping perilous situations, finding a serene location, or experiencing a touching moment with a loved one can have meaningful impacts on your mood and outlook on life. If your stress is getting close to 20, you should consider making a <strong>Rest Save</strong> - as the effects of a failed <strong>Panic Check</strong> can be devastating.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
Select your modification:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Relieve 1 Stress`,
|
||||
action: 'button_1',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-1,null,true),
|
||||
icon: `<i class="fas fa-angle-down"></i>`
|
||||
icon: `fas fa-angle-down`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Relieve 2 Stress`,
|
||||
action: 'button_2',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',-2,null,true),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
icon: `fas fa-angle-double-down`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Relieve 1d5 Stress`,
|
||||
action: 'button_3',
|
||||
callback: () => game.mosh.initModifyActor('system.other.stress.value',null,`-1d5`,true),
|
||||
icon: `<i class="fas fa-arrow-circle-down"></i>`
|
||||
icon: `fas fa-arrow-circle-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 265}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,47 +6,30 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Rest Save`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Rest Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/rest_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Rest Save</h3>You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; <strong>if you fail, you gain 1 Stress instead.</strong> Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.</div>
|
||||
</div>
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/rest_save.png" style="border:none"/></div>
|
||||
<div class="macro_desc">
|
||||
<h4>Rest Save</h4>
|
||||
You can relieve Stress by resting in a relatively safe place. If you succeed, reduce your Stress; <strong>if you fail, you gain 1 Stress instead.</strong> Players can gain Advantage on their Rest Save by participating in consensual sex, recreational drug use, a night of heavy drinking, prayer, or any other suitable leisure activity. Unsafe locations may incur Disadvantage.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
action: 'button_next',
|
||||
callback: () => game.mosh.initRollCheck(null,'low','restSave',null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 237}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
+24
-41
@@ -6,43 +6,25 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Save`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Save"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center; //do I need this
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/save.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Save</h3>You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. <strong>If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Save</h4>
|
||||
You have three Saves which represent your ability to withstand different kinds of trauma. In order to avoid certain dangers, you sometimes need to roll a Save. <strong>If you roll less than your Save you succeed. Otherwise you fail, and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="san">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="san" name="save" value="sanity" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/sanity.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -54,8 +36,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="fer">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="fer" name="save" value="fear">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/fear.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -67,8 +49,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="bod">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="bod" name="save" value="body">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/body.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -80,12 +62,13 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
callback: (html) => game.mosh.initRollCheck(null,'low',html.find("input[name='save']:checked").val(),null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
action: 'button_1',
|
||||
callback: (event, button, dialog) => game.mosh.initRollCheck(null,'low',button.form.querySelector("input[name='save']:checked").value,null,null,null),
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 470}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -6,44 +6,25 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
game.mosh.noCharSelected();
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
new Dialog({
|
||||
title: `Stat Check`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Stat Check"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center; //do I need this
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/stat_check.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Stat Check</h3>You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. <strong>If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Stat Check</h4>
|
||||
You have four Stats which represent your ability to act under extreme pressure. Whenever you want to do something and the price for failure is high, roll a stat check. <strong>If you roll less than your Stat you succeed. Otherwise, you fail and gain 1 Stress.</strong> A roll of 90-99 is always a failure. A Critical Failure means something bad happens, and furthermore you must make a Panic Check.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="str">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="str" name="stat" value="strength" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/strength.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -55,8 +36,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="spd">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="spd" name="stat" value="speed">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/speed.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -68,8 +49,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="int">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="int" name="stat" value="intellect">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/intellect.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -81,8 +62,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="com">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="com" name="stat" value="combat">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/combat.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -94,12 +75,13 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Next`,
|
||||
callback: (html) => game.mosh.initRollCheck(null,'low',html.find("input[name='stat']:checked").val(),null,null,null),
|
||||
icon: `<i class="fas fa-chevron-circle-right"></i>`
|
||||
action: 'button_1',
|
||||
callback: (event, button, dialog) => game.mosh.initRollCheck(null,'low',button.form.querySelector("input[name='stat']:checked").value,null,null,null),
|
||||
icon: `fas fa-chevron-circle-right`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 545}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
@@ -7,44 +7,25 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
//else pop up the dialog
|
||||
} else {
|
||||
//pop up the wound roll dialog box
|
||||
new Dialog({
|
||||
title: `Wound Roll`,
|
||||
new foundry.applications.api.DialogV2({
|
||||
window: {
|
||||
title: "Wound Roll"
|
||||
},
|
||||
classes: ["macro-popup-dialog"],
|
||||
position: {width: 600},
|
||||
content: `
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/macros/wound_roll.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>Wound Roll</h3>Make a <strong>Wound Roll</strong> according to the type of Damage received. <strong>Flesh Wounds</strong> are small inconveniences. <strong>Minor/Major Injuries</strong> cause lasting issues which require medical treatment. <strong>Lethal Injuries</strong> can kill you if not dealt with immediately. <strong>Fatal Injuries</strong> can kill outright. <strong>Bleeding</strong> wounds, if not treated can quickly overwhelm you.</div>
|
||||
<div class="macro_desc">
|
||||
<h4>Wound Roll</h4>
|
||||
Make a <strong>Wound Roll</strong> according to the type of Damage received.<br><strong>Flesh Wounds</strong> are small inconveniences.<br><strong>Minor/Major Injuries</strong> cause lasting issues that require treatment.<br><strong>Lethal Injuries</strong> can kill you if not dealt with immediately.<br><strong>Fatal Injuries</strong> can kill outright.<br><strong>Bleeding</strong> wounds, if not treated can quickly overwhelm you.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="bf">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="bf" name="wound_table" value="31YibfjueXuZdNLb" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/rolltables/wounds_blunt_force.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -56,8 +37,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="b">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="b" name="wound_table" value="ata3fRz3uoPfNCLh">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/rolltables/wounds_bleeding.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -69,8 +50,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="g">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="g" name="wound_table" value="XjDU2xFOWEasaZK0">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/rolltables/wounds_gunshot.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -82,8 +63,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="fe">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="fe" name="wound_table" value="lqiaWwh5cGcJhvnu">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/rolltables/wounds_fire_&_explosives.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -95,8 +76,8 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</label>
|
||||
<label for="gm">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="gm" name="wound_table" value="uVfC1CqYdojaJ7yR">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/rolltables/wounds_gore_&_massive.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
@@ -107,24 +88,29 @@ if ((macroTarget === 'character' && !game.user.character) || (macroTarget === 't
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<h4>Select your roll type:</h4>
|
||||
<div class="macro_prompt">
|
||||
Select your roll type:
|
||||
</div>
|
||||
`,
|
||||
buttons: {
|
||||
button1: {
|
||||
buttons: [
|
||||
{
|
||||
label: `Advantage`,
|
||||
callback: (html) => game.mosh.initRollTable(html.find("input[name='wound_table']:checked").val(),`1d10 [+]`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-up"></i>`
|
||||
action: 'action_advantage',
|
||||
callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector("input[name='wound_table']:checked").value,`1d10 [+]`,`low`,true,false,null,null),
|
||||
icon: `fas fa-angle-double-up`
|
||||
},
|
||||
button2: {
|
||||
{
|
||||
label: `Normal`,
|
||||
callback: (html) => game.mosh.initRollTable(html.find("input[name='wound_table']:checked").val(),`1d10`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-minus"></i>`
|
||||
action: 'action_normal',
|
||||
callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector("input[name='wound_table']:checked").value,`1d10`,`low`,true,false,null,null),
|
||||
icon: `fas fa-minus`
|
||||
},
|
||||
button3: {
|
||||
{
|
||||
label: `Disadvantage`,
|
||||
callback: (html) => game.mosh.initRollTable(html.find("input[name='wound_table']:checked").val(),`1d10 [-]`,`low`,true,false,null,null),
|
||||
icon: `<i class="fas fa-angle-double-down"></i>`
|
||||
action: 'action_disadvantage',
|
||||
callback: (event, button, dialog) => game.mosh.initRollTable(button.form.querySelector("input[name='wound_table']:checked").value,`1d10 [-]`,`low`,true,false,null,null),
|
||||
icon: `fas fa-angle-double-down`
|
||||
}
|
||||
}
|
||||
},{width: 600,height: 650}).render(true);
|
||||
]
|
||||
}).render({force: true});
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"id": "mosh",
|
||||
"title": "MoSh - Unofficial Mothership",
|
||||
"description": "The unofficial Mothership system for FoundryVTT.",
|
||||
"version": "0.6.0",
|
||||
"esmodules": [
|
||||
"module/mosh.js"
|
||||
],
|
||||
"styles": [
|
||||
"css/mosh.css"
|
||||
],
|
||||
"packs": [
|
||||
{
|
||||
"name": "conditions_1e",
|
||||
"label": "Conditions (1e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/conditions_1e.db",
|
||||
"type": "Item",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "items_maintenance_1e",
|
||||
"label": "Maintenance Issues (1e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/items_maintenance_1e.db",
|
||||
"type": "Item",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macros_hotbar_1e",
|
||||
"label": "Hotbar Macros (1e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/macros_hotbar_1e.db",
|
||||
"type": "Macro",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macros_triggered_1e",
|
||||
"label": "Triggered Macros (1e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/macros_triggered_1e.db",
|
||||
"type": "Macro",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rolltables_1e",
|
||||
"label": "Rolltables (1e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/rolltables_1e.db",
|
||||
"type": "RollTable",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conditions_0e",
|
||||
"label": "Conditions (0e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/conditions_0e.db",
|
||||
"type": "Item",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macros_hotbar_0e",
|
||||
"label": "Hotbar Macros (0e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/macros_hotbar_0e.db",
|
||||
"type": "Macro",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macros_triggered_0e",
|
||||
"label": "Triggered Macros (0e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/macros_triggered_0e.db",
|
||||
"type": "Macro",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rolltables_0e",
|
||||
"label": "Rolltables (0e)",
|
||||
"system": "mosh",
|
||||
"path": "packs/rolltables_0e.db",
|
||||
"type": "RollTable",
|
||||
"flags": {},
|
||||
"ownership": {
|
||||
"PLAYER": "OBSERVER",
|
||||
"ASSISTANT": "OWNER"
|
||||
}
|
||||
}
|
||||
],
|
||||
"media": [
|
||||
{
|
||||
"type": "cover",
|
||||
"loop": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"type": "setup",
|
||||
"url": "systems/mosh/images/icons/ui/system/mosh-repo.webp",
|
||||
"thumbnail": "systems/mosh/images/icons/ui/system/mosh-thumbnail.webp"
|
||||
}
|
||||
],
|
||||
"background": "systems/mosh/images/icons/ui/system/mosh-background.webp",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "en",
|
||||
"name": "English",
|
||||
"path": "lang/en.json",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"lang": "pt-BR",
|
||||
"path": "lang/pt-BR.json",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"grid.distance": 1,
|
||||
"grid.units": "meter",
|
||||
"primaryTokenAttribute": "health",
|
||||
"secondaryTokenAttribute": "other.stress",
|
||||
"url": "https://github.com/Futil/foundry-mothership",
|
||||
"manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/0.6.0/system.json",
|
||||
"download": "https://github.com/Futil/foundry-mothership/releases/download/0.6.0/foundry-mothership.zip",
|
||||
"license": "LICENSE.txt",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Futilrevenge",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "hollowphoton",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"maximum": "13",
|
||||
"verified": "13"
|
||||
}
|
||||
}
|
||||
+179
-9
@@ -62,6 +62,13 @@
|
||||
background: none;
|
||||
}
|
||||
|
||||
#pause figcaption {
|
||||
font-family: "Roboto", sans-serif;
|
||||
color: #ffffff;
|
||||
opacity: .3;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
/* Paragraph */
|
||||
p {
|
||||
margin: 0em 0;
|
||||
@@ -527,11 +534,12 @@ p {
|
||||
.mosh .roll-image {
|
||||
-webkit-box-flex: 0;
|
||||
flex: 0 24px;
|
||||
margin-top: -1px;
|
||||
margin-right: -9px;
|
||||
width: 48px;
|
||||
margin-top: -3px;
|
||||
margin-left: 11px;
|
||||
margin-right: 0px;
|
||||
width: 50px;
|
||||
border-radius: 0 0 0 16px;
|
||||
/* margin-right: 5px; */
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.mosh .items-list .item img {
|
||||
@@ -1586,9 +1594,9 @@ p {
|
||||
|
||||
.mosh .rollweaponh1 {
|
||||
height: 32px;
|
||||
margin-top: 0;
|
||||
margin-left: -9px;
|
||||
margin-right: -9px;
|
||||
margin-top: -15px;
|
||||
margin-left: -8px;
|
||||
margin-right: -11px;
|
||||
font-size: 1.0rem;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
@@ -1748,7 +1756,169 @@ p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=styles.css.map */
|
||||
/* Dialog V2 - Macro Pop Ups */
|
||||
|
||||
/* Base dialog styling */
|
||||
.application.dialog.macro-popup-dialog {
|
||||
background: rgb(255,255,255);
|
||||
font-family: "Roboto", sans-serif;
|
||||
color: #1A1915;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=styles.css.map */
|
||||
/* Adjust dialog content gap */
|
||||
.macro-popup-dialog .dialog-content.standard-form {
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
/* Adjust dialog form gap */
|
||||
.macro-popup-dialog .dialog-form.standard-form {
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
/* MPD window header */
|
||||
.macro-popup-dialog .window-header {
|
||||
background: rgb(25,25,25);
|
||||
}
|
||||
|
||||
/* MPD window content */
|
||||
.macro-popup-dialog .window-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* MPD macro window */
|
||||
.macro-popup-dialog .macro_window {
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
/* MPD macro image */
|
||||
.macro-popup-dialog .macro_img {
|
||||
|
||||
}
|
||||
|
||||
/* MPD macro desc */
|
||||
.macro-popup-dialog .macro_desc {
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-left: 0px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
/* MPD macro desc — title styling */
|
||||
.macro-popup-dialog .macro_desc h4 {
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 14pt;
|
||||
font-weight: 400;
|
||||
color: #1A1915;
|
||||
border-bottom: 1px solid darkred;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* MPD macro prompt */
|
||||
.macro-popup-dialog .macro_prompt {
|
||||
|
||||
}
|
||||
|
||||
/* MPD grid layouts */
|
||||
.macro-popup-dialog .grid-1col {
|
||||
grid-column: span 1 / span 1;
|
||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.macro-popup-dialog .grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.macro-popup-dialog .grid-3col {
|
||||
grid-column: span 3 / span 3;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
/* update buttons to look more old school */
|
||||
.macro-popup-dialog .form-footer button {
|
||||
background: rgb(230,230,230);
|
||||
color: #1A1915;
|
||||
border: 1px solid #222;
|
||||
border-radius: 4px;
|
||||
padding: 4px 10px;
|
||||
font-size: 11pt;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.macro-popup-dialog .form-footer button:hover {
|
||||
background: #444;
|
||||
color: #fff;
|
||||
border-color: #111;
|
||||
}
|
||||
|
||||
/* Custom radio: kill native + theme accents */
|
||||
.macro-popup-dialog input[type="radio"] {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
accent-color: initial; /* ignore theme accent */
|
||||
box-sizing: border-box;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid #777; /* medium grey ring */
|
||||
border-radius: 50%;
|
||||
background: #fff; /* white center when unchecked */
|
||||
display: inline-flex; /* center the pseudo-dot */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 0;
|
||||
margin: 0 8px 0 2px;
|
||||
vertical-align: middle;
|
||||
|
||||
/* nuke any theme glow/orange */
|
||||
box-shadow: none !important;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* The inner dot (hidden until checked) */
|
||||
.macro-popup-dialog input[type="radio"]::before {
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #111; /* dot color */
|
||||
transform: scale(0);
|
||||
transition: transform 120ms ease-in-out;
|
||||
}
|
||||
|
||||
/* Checked = show the dot */
|
||||
.macro-popup-dialog input[type="radio"]:checked::before {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
/* Checked = show the dot */
|
||||
.macro-popup-dialog input[type="radio"]:checked::after {
|
||||
color: none !important;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
/* Hover/focus states (accessible, non-orange) */
|
||||
.macro-popup-dialog input[type="radio"]:hover { border-color: #5c5c5c; }
|
||||
.macro-popup-dialog input[type="radio"]:focus-visible {
|
||||
outline: 2px solid #9a9a9a;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* If your theme highlights the whole row via :has(input:checked), strip it here */
|
||||
.macro-popup-dialog label:has(input[type="radio"]:checked) {
|
||||
background: inherit !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
+13
-1
@@ -1001,6 +1001,7 @@
|
||||
"Macros": "Macros",
|
||||
"MaintenanceAndRepairs": "Maintenance & Repairs",
|
||||
"MaintenanceCheck": "Maintenance Check",
|
||||
"Major": "Major",
|
||||
"Maximum": "Maximum",
|
||||
"MaxShots": "Max Shots",
|
||||
"MaxO2": "Max. O2",
|
||||
@@ -1128,6 +1129,17 @@
|
||||
"Bankrupcy": "Bankrupcy",
|
||||
"BankrupcySave": "Bankrupcy Save",
|
||||
"RestSave": "Rest Save",
|
||||
"Job": "Occupation"
|
||||
"Job": "Occupation",
|
||||
"Class": "Class",
|
||||
"Type": "Type",
|
||||
"Owed": "Owed",
|
||||
"Hull": "Hull",
|
||||
"Modules": "Modules",
|
||||
"DeckPlan": "Deck Plan",
|
||||
"Stock": "Stock",
|
||||
"Errors":{
|
||||
"SkillAlreadyInList":"This skill is already in the list.",
|
||||
"NoDropTarget":"Something went wrong with the drop, please try again."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -1001,6 +1001,7 @@
|
||||
"Macros": "Macros",
|
||||
"MaintenanceAndRepairs": "Manutenção & Reparos",
|
||||
"MaintenanceCheck": "Verificação de Manutenção",
|
||||
"Major": "Maior",
|
||||
"Maximum": "Máximo",
|
||||
"MaxShots": "Máx. Tiros",
|
||||
"MaxO2": "Máx. O2",
|
||||
@@ -1128,6 +1129,17 @@
|
||||
"Bankrupcy": "Falência",
|
||||
"BankrupcySave": "Salvaguarda de Falência",
|
||||
"RestSave": "Salvaguarda de Descanso",
|
||||
"Job": "Ocupação"
|
||||
"Job": "Ocupação",
|
||||
"Class": "Classe",
|
||||
"Type": "Tipo",
|
||||
"Owed": "Devida",
|
||||
"Hull": "Casco",
|
||||
"Modules": "módulos",
|
||||
"DeckPlan": "Planta do Convés",
|
||||
"Stock": "Stock",
|
||||
"Errors":{
|
||||
"SkillAlreadyInList":"Essa habilidade já está na lista.",
|
||||
"NoDropTarget":"Algo deu errado com o drop, tente novamente"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+98
-99
@@ -3,7 +3,7 @@ import { DLActorGenerator } from "../windows/actor-generator.js";
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
export class MothershipActorSheet extends ActorSheet {
|
||||
export class MothershipActorSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -12,7 +12,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
template: "systems/mosh/templates/actor/actor-sheet.html",
|
||||
width: 820,
|
||||
height: 820,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }],
|
||||
submitOnChange: true
|
||||
}
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
}
|
||||
@@ -46,8 +47,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic");
|
||||
|
||||
data.data.enriched = [];
|
||||
data.data.enriched.notes = await TextEditor.enrichHTML(superData.notes, {async: true});
|
||||
data.data.enriched.biography = await TextEditor.enrichHTML(superData.biography, {async: true});
|
||||
data.data.enriched.notes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(superData.notes, {async: true});
|
||||
data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(superData.biography, {async: true});
|
||||
|
||||
|
||||
//SKILL XP BUTTONS
|
||||
@@ -210,11 +211,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
|
||||
let amount = item.system.treatment.value;
|
||||
|
||||
@@ -237,11 +235,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
item.system.equipped = !item.system.equipped;
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
@@ -254,7 +248,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
item.sheet.render(true);
|
||||
item.sheet.render({force: true});
|
||||
});
|
||||
|
||||
//Quantity adjuster
|
||||
@@ -262,11 +256,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
let amount = item.system.quantity;
|
||||
|
||||
if (event.button == 0) {
|
||||
@@ -282,11 +273,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
html.on('mousedown', '.severity', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
|
||||
let amount = item.system.severity;
|
||||
|
||||
@@ -314,7 +302,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
html.find('.skill-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const skill = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
skill.sheet.render(true);
|
||||
skill.sheet.render({force: true});
|
||||
});
|
||||
|
||||
//Weapons
|
||||
@@ -325,7 +313,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
html.find('.weapon-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
weapon.sheet.render(true);
|
||||
weapon.sheet.render({force: true});
|
||||
});
|
||||
|
||||
// Rollable Attribute
|
||||
@@ -340,11 +328,8 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = event.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
this.actor.rollCheck(null, null, null, item.name, item.system.bonus, null);
|
||||
});
|
||||
|
||||
@@ -353,11 +338,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
this.actor.rollCheck(null, 'low', 'combat', null, null, item);
|
||||
});
|
||||
|
||||
@@ -366,11 +347,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
this.actor.rollCheck(null, null, 'damage', null, null, item);
|
||||
});
|
||||
|
||||
@@ -387,11 +364,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.ammo;
|
||||
if (event.button == 0) {
|
||||
if (amount >= 0) {
|
||||
@@ -410,11 +383,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
if (event.button == 0) {
|
||||
if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
|
||||
item.system.curShots = Number(item.system.curShots) + 1;
|
||||
@@ -435,16 +404,46 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
this.actor.reloadWeapon(li.dataset.itemId);
|
||||
});
|
||||
|
||||
//increase AP
|
||||
html.on('mousedown', '.armor-ap', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.armorPoints;
|
||||
if (event.button == 0) {
|
||||
item.system.armorPoints = Number(amount) + 1;
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.armorPoints = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase DR
|
||||
html.on('mousedown', '.armor-dr', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.damageReduction;
|
||||
if (event.button == 0) {
|
||||
item.system.damageReduction = Number(amount) + 1;
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.damageReduction = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase oxygen
|
||||
html.on('mousedown', '.armor-oxy', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.oxygenCurrent;
|
||||
if (event.button == 0) {
|
||||
if (amount < item.system.oxygenMax) {
|
||||
@@ -504,11 +503,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const type = header.dataset.type;
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
if (game.release.generation >= 12) {
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
} else {
|
||||
data = duplicate(header.dataset);
|
||||
}
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
|
||||
// Initialize a default name.
|
||||
const name = `New ${type.capitalize()}`;
|
||||
@@ -522,7 +517,6 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
// Remove the type from the dataset since it's in the itemData.type prop.
|
||||
delete itemData.data["type"];
|
||||
|
||||
|
||||
// Finally, create the item!
|
||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||
}
|
||||
@@ -539,11 +533,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const type = header.dataset.type;
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
if (game.release.generation >= 12) {
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
} else {
|
||||
data = duplicate(header.dataset);
|
||||
}
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
//const data = duplicate(header.dataset);
|
||||
// Initialize a default name.
|
||||
const name = `New Skill`;
|
||||
@@ -551,47 +541,60 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const itemData = {
|
||||
name: name,
|
||||
type: type,
|
||||
data: data
|
||||
system: data
|
||||
};
|
||||
// Remove the type from the dataset since it's in the itemData.type prop.
|
||||
delete itemData.data["type"];
|
||||
|
||||
let d = new Dialog({
|
||||
title: "New Skill",
|
||||
content: "<h2> Name </h2>\
|
||||
<input type='text' id='name' name='name' value='New Skill'>\
|
||||
<h2> Rank </h2> <select style='margin-bottom:10px;'name='rank' id='rank'>\
|
||||
<option value='Trained'>Trained</option>\
|
||||
<option value='Expert'>Expert</option>\
|
||||
<option value='Master'>Master</option></select> <br/>",
|
||||
buttons: {
|
||||
roll: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: `New Skill`},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: `
|
||||
<div class="macro_window">
|
||||
<div class="macro_desc" style="padding-left: 8px; padding-bottom: 0px;">
|
||||
<h4> Name </h4>
|
||||
</div>
|
||||
<input type="text" id="name" name="name" value="New Skill">
|
||||
</div>
|
||||
<div class="macro_window">
|
||||
<div class="macro_desc" style="padding-left: 8px; padding-bottom: 0px;">
|
||||
<h4> Rank </h4>
|
||||
</div>
|
||||
<select name="rank" id="rank">
|
||||
<option value="Trained">Trained</option>
|
||||
<option value="Expert">Expert</option>
|
||||
<option value="Master">Master</option>
|
||||
</select>
|
||||
</div>
|
||||
`,
|
||||
buttons: [
|
||||
{
|
||||
icon: 'fas fa-check',
|
||||
action: "create",
|
||||
label: "Create",
|
||||
callback: (html) => {
|
||||
var rank = html.find('[id=\"rank\"]')[0].value;
|
||||
callback: (event, button, dialog) => {
|
||||
var rank = button.form.querySelector('[id=\"rank\"]')?.value;
|
||||
if (rank == "Trained")
|
||||
itemData.data.bonus = 10;
|
||||
itemData.system.bonus = 10;
|
||||
if (rank == "Expert")
|
||||
itemData.data.bonus = 15;
|
||||
itemData.system.bonus = 15;
|
||||
if (rank == "Master")
|
||||
itemData.data.bonus = 20;
|
||||
itemData.system.bonus = 20;
|
||||
|
||||
itemData.data.rank = rank;
|
||||
itemData.name = html.find('[id=\"name\"]')[0].value
|
||||
itemData.system.rank = rank;
|
||||
itemData.name = button.form.querySelector('[id=\"name\"]')?.value
|
||||
this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
{
|
||||
icon: 'fas fa-times',
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
callback: () => { }
|
||||
}
|
||||
},
|
||||
],
|
||||
default: "roll",
|
||||
close: () => { }
|
||||
});
|
||||
d.render(true);
|
||||
d.render({force: true});
|
||||
|
||||
// Finally, create the item!
|
||||
return;
|
||||
@@ -622,11 +625,7 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const actor = this.object;
|
||||
|
||||
var updateData;
|
||||
if (game.release.generation >= 12) {
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
} else {
|
||||
updateData = expandObject(formData);
|
||||
}
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
|
||||
await actor.update(updateData, {
|
||||
diff: false
|
||||
@@ -655,6 +654,6 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
new DLActorGenerator(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
}
|
||||
|
||||
+505
-390
File diff suppressed because it is too large
Load Diff
+451
-156
@@ -4,16 +4,17 @@
|
||||
*/
|
||||
import { DLCreatureSettings } from "../settings/creature-settings.js";
|
||||
|
||||
export class MothershipCreatureSheet extends ActorSheet {
|
||||
export class MothershipCreatureSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
var options = {
|
||||
classes: ["mosh", "sheet", "actor", "creature"],
|
||||
template: "systems/mosh/templates/actor/creature-sheet.html",
|
||||
width: 700,
|
||||
height: 650,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
|
||||
width: 820,
|
||||
height: 770,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }],
|
||||
submitOnChange: true
|
||||
};
|
||||
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
@@ -43,17 +44,14 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
new DLCreatureSettings(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
async _updateObject(event, formData) {
|
||||
const actor = this.object;
|
||||
var updateData;
|
||||
if (game.release.generation >= 12) {
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
} else {
|
||||
updateData = expandObject(formData);
|
||||
}
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
|
||||
|
||||
|
||||
await actor.update(updateData, {
|
||||
@@ -71,6 +69,8 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
// attr.isCheckbox = attr.dtype === "Boolean";
|
||||
// }
|
||||
|
||||
const superData = data.data.system;
|
||||
|
||||
// Prepare items.
|
||||
if (this.actor.type == 'creature') {
|
||||
this._prepareCreatureItems(data);
|
||||
@@ -85,20 +85,43 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic");
|
||||
|
||||
data.data.enriched = [];
|
||||
data.data.enriched.description = await TextEditor.enrichHTML(data.data.system.description, {async: true});
|
||||
data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
|
||||
data.data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.description, {async: true});
|
||||
data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
|
||||
|
||||
//SKILL XP BUTTONS
|
||||
superData.xp.html = '';
|
||||
if (superData.xp.html == '') {
|
||||
for (let i = 1; i <= 15; i++) {
|
||||
if (i > superData.xp.value) {
|
||||
if (i % 5) {
|
||||
superData.xp.html += '<div class="circle"></div>';
|
||||
}
|
||||
else { //If a special one
|
||||
let trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -54px;">Trained</div>';
|
||||
if (i == 10) trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -50px;">Expert</div>';
|
||||
else if (i == 15) trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -52px;">Master</div>';
|
||||
superData.xp.html += '<div class="circle" style="background:rgb(200,200,200);">' + trainLevel + '</div>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (i % 5) {
|
||||
superData.xp.html += '<div class="circle-f"></div>';
|
||||
}
|
||||
else { //If a special one
|
||||
let trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -54px; color:black;">Trained</div>';
|
||||
if (i == 10) trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -50px; color:black;">Expert</div>';
|
||||
else if (i == 15) trainLevel = '<div class="skill_training_text" style="position: relative; top: 17px; text-align: center; left: -52px; color:black;">Master</div>';
|
||||
superData.xp.html += '<div class="circle-f" style="background:black;">' + trainLevel + '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//END SKILL XP
|
||||
|
||||
return data.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the remaining wounds of the creature
|
||||
* @param {JQuery} html
|
||||
* @returns {int} hits.max - hits.value
|
||||
*/
|
||||
getWoundsLeft(html){
|
||||
return html.find(`input[name="system.hits.max"]`).prop('value') - html.find(`input[name="system.hits.value"]`).prop('value');
|
||||
}
|
||||
|
||||
/**
|
||||
* Organize and classify Items for Character sheets.
|
||||
*
|
||||
@@ -108,32 +131,73 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
*/
|
||||
_prepareCreatureItems(sheetData) {
|
||||
const actorData = sheetData.data;
|
||||
|
||||
//console.log(sheetData);
|
||||
///console.log("sheetdata Above");
|
||||
// Initialize containers.
|
||||
const abilities = [];
|
||||
const gear = [];
|
||||
const skills = [];
|
||||
const weapons = [];
|
||||
const armors = [];
|
||||
const conditions = [];
|
||||
|
||||
let curWeight = 0;
|
||||
// Iterate through items, allocating to containers
|
||||
// let totalWeight = 0;
|
||||
for (let i of sheetData.items) {
|
||||
let item = i.system;
|
||||
i.img = i.img || DEFAULT_TOKEN;
|
||||
let item = i.system;
|
||||
i.img = i.img || DEFAULT_TOKEN;
|
||||
|
||||
if (i.type === 'ability') {
|
||||
abilities.push(i);
|
||||
} else if (i.type === 'weapon') {
|
||||
if (item.ranges.value == "" && item.ranges.medium > 0) {
|
||||
item.ranges.value = item.ranges.short + "/" + item.ranges.medium + "/" + item.ranges.long;
|
||||
item.ranges.medium = 0;
|
||||
}
|
||||
|
||||
weapons.push(i);
|
||||
if (i.type === 'ability') {
|
||||
abilities.push(i);
|
||||
} else if (i.type === 'item') {
|
||||
gear.push(i);
|
||||
curWeight += item.weight * item.quantity;
|
||||
} else if (i.type === 'skill') {
|
||||
skills.push(i);
|
||||
} else if (i.type === 'armor') {
|
||||
armors.push(i);
|
||||
curWeight += item.weight;
|
||||
} else if (i.type === 'weapon') {
|
||||
//We need to update this from the old system.
|
||||
if (item.ranges.value == "" && item.ranges.medium > 0) {
|
||||
item.ranges.value = item.ranges.short + "/" + item.ranges.medium + "/" + item.ranges.long;
|
||||
item.ranges.medium = 0;
|
||||
}
|
||||
|
||||
weapons.push(i);
|
||||
curWeight += item.weight;
|
||||
} else if (i.type === 'condition') {
|
||||
// We'll handle the pip html here.
|
||||
if (item.treatment == null) {
|
||||
item.treatment = {
|
||||
"value": 0,
|
||||
"html": ""
|
||||
};
|
||||
}
|
||||
let pipHtml = "";
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (i < item.treatment.value) {
|
||||
pipHtml += '<i class="fas fa-circle"></i>';
|
||||
}
|
||||
else {
|
||||
pipHtml += '<i class="far fa-circle"></i>';
|
||||
}
|
||||
}
|
||||
|
||||
item.treatment.html = pipHtml;
|
||||
|
||||
conditions.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
// Assign and return
|
||||
actorData.abilities = abilities;
|
||||
actorData.gear = gear;
|
||||
actorData.skills = skills;
|
||||
actorData.armors = armors;
|
||||
actorData.weapons = weapons;
|
||||
actorData.conditions = conditions;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
@@ -143,25 +207,126 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]);
|
||||
li.slideUp(200, () => this.render(false));
|
||||
html.on('mousedown', '.char-pip-button', ev => {
|
||||
|
||||
const div = $(ev.currentTarget);
|
||||
const targetName = div.data("key");
|
||||
|
||||
let amount = this.actor.system.xp.value;
|
||||
let newAmount = amount;
|
||||
let max = div.data("max");
|
||||
let min = div.data("min");
|
||||
|
||||
if (event.button == 0) {
|
||||
if (amount < max) {
|
||||
newAmount = Number(amount) + 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (amount > min) {
|
||||
newAmount = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
this.actor.update({'system.xp.value': newAmount});
|
||||
|
||||
});
|
||||
|
||||
html.on('mousedown', '.treatment-button', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
|
||||
let amount = item.system.treatment.value;
|
||||
|
||||
if (event.button == 0) {
|
||||
if (amount < 3) {
|
||||
item.system.treatment.value = Number(amount) + 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.treatment.value = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-equip').click(ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
item.system.equipped = !item.system.equipped;
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
// Add Inventory Item
|
||||
html.find('.item-create').click(this._onItemCreate.bind(this));
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
item.sheet.render(true);
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
item.sheet.render({force: true});
|
||||
});
|
||||
|
||||
// Rollable Attribute
|
||||
html.find('.stat-roll').click(ev => {
|
||||
const div = $(ev.currentTarget);
|
||||
const statName = div.data("key");
|
||||
this.actor.rollCheck(null, 'low', statName, null, null, null);
|
||||
//Quantity adjuster
|
||||
html.on('mousedown', '.item-quantity', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
let amount = item.system.quantity;
|
||||
|
||||
if (event.button == 0) {
|
||||
item.system.quantity = Number(amount) + 1;
|
||||
} else if (event.button == 2) {
|
||||
item.system.quantity = Number(amount) - 1;
|
||||
}
|
||||
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//Severity adjuster
|
||||
html.on('mousedown', '.severity', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
|
||||
let amount = item.system.severity;
|
||||
|
||||
if (event.button == 0) {
|
||||
item.system.severity = Number(amount) + 1;
|
||||
} else if (event.button == 2 && amount > 0) {
|
||||
item.system.severity = Number(amount) - 1;
|
||||
}
|
||||
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.deleteEmbeddedDocuments("Item", [li.data("itemId")]);
|
||||
li.slideUp(200, () => this.render(false));
|
||||
});
|
||||
|
||||
//SKILLS
|
||||
// Add Inventory Item
|
||||
html.find('.skill-create').click(this._onSkillCreate.bind(this));
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.skill-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const skill = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
skill.sheet.render({force: true});
|
||||
});
|
||||
|
||||
//Weapons
|
||||
@@ -170,139 +335,184 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.weapon-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
weapon.sheet.render(true);
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
weapon.sheet.render({force: true});
|
||||
});
|
||||
|
||||
// Rollable Attribute
|
||||
html.find('.stat-roll').click(ev => {
|
||||
const div = $(ev.currentTarget);
|
||||
const statName = div.data("key");
|
||||
this.actor.rollCheck(null, 'low', statName, null, null, null);
|
||||
});
|
||||
|
||||
// Rollable Skill
|
||||
html.find('.skill-roll').click(ev => {
|
||||
const li = event.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
this.actor.rollCheck(null, null, null, item.name, item.system.bonus, null);
|
||||
});
|
||||
|
||||
// Rollable Weapon
|
||||
html.find('.weapon-roll').click(ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
let swarm_damage_roll_string =null;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
//use swarm combat and damage settings if enabled
|
||||
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
|
||||
//replace the roll damage for swarm actors
|
||||
let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*this.getWoundsLeft(html);
|
||||
swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
|
||||
//calculate new damage string
|
||||
let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*(this.actor.system.hits.max-this.actor.system.hits.value);
|
||||
let swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
|
||||
this.actor.rollCheck(null, 'low', 'combat', null, null, item, swarm_damage_roll_string);
|
||||
} else {
|
||||
this.actor.rollCheck(null, 'low', 'combat', null, null, item);
|
||||
}
|
||||
this.actor.rollCheck(null, 'low', 'combat', null, null, item,swarm_damage_roll_string);
|
||||
});
|
||||
|
||||
// Rollable Damage
|
||||
html.find('.dmg-roll').click(ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
let swarm_damage_roll_string =null;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
//use swarm combat and damage settings if enabled
|
||||
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
|
||||
//replace the roll damage for swarm actors
|
||||
let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*this.getWoundsLeft(html);
|
||||
swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
|
||||
}
|
||||
this.actor.rollCheck(null, null, 'damage', null, null, item,swarm_damage_roll_string);
|
||||
});
|
||||
|
||||
//increase ammo
|
||||
html.on('mousedown', '.weapon-ammo', ev => {
|
||||
//dupe item to work on
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
//calculate new damage string
|
||||
let new_dice_ammount = item.system.damage.match(/([0-9]+)d[0-9]+/i)[1]*(this.actor.system.hits.max-this.actor.system.hits.value);
|
||||
let swarm_damage_roll_string = item.system.damage.replace(/([0-9]+)(d[0-9]+)/i,`${new_dice_ammount}$2`);
|
||||
this.actor.rollCheck(null, null, 'damage', null, null, item, swarm_damage_roll_string);
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
this.actor.rollCheck(null, null, 'damage', null, null, item);
|
||||
}
|
||||
let amount = item.system.ammo;
|
||||
//increase ammo
|
||||
if (event.button == 0) {
|
||||
if (amount >= 0) {
|
||||
item.system.ammo = Number(amount) + 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.ammo = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
//update ammo count
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase shots
|
||||
html.on('mousedown', '.weapon-shots', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
if (event.button == 0) {
|
||||
if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
|
||||
item.system.curShots = Number(item.system.curShots) + 1;
|
||||
item.system.ammo = Number(item.system.ammo) - 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (item.system.curShots > 0) {
|
||||
item.system.curShots = Number(item.system.curShots) - 1;
|
||||
item.system.ammo = Number(item.system.ammo) + 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//Reload Shots
|
||||
html.on('mousedown', '.weapon-reload', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
this.actor.reloadWeapon(li.dataset.itemId);
|
||||
});
|
||||
|
||||
// Rollable Item/Anything with a description that we want to click on.
|
||||
html.find('.description-roll').click(ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
this.actor.printDescription(li.dataset.itemId, {
|
||||
event: ev
|
||||
});
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
this.actor.printDescription(li.dataset.itemId, {
|
||||
event: ev
|
||||
});
|
||||
});
|
||||
|
||||
//increase ammo
|
||||
html.on('mousedown', '.weapon-ammo', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.ammo;
|
||||
if (event.button == 0) {
|
||||
if (amount >= 0) {
|
||||
item.system.ammo = Number(amount) + 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.ammo = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase shots
|
||||
html.on('mousedown', '.weapon-shots', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
if (event.button == 0) {
|
||||
if (item.system.curShots >= 0 && item.system.curShots < item.system.shots && item.system.ammo > 0) {
|
||||
item.system.curShots = Number(item.system.curShots) + 1;
|
||||
item.system.ammo = Number(item.system.ammo) - 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (item.system.curShots > 0) {
|
||||
item.system.curShots = Number(item.system.curShots) - 1;
|
||||
item.system.ammo = Number(item.system.ammo) + 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//Reload Shots
|
||||
html.on('mousedown', '.weapon-reload', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
this.actor.reloadWeapon(li.dataset.itemId);
|
||||
});
|
||||
|
||||
//increase AP
|
||||
html.on('mousedown', '.armor-ap', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.armorPoints;
|
||||
if (event.button == 0) {
|
||||
item.system.armorPoints = Number(amount) + 1;
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.armorPoints = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase DR
|
||||
html.on('mousedown', '.armor-dr', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.damageReduction;
|
||||
if (event.button == 0) {
|
||||
item.system.damageReduction = Number(amount) + 1;
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.damageReduction = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
//increase oxygen
|
||||
html.on('mousedown', '.armor-oxy', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.oxygenCurrent;
|
||||
if (event.button == 0) {
|
||||
if (amount < item.system.oxygenMax) {
|
||||
item.system.oxygenCurrent = Number(amount) + 1;
|
||||
}
|
||||
} else if (event.button == 2) {
|
||||
if (amount > 0) {
|
||||
item.system.oxygenCurrent = Number(amount) - 1;
|
||||
}
|
||||
}
|
||||
this.actor.updateEmbeddedDocuments('Item', [item]);
|
||||
});
|
||||
|
||||
// Clicking on Armor
|
||||
html.find('.armor-roll').click(ev => {
|
||||
//roll panic check
|
||||
this.actor.chooseCover();
|
||||
});
|
||||
|
||||
// Drag events for macros.
|
||||
if (this.actor.isOwner) {
|
||||
let handler = ev => this._onDragStart(ev);
|
||||
let handler = ev => this._onDragStart(ev);
|
||||
|
||||
html.find('li.dropitem').each((i, li) => {
|
||||
if (li.classList.contains("inventory-header")) return;
|
||||
li.setAttribute("draggable", true);
|
||||
li.addEventListener("dragstart", handler, false);
|
||||
});
|
||||
html.find('li.dropitem').each((i, li) => {
|
||||
if (li.classList.contains("inventory-header")) return;
|
||||
li.setAttribute("draggable", true);
|
||||
li.addEventListener("dragstart", handler, false);
|
||||
});
|
||||
}
|
||||
|
||||
// update swarm combat
|
||||
html.find(`input[name="system.swarm.combat.value"]`).change(ev => {
|
||||
let new_combat_value = $(ev.currentTarget).prop('value') * this.getWoundsLeft(html);
|
||||
this.actor.update({"system.stats.combat.value":new_combat_value});
|
||||
});
|
||||
html.find(`input[name="system.hits.max"]`).change(ev => {
|
||||
//Max wounds changed -> calculate new combat stat
|
||||
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
|
||||
let new_combat_value = html.find(`input[name="system.swarm.combat.value"]`).prop('value') * this.getWoundsLeft(html);
|
||||
this.actor.update({"system.stats.combat.value":new_combat_value});
|
||||
}
|
||||
});
|
||||
html.find(`input[name="system.hits.value"]`).change(ev => {
|
||||
//Current wounds changed -> calculate new combat stat
|
||||
if (this.actor.system.swarm && this.actor.system.swarm.enabled){
|
||||
let new_combat_value = html.find(`input[name="system.swarm.combat.value"]`).prop('value') * this.getWoundsLeft(html);
|
||||
this.actor.update({"system.stats.combat.value":new_combat_value});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -320,11 +530,7 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
const type = header.dataset.type;
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
if (game.release.generation >= 12) {
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
} else {
|
||||
data = duplicate(header.dataset);
|
||||
}
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
// Initialize a default name.
|
||||
const name = `New ${type.capitalize()}`;
|
||||
// Prepare the item object.
|
||||
@@ -340,6 +546,84 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle creating a new Owned skill for the actor using initial data defined in the HTML dataset
|
||||
* @param {Event} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
_onSkillCreate(event) {
|
||||
event.preventDefault();
|
||||
const header = event.currentTarget;
|
||||
// Get the type of item to create.
|
||||
const type = header.dataset.type;
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
//const data = duplicate(header.dataset);
|
||||
// Initialize a default name.
|
||||
const name = `New Skill`;
|
||||
// Prepare the item object.
|
||||
const itemData = {
|
||||
name: name,
|
||||
type: type,
|
||||
system: data
|
||||
};
|
||||
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: `New Skill`},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: `
|
||||
<div class="macro_window">
|
||||
<div class="macro_desc" style="padding-left: 8px; padding-bottom: 0px;">
|
||||
<h4> Name </h4>
|
||||
</div>
|
||||
<input type="text" id="name" name="name" value="New Skill">
|
||||
</div>
|
||||
<div class="macro_window">
|
||||
<div class="macro_desc" style="padding-left: 8px; padding-bottom: 0px;">
|
||||
<h4> Rank </h4>
|
||||
</div>
|
||||
<select name="rank" id="rank">
|
||||
<option value="Trained">Trained</option>
|
||||
<option value="Expert">Expert</option>
|
||||
<option value="Master">Master</option>
|
||||
</select>
|
||||
</div>
|
||||
`,
|
||||
buttons: [
|
||||
{
|
||||
icon: 'fas fa-check',
|
||||
action: "create",
|
||||
label: "Create",
|
||||
callback: (event, button, dialog) => {
|
||||
var rank = button.form.querySelector('[id=\"rank\"]')?.value;
|
||||
if (rank == "Trained")
|
||||
itemData.system.bonus = 10;
|
||||
if (rank == "Expert")
|
||||
itemData.system.bonus = 15;
|
||||
if (rank == "Master")
|
||||
itemData.system.bonus = 20;
|
||||
|
||||
itemData.system.rank = rank;
|
||||
itemData.name = button.form.querySelector('[id=\"name\"]')?.value
|
||||
this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: 'fas fa-times',
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
callback: () => { }
|
||||
}
|
||||
],
|
||||
default: "roll",
|
||||
close: () => { }
|
||||
});
|
||||
d.render({force: true});
|
||||
|
||||
// Finally, create the item!
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle clickable rolls.
|
||||
@@ -363,4 +647,15 @@ export class MothershipCreatureSheet extends ActorSheet {
|
||||
}
|
||||
}
|
||||
|
||||
async _updateObject(event, formData) {
|
||||
const actor = this.object;
|
||||
|
||||
var updateData;
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
|
||||
await actor.update(updateData, {
|
||||
diff: false
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { DLShipMacros } from "../windows/ship-macros.js";
|
||||
import { DLShipMegaDamage } from "../windows/ship-megadamage.js";
|
||||
import { DLShipSetup } from "../windows/ship-setup.js";
|
||||
|
||||
export class MothershipShipSheetSBT extends ActorSheet {
|
||||
export class MothershipShipSheetSBT extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -22,7 +22,8 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
tabs: [{ navSelector: "#sheet-tabs", contentSelector: "#sheet-body", initial: "character" },
|
||||
{ navSelector: "#side-tabs", contentSelector: "#side-body", initial: "close" }],
|
||||
// { navSelector: "#side-tabs", contentSelector: "#side-body", initial: "crew" }],
|
||||
scrollY: [".sheet-body", "scroll-lock"]
|
||||
scrollY: [".sheet-body", "scroll-lock"],
|
||||
submitOnChange: true
|
||||
}
|
||||
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
@@ -35,7 +36,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
new DLShipDeckplan(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
_onOpenMacros(event) {
|
||||
@@ -43,7 +44,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
new DLShipMacros(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
_onOpenSetup(event) {
|
||||
@@ -51,7 +52,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
new DLShipSetup(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
_onOpenMegadamage(event) {
|
||||
@@ -59,7 +60,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
new DLShipMegaDamage(this.actor, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -98,7 +99,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
superData.supplies.hull.percentage = " [ " + Math.round(maxHull * 0.25) + " | " + Math.round(maxHull * 0.5) + " | " + Math.round(maxHull * 0.75) + " ]";
|
||||
|
||||
data.data.enriched = [];
|
||||
data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
|
||||
data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
|
||||
|
||||
|
||||
//Run Setup
|
||||
@@ -193,17 +194,16 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
if (index != 0 && actorData.megadamage.hits.includes(index)) {
|
||||
// megadamageHTML += `<i class="fa-solid fa-wrench megadamage-button rollable" data-key="${index}"></i>  `;
|
||||
megadamageHTML += `<i class="fas fa-circle megadamage-button rollable" data-key="${index}"></i>  `;
|
||||
megadamageHTML += `<b>${index} |</b> ${entry[1].text} <br/> <br/>`;
|
||||
megadamageHTML += `<b>${index} |</b> ${entry[1].description} <br/> <br/>`;
|
||||
} else if (index != 0) {
|
||||
// megadamageHTML += `<i class="fa-solid fa-wrench megadamage-button rollable" data-key="${index}"></i>  `;
|
||||
megadamageHTML += `<div class="grey"><i class="far fa-circle megadamage-button rollable grey" data-key="${index}"></i>  `;
|
||||
megadamageHTML += `<b>${index} |</b> ${entry[1].text} <br/> <br/></div>`;
|
||||
megadamageHTML += `<b>${index} |</b> ${entry[1].description} <br/> <br/></div>`;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
// } else {
|
||||
|
||||
// megadamageHTML += entries[0][1].text + "<br/> <br/>";
|
||||
// }
|
||||
|
||||
await this.object.update({
|
||||
@@ -270,7 +270,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
item.sheet.render(true);
|
||||
item.sheet.render({force: true});
|
||||
|
||||
let amount = item.system.quantity;
|
||||
|
||||
@@ -284,11 +284,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
let amount = item.system.quantity;
|
||||
|
||||
if (event.button == 0) {
|
||||
@@ -318,7 +314,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
html.find('.weapon-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
weapon.sheet.render(true);
|
||||
weapon.sheet.render({force: true});
|
||||
});
|
||||
|
||||
// Rollable Weapon - not needed since individual ship weapons are not fired
|
||||
@@ -391,11 +387,7 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
html.on('mousedown', '.weapon-ammo', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
//const item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId))
|
||||
let amount = item.system.ammo;
|
||||
|
||||
@@ -458,11 +450,8 @@ export class MothershipShipSheetSBT extends ActorSheet {
|
||||
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
if (game.release.generation >= 12) {
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
} else {
|
||||
data = duplicate(header.dataset);
|
||||
}
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
|
||||
|
||||
// Initialize a default name.
|
||||
const name = `New ${type.capitalize()}`;
|
||||
|
||||
+14
-25
@@ -2,7 +2,7 @@
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
export class MothershipShipSheet extends ActorSheet {
|
||||
export class MothershipShipSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -11,7 +11,8 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
template: "systems/mosh/templates/actor/ship-sheet.html",
|
||||
width: 700,
|
||||
height: 650,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }]
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "character" }],
|
||||
submitOnChange: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +49,7 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
superData.supplies.hull.percentage = " [ " + Math.round(maxHull * 0.25) + " | " + Math.round(maxHull * 0.5) + " | " + Math.round(maxHull * 0.75) + " ]";
|
||||
|
||||
data.data.enriched = [];
|
||||
data.data.enriched.biography = await TextEditor.enrichHTML(data.data.system.biography, {async: true});
|
||||
data.data.enriched.biography = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.biography, {async: true});
|
||||
|
||||
return data.data;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const item = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
item.sheet.render(true);
|
||||
item.sheet.render({force: true});
|
||||
|
||||
let amount = item.system.quantity;
|
||||
|
||||
@@ -127,11 +128,8 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
html.on('mousedown', '.item-quantity', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
let amount = item.system.quantity;
|
||||
|
||||
if (event.button == 0) {
|
||||
@@ -161,28 +159,22 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
html.find('.weapon-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
const weapon = this.actor.getEmbeddedDocument("Item", li.data("itemId"));
|
||||
weapon.sheet.render(true);
|
||||
weapon.sheet.render({force: true});
|
||||
});
|
||||
// Rollable Weapon
|
||||
html.find('.weapon-roll').click(ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
this.actor.rollCheck(null, 'low', 'combat', null, null, item);
|
||||
});
|
||||
|
||||
html.on('mousedown', '.weapon-ammo', ev => {
|
||||
const li = ev.currentTarget.closest(".item");
|
||||
var item;
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
} else {
|
||||
item = duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(this.actor.getEmbeddedDocument("Item", li.dataset.itemId));
|
||||
|
||||
let amount = item.system.ammo;
|
||||
|
||||
if (event.button == 0) {
|
||||
@@ -239,11 +231,8 @@ export class MothershipShipSheet extends ActorSheet {
|
||||
const type = header.dataset.type;
|
||||
// Grab any data associated with this control.
|
||||
var data;
|
||||
if (game.release.generation >= 12) {
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
} else {
|
||||
data = duplicate(header.dataset);
|
||||
}
|
||||
data = foundry.utils.duplicate(header.dataset);
|
||||
|
||||
|
||||
// Initialize a default name.
|
||||
const name = `New ${type.capitalize()}`;
|
||||
|
||||
+57
-51
@@ -15,11 +15,8 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
};
|
||||
options.dragDrop = [{dragSelector: null, dropSelector: ".dropitem"}];
|
||||
|
||||
if (game.release.generation >= 12) {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
} else {
|
||||
return mergeObject(super.defaultOptions, options);
|
||||
}
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -61,21 +58,24 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
}*/
|
||||
|
||||
data.enriched=[];
|
||||
data.enriched.description = await TextEditor.enrichHTML(data.system.description, {async: true});
|
||||
data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.system.description, {async: true});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
async _onDrop(event){
|
||||
await super._onDrop(event);
|
||||
const droppedUuid = TextEditor.getDragEventData(event);
|
||||
const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||
if (droppedUuid.type != "Item"){
|
||||
return;
|
||||
}
|
||||
|
||||
const droppedObject = await fromUuid(droppedUuid.uuid);
|
||||
if (droppedObject.type == "skill"){
|
||||
//todo: add a check if the skill already exist in the list and dont add it, (by id or by name?)
|
||||
if(event.currentTarget == null) {
|
||||
ui.notifications.error(game.i18n.localize("Mosh.Errors.NoDropTarget"));
|
||||
return this.render(false);
|
||||
}
|
||||
console.log(event.currentTarget.id);
|
||||
if(event.currentTarget.id == "skills.fixed"){
|
||||
let parent_fixed_or = event.target.closest('div[id="skills.fixed.or"]');
|
||||
@@ -83,12 +83,20 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
if(parent_fixed_or){
|
||||
let array_index = parent_fixed_or.getAttribute("index");
|
||||
let skills = this.object.system.base_adjustment.skills_granted;
|
||||
if(skills[array_index].includes(droppedObject.uuid)){
|
||||
ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
|
||||
return this.render(false);
|
||||
}
|
||||
skills[array_index].push(droppedObject.uuid);
|
||||
this.object.update({"system.base_adjustment.skills_granted":skills});
|
||||
return this.render(false);
|
||||
|
||||
}else{
|
||||
let skills = this.object.system.base_adjustment.skills_granted;
|
||||
if (skills.includes(droppedObject.uuid)){
|
||||
ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
|
||||
return this.render(false);
|
||||
}
|
||||
skills.push(droppedObject.uuid);
|
||||
this.object.update({"system.base_adjustment.skills_granted":skills});
|
||||
return this.render(false);
|
||||
@@ -96,6 +104,10 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
}
|
||||
else if(event.currentTarget.id =="skills.common"){
|
||||
let skills = this.object.system.common_skills;
|
||||
if (skills.includes(droppedObject.uuid)){
|
||||
ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
|
||||
return this.render(false);
|
||||
}
|
||||
skills.push(droppedObject.uuid);
|
||||
this.object.update({"system.common_skills":skills});
|
||||
return this.render(false);
|
||||
@@ -107,7 +119,10 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
let parent_index = parent.data("itemId");
|
||||
|
||||
let options = this.object.system.selected_adjustment.choose_skill_or;
|
||||
|
||||
if(options[parent_index][index].from_list.includes(droppedObject.uuid)){
|
||||
ui.notifications.warn(game.i18n.localize("Mosh.Errors.SkillAlreadyInList"));
|
||||
return this.render(false);
|
||||
}
|
||||
options[parent_index][index].from_list.push(droppedObject.uuid);
|
||||
|
||||
this.object.update({"system.selected_adjustment.choose_skill_or":options});
|
||||
@@ -247,48 +262,52 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
event.preventDefault();
|
||||
let choose_stat = this.object.system.selected_adjustment.choose_stat;
|
||||
|
||||
let DialogContent = `<h2>${game.i18n.localize("Mosh.CharacterGenerator.StatOption")}</h2>\
|
||||
<div> <input type="number" id='modification' placeholder="${game.i18n.localize("Mosh.Value")}" /></label></div>\
|
||||
<div> <input type="checkbox" id='strength' />${game.i18n.localize("Mosh.Strength")}</label></div>\
|
||||
<div> <input type="checkbox" id='speed' />${game.i18n.localize("Mosh.Speed")}</label></div>\
|
||||
<div> <input type="checkbox" id='intellect' />${game.i18n.localize("Mosh.Intellect")}</label></div>\
|
||||
<div> <input type="checkbox" id='combat' />${game.i18n.localize("Mosh.Combat")}</label></div>\
|
||||
<div> <input type="checkbox" id='sanity' />${game.i18n.localize("Mosh.Sanity")}</label></div>\
|
||||
<div> <input type="checkbox" id='fear' />${game.i18n.localize("Mosh.Fear")}</label></div>\
|
||||
<div> <input type="checkbox" id='body' />${game.i18n.localize("Mosh.Body")}</label></div>`
|
||||
let DialogContent = `
|
||||
<div class="macro_desc" style="margin-bottom : -5px;"><h4>${game.i18n.localize("Mosh.CharacterGenerator.StatOption")}</h4></div>\
|
||||
<div> <input type="number" id='modification' placeholder="${game.i18n.localize("Mosh.Value")}" /></label></div>\
|
||||
<div> <input type="checkbox" id='strength' />${game.i18n.localize("Mosh.Strength")}</label></div>\
|
||||
<div> <input type="checkbox" id='speed' />${game.i18n.localize("Mosh.Speed")}</label></div>\
|
||||
<div> <input type="checkbox" id='intellect' />${game.i18n.localize("Mosh.Intellect")}</label></div>\
|
||||
<div> <input type="checkbox" id='combat' />${game.i18n.localize("Mosh.Combat")}</label></div>\
|
||||
<div> <input type="checkbox" id='sanity' />${game.i18n.localize("Mosh.Sanity")}</label></div>\
|
||||
<div> <input type="checkbox" id='fear' />${game.i18n.localize("Mosh.Fear")}</label></div>\
|
||||
<div> <input type="checkbox" id='body' />${game.i18n.localize("Mosh.Body")}</label></div>
|
||||
`
|
||||
|
||||
let d = new Dialog({
|
||||
title: "Select Stat",
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: `Select Stat`},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: DialogContent,
|
||||
buttons: {
|
||||
create: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
buttons: [
|
||||
{
|
||||
icon: 'fas fa-check',
|
||||
action: "create",
|
||||
label: "Create",
|
||||
callback: (html) => {
|
||||
callback: (event, button, dialog) => {
|
||||
|
||||
let new_stat_option = {
|
||||
modification: html.find('[id=\"modification\"]').prop("value"),
|
||||
modification: button.form.querySelector('[id=\"modification\"]').value,
|
||||
stats: [],
|
||||
}
|
||||
if (html.find('[id=\"strength\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"strength\"]')?.checked){
|
||||
new_stat_option.stats.push("strength");
|
||||
}
|
||||
if (html.find('[id=\"speed\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"speed\"]')?.checked){
|
||||
new_stat_option.stats.push("speed");
|
||||
}
|
||||
if (html.find('[id=\"intellect\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"intellect\"]')?.checked){
|
||||
new_stat_option.stats.push("intellect");
|
||||
}
|
||||
if (html.find('[id=\"combat\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"combat\"]')?.checked){
|
||||
new_stat_option.stats.push("combat");
|
||||
}
|
||||
if (html.find('[id=\"sanity\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"sanity\"]')?.checked){
|
||||
new_stat_option.stats.push("sanity");
|
||||
}
|
||||
if (html.find('[id=\"fear\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"fear\"]')?.checked){
|
||||
new_stat_option.stats.push("fear");
|
||||
}
|
||||
if (html.find('[id=\"body\"]')[0].checked){
|
||||
if (button.form.querySelector('[id=\"body\"]')?.checked){
|
||||
new_stat_option.stats.push("body");
|
||||
}
|
||||
if(new_stat_option.stats.length < 2){
|
||||
@@ -301,34 +320,21 @@ export class MothershipClassSheet extends MothershipItemSheet {
|
||||
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
{
|
||||
icon: 'fas fa-times',
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
callback: () => { }
|
||||
}
|
||||
},
|
||||
],
|
||||
default: "create",
|
||||
close: () => { }
|
||||
});
|
||||
d.render(true);
|
||||
d.render({force: true});
|
||||
|
||||
// Finally, create the item!
|
||||
return;
|
||||
}
|
||||
/****
|
||||
async _updateObject(event, formData) {
|
||||
const item = this.object;
|
||||
|
||||
var updateData;
|
||||
if (game.release.generation >= 12) {
|
||||
updateData = foundry.utils.expandObject(formData);
|
||||
} else {
|
||||
updateData = expandObject(formData);
|
||||
}
|
||||
|
||||
await item.update(updateData, {
|
||||
diff: false
|
||||
});
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class MothershipItemSheet extends ItemSheet {
|
||||
export class MothershipItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -50,7 +50,7 @@ export class MothershipItemSheet extends ItemSheet {
|
||||
data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic");
|
||||
|
||||
data.data.enriched = [];
|
||||
data.data.enriched.description = await TextEditor.enrichHTML(data.data.system.description, {async: true});
|
||||
data.data.enriched.description = await foundry.applications.ux.TextEditor.implementation.enrichHTML(data.data.system.description, {async: true});
|
||||
|
||||
return data.data;
|
||||
}
|
||||
|
||||
@@ -11,11 +11,8 @@ export class MothershipSkillSheet extends MothershipItemSheet {
|
||||
};
|
||||
options.dragDrop = [{dragSelector: null, dropSelector: ".dropitem"}];
|
||||
|
||||
if (game.release.generation >= 12) {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
} else {
|
||||
return mergeObject(super.defaultOptions, options);
|
||||
}
|
||||
return foundry.utils.mergeObject(super.defaultOptions, options);
|
||||
|
||||
}
|
||||
|
||||
/** @override */
|
||||
@@ -35,7 +32,7 @@ export class MothershipSkillSheet extends MothershipItemSheet {
|
||||
|
||||
async _onDrop(event){
|
||||
await super._onDrop(event);
|
||||
const droppedUuid = TextEditor.getDragEventData(event);
|
||||
const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||
if (droppedUuid.type != "Item"){
|
||||
return;
|
||||
}
|
||||
|
||||
+93
-501
@@ -46,31 +46,15 @@ Hooks.once('init', async function () {
|
||||
|
||||
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
|
||||
Actors.registerSheet("mosh", MothershipActorSheet, {
|
||||
types: ['character'],
|
||||
makeDefault: true
|
||||
});
|
||||
Actors.registerSheet("mosh", MothershipCreatureSheet, {
|
||||
types: ['creature'],
|
||||
makeDefault: false
|
||||
});
|
||||
|
||||
Actors.registerSheet("mosh", MothershipShipSheetSBT, {
|
||||
types: ['ship'],
|
||||
makeDefault: true
|
||||
});
|
||||
|
||||
Actors.registerSheet("mosh", MothershipShipSheet, {
|
||||
types: ['ship'],
|
||||
makeDefault: false
|
||||
});
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("mosh", MothershipClassSheet, {types: ['class'], makeDefault: true });
|
||||
Items.registerSheet("mosh", MothershipSkillSheet, {types: ['skill'], makeDefault: true });
|
||||
Items.registerSheet("mosh", MothershipItemSheet, {
|
||||
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
|
||||
foundry.documents.collections.Actors.registerSheet("mosh", MothershipActorSheet, {types: ['character'], makeDefault: true});
|
||||
foundry.documents.collections.Actors.registerSheet("mosh", MothershipCreatureSheet, {types: ['creature'], makeDefault: false});
|
||||
foundry.documents.collections.Actors.registerSheet("mosh", MothershipShipSheetSBT, {types: ['ship'], makeDefault: true});
|
||||
foundry.documents.collections.Actors.registerSheet("mosh", MothershipShipSheet, {types: ['ship'], makeDefault: false});
|
||||
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
|
||||
foundry.documents.collections.Items.registerSheet("mosh", MothershipClassSheet, {types: ['class'], makeDefault: true});
|
||||
foundry.documents.collections.Items.registerSheet("mosh", MothershipSkillSheet, {types: ['skill'], makeDefault: true});
|
||||
foundry.documents.collections.Items.registerSheet("mosh", MothershipItemSheet, {
|
||||
types: [
|
||||
"item",
|
||||
"weapon",
|
||||
@@ -79,8 +63,10 @@ Hooks.once('init', async function () {
|
||||
"module",
|
||||
"condition",
|
||||
"crew",
|
||||
"repair",],
|
||||
makeDefault: true });
|
||||
"repair"
|
||||
],
|
||||
makeDefault: true
|
||||
});
|
||||
|
||||
// If you need to add Handlebars helpers, here are a few useful examples:
|
||||
Handlebars.registerHelper('concat', function () {
|
||||
@@ -135,87 +121,6 @@ Hooks.once("ready", async function () {
|
||||
}
|
||||
});
|
||||
|
||||
//Calm & 1e/0e character updates
|
||||
// if the user has calm enabled at the start,
|
||||
if (game.settings.get('mosh','useCalm')) {
|
||||
//get list of actors
|
||||
let actorList = game.actors;
|
||||
let actorName = '';
|
||||
let minStart = null;
|
||||
let valueStart = null;
|
||||
let maxStart = null;
|
||||
let labelStart = '';
|
||||
let minEnd = null;
|
||||
let valueEnd = null;
|
||||
let maxEnd = null;
|
||||
let labelEnd = '';
|
||||
//loop through all actors and update their stress values
|
||||
actorList.forEach(function(actor){
|
||||
//loop through each result
|
||||
if (actor.type === 'character') {
|
||||
//set character name
|
||||
actorName = actor.name;
|
||||
//set current values
|
||||
minStart = actor.system.other.stress.min;
|
||||
valueStart = actor.system.other.stress.value;
|
||||
maxStart = actor.system.other.stress.max;
|
||||
labelStart = actor.system.other.stress.label;
|
||||
//if the label does not say Calm
|
||||
if (actor.system.other.stress.label != 'Calm') {
|
||||
//change it to calm
|
||||
actor.update({'system.other.stress.label': 'Calm'});
|
||||
//log
|
||||
labelEnd = 'Calm';
|
||||
}
|
||||
//if the MIN value is not 0, this is an old character
|
||||
if (actor.system.other.stress.min != 0) {
|
||||
//put this value as the maximum
|
||||
//change it to calm
|
||||
actor.update({'system.other.stress.max': actor.system.other.stress.min});
|
||||
//log
|
||||
maxEnd = actor.system.other.stress.min;
|
||||
//set the minimum to zero
|
||||
//change it to calm
|
||||
actor.update({'system.other.stress.min': 0});
|
||||
//log
|
||||
minEnd = 0;
|
||||
}
|
||||
//log change
|
||||
console.log(actorName + " stress.min changed from " + minStart + " to " + minEnd);
|
||||
console.log(actorName + " stress.max changed from " + maxStart + " to " + maxEnd);
|
||||
console.log(actorName + " stress.label changed from " + labelStart + " to " + labelEnd);
|
||||
//rerender this sheet
|
||||
actor.render();
|
||||
}
|
||||
});
|
||||
//user does not have calm enabled
|
||||
} else {
|
||||
//if the user has Zero edition enabled
|
||||
if (!game.settings.get('mosh','firstEdition')) {
|
||||
//loop through all actors and update their stress values
|
||||
actorList.forEach(function(actor){
|
||||
//loop through each result
|
||||
if (actor.type === 'character') {
|
||||
//set character name
|
||||
actorName = actor.name;
|
||||
//set current values
|
||||
maxStart = actor.system.other.stress.max;
|
||||
//if the max value, this is an old character
|
||||
if (actor.system.other.stress.max != 999) {
|
||||
//put this value as the maximum
|
||||
//change it to calm
|
||||
actor.update({'system.other.stress.max': 999});
|
||||
//log
|
||||
maxEnd = 999;
|
||||
}
|
||||
//log change
|
||||
console.log(actorName + " stress.max changed from " + maxStart + " to " + maxEnd);
|
||||
//rerender this sheet
|
||||
actor.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//add custom damage dice for MOSH
|
||||
@@ -269,54 +174,44 @@ Hooks.once('diceSoNiceReady', (dice3d) => {
|
||||
)
|
||||
})
|
||||
|
||||
//Hooks.on("preCreateActor", (createData) => {
|
||||
/**
|
||||
* Set default values for new actors' tokens
|
||||
*/
|
||||
//set initial things when creating an actor
|
||||
Hooks.on("preCreateActor", (document, createData, options, userId) => {
|
||||
let disposition = CONST.TOKEN_DISPOSITIONS.NEUTRAL;
|
||||
console.log("preCreateActor fired for:", createData?.name, createData?.type);
|
||||
|
||||
if (createData.type == "creature") {
|
||||
disposition = CONST.TOKEN_DISPOSITIONS.HOSTILE
|
||||
}
|
||||
const disposition =
|
||||
createData.type === "creature"
|
||||
? CONST.TOKEN_DISPOSITIONS.HOSTILE
|
||||
: CONST.TOKEN_DISPOSITIONS.NEUTRAL;
|
||||
|
||||
// Set wounds, advantage, and display name visibility
|
||||
foundry.utils.mergeObject(createData,
|
||||
{
|
||||
"token.bar1": { "attribute": "health" }, // Default Bar 1 to Health
|
||||
"token.bar2": { "attribute": "hits" }, // Default Bar 2 to Insanity
|
||||
"token.displayName": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER, // Default display name to be on owner hover
|
||||
"token.displayBars": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER, // Default display bars to be on owner hover
|
||||
"token.disposition": disposition, // Default disposition to neutral
|
||||
"token.name": createData.name // Set token name to actor name
|
||||
})
|
||||
// Apply prototype token defaults (v12+)
|
||||
document.updateSource({
|
||||
"prototypeToken.bar1.attribute": "system.health", // <-- use full system path
|
||||
"prototypeToken.bar2.attribute": "system.hits", // adjust to your schema
|
||||
"prototypeToken.displayName": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER,
|
||||
"prototypeToken.displayBars": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER,
|
||||
"prototypeToken.disposition": disposition,
|
||||
"prototypeToken.name": createData.name
|
||||
});
|
||||
|
||||
console.log(createData);
|
||||
console.log("Created!");
|
||||
|
||||
if (createData.type == "character") {
|
||||
console.log("Got here");
|
||||
const prototypeToken = { disposition: 1, actorLink: true, vision: true}; // Set disposition to "Friendly"
|
||||
document.updateSource({ prototypeToken });
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
Hooks.on('renderSidebarTab', async (app, html) => {
|
||||
console.log(app);
|
||||
console.log(app.options.id);
|
||||
if (app.options.id == "actors" || app.title == "Actors Directory") {
|
||||
console.log("testing~");
|
||||
let button = $(`<button class="import-json"><i class="fas fa-file-import"></i> Import JSON</button>`);
|
||||
button.click(function () {
|
||||
d.render(true);
|
||||
if (createData.type === "character") {
|
||||
document.updateSource({
|
||||
"prototypeToken.disposition": CONST.TOKEN_DISPOSITIONS.FRIENDLY,
|
||||
"prototypeToken.actorLink": true,
|
||||
"prototypeToken.vision": true
|
||||
});
|
||||
html.find(".directory-footer").append(button);
|
||||
|
||||
if (game.settings.get("mosh", "useCalm")) {
|
||||
document.updateSource({
|
||||
"system.other.stress.min": 0,
|
||||
"system.other.stress.value": 85,
|
||||
"system.other.stress.max": 85,
|
||||
"system.other.stress.label": "Calm"
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Hotbar Macros */
|
||||
/* -------------------------------------------- */
|
||||
@@ -338,11 +233,8 @@ async function createMothershipMacro(data, slot) {
|
||||
var actor = game.actors.get(itemUUID[1]);
|
||||
var item;
|
||||
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(actor.getEmbeddedDocument('Item',itemUUID[3]));
|
||||
} else {
|
||||
item = duplicate(actor.getEmbeddedDocument('Item',itemUUID[3]));
|
||||
}
|
||||
|
||||
console.log(item);
|
||||
|
||||
if (!item) return ui.notifications.warn("You can only create macro buttons for owned Items");
|
||||
@@ -366,326 +258,6 @@ console.log(command);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Actor from JSON */
|
||||
/* -------------------------------------------- */
|
||||
// If there's a better place for these, please do move them
|
||||
let skillValues = {
|
||||
"archeology": { "value": 10, "rank": "Trained" },
|
||||
"archaelogy": { "value": 10, "rank": "Trained" }, //The mobile app has a typo so needs this.
|
||||
"archaeology": { "value": 10, "rank": "Trained" },
|
||||
"art": { "value": 10, "rank": "Trained" },
|
||||
"athletics": { "value": 10, "rank": "Trained" },
|
||||
"botany": { "value": 10, "rank": "Trained" },
|
||||
"chemistry": { "value": 10, "rank": "Trained" },
|
||||
"computers": { "value": 10, "rank": "Trained" },
|
||||
"geology": { "value": 10, "rank": "Trained" },
|
||||
"industrialequipment": { "value": 10, "rank": "Trained" },
|
||||
"juryrigging": { "value": 10, "rank": "Trained" },
|
||||
"linguistics": { "value": 10, "rank": "Trained" },
|
||||
"mathematics": { "value": 10, "rank": "Trained" },
|
||||
"militarytraining": { "value": 10, "rank": "Trained" },
|
||||
"rimwise": { "value": 10, "rank": "Trained" },
|
||||
"theology": { "value": 10, "rank": "Trained" },
|
||||
"zerog": { "value": 10, "rank": "Trained" },
|
||||
"zoology": { "value": 10, "rank": "Trained" },
|
||||
"asteroidmining": { "value": 15, "rank": "Expert" },
|
||||
"ecology": { "value": 15, "rank": "Expert" },
|
||||
"explosives": { "value": 15, "rank": "Expert" },
|
||||
"fieldmedicine": { "value": 15, "rank": "Expert" },
|
||||
"firearms": { "value": 15, "rank": "Expert" },
|
||||
"hacking": { "value": 15, "rank": "Expert" },
|
||||
"handtohandcombat": { "value": 15, "rank": "Expert" },
|
||||
"mechanicalrepair": { "value": 15, "rank": "Expert" },
|
||||
"mysticism": { "value": 15, "rank": "Expert" },
|
||||
"pathology": { "value": 15, "rank": "Expert" },
|
||||
"pharmacology": { "value": 15, "rank": "Expert" },
|
||||
"physics": { "value": 15, "rank": "Expert" },
|
||||
"piloting": { "value": 15, "rank": "Expert" },
|
||||
"psychology": { "value": 15, "rank": "Expert" },
|
||||
"tactics": { "value": 15, "rank": "Expert" },
|
||||
"wildernesssurvival": { "value": 15, "rank": "Expert" },
|
||||
"artificialintenligence": { "value": 20, "rank": "Master" },
|
||||
"command": { "value": 20, "rank": "Master" },
|
||||
"cybernetics": { "value": 20, "rank": "Master" },
|
||||
"engineering": { "value": 20, "rank": "Master" },
|
||||
"exobiology": { "value": 20, "rank": "Master" },
|
||||
"hyperspace": { "value": 20, "rank": "Master" },
|
||||
"planetology": { "value": 20, "rank": "Master" },
|
||||
"robotics": { "value": 20, "rank": "Master" },
|
||||
"sophontology": { "value": 20, "rank": "Master" },
|
||||
"surgery": { "value": 20, "rank": "Master" },
|
||||
"xenoesoterism": { "value": 20, "rank": "Master" },
|
||||
}
|
||||
|
||||
let conditions = {
|
||||
"adrenalinerush": "[+] on all rolls for the next 2d10 minutes. Reduce your Stress by 1d5.",
|
||||
"anxious": "Gain 1 Stress.",
|
||||
"jumpy": "Gain 1 Stress. All Close crewmembers gain 2 Stress.",
|
||||
"overwhelmed": "All actions at [-] for 1d10 minutes. Permanently raise your Minimum Stress by 1.",
|
||||
"coward": "Gain a new Condition: You must make a Fear Save to engage in violence or flee.",
|
||||
"frightened": "Gain a new Condition: Phobia: When encountering your Phobia make a Fear Save [-] or gain 1d5 Stress.",
|
||||
"nightmares": "Gain a new Condition: Sleep is difficult, gain [-] on all Rest Saves.",
|
||||
"lossofconfidence": "Gain a new Condition: Choose one of your Skills and lose that Skill's bonus.",
|
||||
"deflated": "Gain a new Condition: Whenever a Close crewmember fails a Save, gain 1 Stress.",
|
||||
"doomed": "Gain a new Condition: You feel cursed and unlucky. All Critical Successes are instead Critical Failures.",
|
||||
"paranoid": "For the next week, whenever someone joins your group (even if they only left for a short period of time), make a Fear Save or gain 1 Stress.",
|
||||
"haunted": "Gain a new Condition: Something starts visiting you at night. In your dreams. Out of the corner of your eye. And soon it will start making demands.",
|
||||
"deathwish": "For the next 24 hours, whenever you encounter a stranger or known enemy, you must make a Sanity Save or immediately attack them.",
|
||||
"propheticvision": "You immediately experience an intense hallucination or vision of an impending terror or horrific event. Gain 1 Stress.",
|
||||
"catatonic": "Become unresponsive and unmoving for 2d10 minutes. Reduce Stress by 1d10.",
|
||||
"rage": "Immediately attack the closest crewmember until you inflict at least 2d10 DMG. If there is no crewmember Close, you attack your surrounding environment.",
|
||||
"spiraling": "Gain a new Condition: You make Panic Checks with Disadvantage.",
|
||||
"compoundingproblems": "Roll twice on this table. Permanently raise your Minimum Stress by 1.",
|
||||
"heartattack": "Permanently lose 1 Wound. Gain [-] on all rolls for 1d10 hours. Permanently raise your Minimum Stress by 1.",
|
||||
"collapse": "You no longer control this character. Hand your sheet to the Warden and roll up a new character to play."
|
||||
}
|
||||
|
||||
async function createActorFromJson(jsonData) {
|
||||
let actorData;
|
||||
let newActor;
|
||||
try {
|
||||
actorData = JSON.parse(jsonData);
|
||||
newActor = {
|
||||
"name": actorData.name,
|
||||
"type": "character",
|
||||
"img": "icons/svg/mystery-man.svg",
|
||||
"system": {
|
||||
"health": {
|
||||
"value": actorData.health,
|
||||
"max": actorData.maxHealth,
|
||||
"min": 0
|
||||
},
|
||||
"hits": {
|
||||
"value": actorData.wounds,
|
||||
"max": actorData.maxWounds
|
||||
},
|
||||
"biography": "",
|
||||
"notes": "",
|
||||
"weight": { "current": 0, "capacity": 0 },
|
||||
"settings": { "useCalm": false },
|
||||
"class": {
|
||||
"value": actorData.characterClass.charAt(0).toUpperCase() + actorData.characterClass.slice(1)
|
||||
},
|
||||
"rank": { "value": "" },
|
||||
"pronouns": { "value": actorData.pronouns },
|
||||
"credits": { "value": actorData.credits },
|
||||
"stressdesc": { "value": actorData.traumaResponse },
|
||||
"xp": { "value": 0, "html": 0, "selectedSkill": "" },
|
||||
"stressdesc": { "value": actorData.traumaResponse },
|
||||
"attributes": { "level": { "value": actorData.highScore } },
|
||||
"stats": {
|
||||
"strength": {
|
||||
"value": actorData.strength, "label": "Strength", "mod": 0
|
||||
},
|
||||
"speed": {
|
||||
"value": actorData.speed, "label": "Speed", "mod": 0
|
||||
},
|
||||
"intellect": {
|
||||
"value": actorData.intellect, "label": "Intellect", "mod": 0
|
||||
},
|
||||
"combat": {
|
||||
"value": actorData.combat, "label": "Combat", "mod": 0
|
||||
},
|
||||
"sanity": {
|
||||
"value": actorData.sanity, "label": "Sanity", "mod": 0
|
||||
},
|
||||
"fear": {
|
||||
"value": actorData.fear, "label": "Fear", "mod": 0
|
||||
},
|
||||
"body": {
|
||||
"value": actorData.body, "label": "Body", "mod": 0
|
||||
}
|
||||
},
|
||||
"other": {
|
||||
"stress": {
|
||||
"value": actorData.stress, "min": actorData.minStress, "label": "Stress"
|
||||
},
|
||||
"resolve": 0
|
||||
}
|
||||
}
|
||||
};
|
||||
var items = [];
|
||||
if (actorData.trinket) {
|
||||
items.push({
|
||||
"name": "Trinket: " + actorData.trinket, "type": "item"
|
||||
})
|
||||
}
|
||||
if (actorData.patch) {
|
||||
items.push({
|
||||
"name": "Patch: " + actorData.patch, "type": "item"
|
||||
})
|
||||
}
|
||||
// Equipment
|
||||
for (let i = 0; i < actorData.equipment.length; i++) {
|
||||
items.push({
|
||||
"name": actorData.equipment[i].name,
|
||||
"type": "item",
|
||||
"system": {
|
||||
"description": actorData.equipment[i].description,
|
||||
"cost": actorData.equipment[i].cost,
|
||||
"quantity": actorData.equipment[i].quantity
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
// Items
|
||||
for (let i = 0; i < actorData.items.length; i++) {
|
||||
items.push({
|
||||
"name": actorData.items[i].title,
|
||||
"type": "item",
|
||||
"system": {
|
||||
"description": actorData.items[i].description,
|
||||
"cost": actorData.items[i].cost,
|
||||
"quantity": actorData.items[i].quantity
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
// Armor
|
||||
for (let i = 0; i < actorData.armor.length; i++) {
|
||||
items.push({
|
||||
"name": actorData.armor[i].name,
|
||||
"type": "armor",
|
||||
"system": {
|
||||
"description": actorData.armor[i].notes,
|
||||
"cost": actorData.armor[i].cost,
|
||||
"bonus": actorData.armor[i].armorPoints,
|
||||
"equipped": actorData.armor[i].equipped
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
// Weapons
|
||||
for (let i = 0; i < actorData.weapons.length; i++) {
|
||||
console.log(actorData.weapons[i]);
|
||||
items.push({
|
||||
"name": actorData.weapons[i].name,
|
||||
"type": "weapon",
|
||||
"system": {
|
||||
"description": actorData.weapons[i].special,
|
||||
"cost": actorData.weapons[i].cost,
|
||||
"ranges": {
|
||||
"short": 0,
|
||||
"medium": 0,
|
||||
"long": 0,
|
||||
"value": actorData.weapons[i].weaponRange
|
||||
},
|
||||
"equipped": actorData.weapons[i].equipped,
|
||||
"critEffect": actorData.weapons[i].critical,
|
||||
"shots": actorData.weapons[i].shots,
|
||||
"curShots": actorData.weapons[i].shots,
|
||||
"ammo": actorData.weapons[i].magazines,
|
||||
"shotsPerFire": "1",
|
||||
"useAmmo": false,
|
||||
"ammoType": "",
|
||||
"critDmg": actorData.weapons[i].critical,
|
||||
"critEffect": "",
|
||||
"damage": actorData.weapons[i].damageString.replace("DMG", "")
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
// Skills
|
||||
for (let i = 0; i < actorData.skills.length; i++) {
|
||||
|
||||
if(actorData.skills[i] == undefined) continue;
|
||||
console.log(actorData.skills[i]);
|
||||
console.log(skillValues[actorData.skills[i].toLowerCase()]);
|
||||
|
||||
// Really betting for the app to only export base skills, if in the future
|
||||
// they add custom skills, they'll need to be checked if they even exist
|
||||
let words = actorData.skills[i].split(/(?=[A-Z])/);
|
||||
let skillName = words.map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
||||
items.push({
|
||||
"name": skillName,
|
||||
"type": "skill",
|
||||
"system": {
|
||||
"description": "",
|
||||
"bonus": skillValues[actorData.skills[i].toLowerCase()].value,
|
||||
"rank": skillValues[actorData.skills[i].toLowerCase()].rank
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
// Conditions
|
||||
for (let i = 0; i < actorData.conditions.length; i++) {
|
||||
// Same thing as skills
|
||||
let conName = actorData.conditions[i].conditionType;
|
||||
let words = conName.split(/(?=[A-Z])/);
|
||||
let name = words.map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
||||
//-Minor consideration since the app eports heartAttack for both
|
||||
if (actorData.characterClass == "android" && conName.toLowerCase() == "heartattack") {
|
||||
name = "Short Circuit"
|
||||
}
|
||||
items.push({
|
||||
"name": name,
|
||||
"type": "condition",
|
||||
"system": {
|
||||
"description": conditions[conName.toLowerCase()],
|
||||
"treatment": { "value": 0, "html": "" }
|
||||
},
|
||||
"img": "icons/svg/item-bag.svg",
|
||||
})
|
||||
}
|
||||
newActor.items = items
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
ui.notifications.error("Invalid JSON, make sure you exported it from the Mothership Companion App");
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the type of the actor (e.g., 'character') is correctly set according to your system
|
||||
newActor.type = 'character';
|
||||
// Here we assume the actorData structure is correctly formed according to your system needs
|
||||
|
||||
// You might need additional checks/transformations depending on the JSON data structure
|
||||
|
||||
try {
|
||||
await Actor.create(newActor);
|
||||
ui.notifications.info("Character imported successfully!");
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
ui.notifications.error("Failed to import character, check console for more details.");
|
||||
}
|
||||
}
|
||||
|
||||
let d = new Dialog({
|
||||
title: "Mothership Companion JSON Import",
|
||||
content: `
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>JSON File:</label>
|
||||
<input type="file" id="json-upload" accept=".json">
|
||||
</div>
|
||||
</form>
|
||||
`,
|
||||
buttons: {
|
||||
upload: {
|
||||
label: "Upload",
|
||||
callback: (html) => {
|
||||
let fileInput = html.find('#json-upload')[0];
|
||||
let file = fileInput.files[0];
|
||||
let reader = new FileReader();
|
||||
|
||||
reader.onload = (event) => {
|
||||
let contents = event.target.result;
|
||||
createActorFromJson(contents);
|
||||
};
|
||||
|
||||
reader.onerror = (event) => {
|
||||
console.error(`File could not be read: ${event.target.error}`);
|
||||
};
|
||||
|
||||
reader.readAsText(file);
|
||||
}
|
||||
}
|
||||
},
|
||||
default: "upload"
|
||||
})
|
||||
d.render(true);
|
||||
|
||||
|
||||
/**
|
||||
* Roll Macro from a Weapon.
|
||||
* @param {string} itemName
|
||||
@@ -706,11 +278,7 @@ function rollItemMacro(itemName) {
|
||||
//get item id
|
||||
itemId = game.user.character.items.getName(itemName)._id;
|
||||
//get item
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
|
||||
} else {
|
||||
item = duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(game.user.character.getEmbeddedDocument("Item", itemId));
|
||||
//warn if no item
|
||||
if (!item) return ui.notifications.warn(`Your controlled Actor does not have an item named ${itemName}`);
|
||||
//roll action
|
||||
@@ -733,11 +301,7 @@ function rollItemMacro(itemName) {
|
||||
//get item id
|
||||
itemId = token.actor.items.getName(itemName)._id;
|
||||
//get item
|
||||
if (game.release.generation >= 12) {
|
||||
item = foundry.utils.duplicate(token.actor.getEmbeddedDocument("Item", itemId));
|
||||
} else {
|
||||
item = duplicate(token.actor.getEmbeddedDocument("Item", itemId));
|
||||
}
|
||||
item = foundry.utils.duplicate(token.actor.getEmbeddedDocument("Item", itemId));
|
||||
//warn if no item
|
||||
if (!item) return ui.notifications.warn(`Your controlled Actor does not have an item named ${itemName}`);
|
||||
//roll action
|
||||
@@ -909,19 +473,20 @@ async function noCharSelected() {
|
||||
}
|
||||
//create final dialog data
|
||||
const dialogData = {
|
||||
title: `Macro Issue`,
|
||||
window: {title: `Macro Issue`},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: errorMessage,
|
||||
buttons: {}
|
||||
buttons: [
|
||||
{
|
||||
label: `Ok`,
|
||||
action: 'action_ok',
|
||||
callback: () => { },
|
||||
icon: 'fas fa-check'
|
||||
}
|
||||
]
|
||||
};
|
||||
//add buttons
|
||||
//Ok
|
||||
dialogData.buttons.cancel = {
|
||||
label: `Ok`,
|
||||
callback: () => { },
|
||||
icon: '<i class="fas fa-check"></i>'
|
||||
};
|
||||
//render dialog
|
||||
const dialog = new Dialog(dialogData).render(true);
|
||||
const dialog = new foundry.applications.api.DialogV2(dialogData).render({force: true});
|
||||
//log what was done
|
||||
console.log(`Told the user that no character was selected.`);
|
||||
});
|
||||
@@ -941,19 +506,20 @@ async function noShipSelected() {
|
||||
}
|
||||
//create final dialog data
|
||||
const dialogData = {
|
||||
title: `Macro Issue`,
|
||||
window: {title: `Macro Issue`},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: errorMessage,
|
||||
buttons: {}
|
||||
buttons: [
|
||||
{
|
||||
label: `Ok`,
|
||||
action: 'action_ok',
|
||||
callback: () => { },
|
||||
icon: 'fas fa-check'
|
||||
}
|
||||
]
|
||||
};
|
||||
//add buttons
|
||||
//Ok
|
||||
dialogData.buttons.cancel = {
|
||||
label: `Ok`,
|
||||
callback: () => { },
|
||||
icon: '<i class="fas fa-check"></i>'
|
||||
};
|
||||
//render dialog
|
||||
const dialog = new Dialog(dialogData).render(true);
|
||||
const dialog = foundry.applications.api.DialogV2(dialogData).render({force: true});
|
||||
//log what was done
|
||||
console.log(`Told the user that no character was selected.`);
|
||||
});
|
||||
@@ -1088,4 +654,30 @@ export async function fromIdUuid(id_uuid, options={}){
|
||||
return game.macros.filter(i=> i.id == macroId)[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will format a number into a more readable string with appropriate suffixes.
|
||||
* For example, 1500 becomes "1.5K", 2000000 becomes "2M", etc.
|
||||
* It handles numbers in the trillions (t), billions (b), millions (m), and thousands (k).
|
||||
* It also handles negative numbers and zero.
|
||||
* At the end it appends 'cr' to denote credits.
|
||||
* @namespace formatCreditsNumber
|
||||
* @param {int} num Credits number to format.
|
||||
* @returns {string} Credits , formatted string with appropriate suffix.
|
||||
*/
|
||||
export function formatCreditsNumber(num) {
|
||||
const absNum = Math.abs(num);
|
||||
|
||||
if (absNum >= 1_000_000_000_000) {
|
||||
return (num / 1_000_000_000_000).toFixed(1).replace(/\.0$/, '') + 'tcr';
|
||||
} else if (absNum >= 1_000_000_000) {
|
||||
return (num / 1_000_000_000).toFixed(1).replace(/\.0$/, '') + 'bcr';
|
||||
} else if (absNum >= 1_000_000) {
|
||||
return (num / 1_000_000).toFixed(1).replace(/\.0$/, '') + 'mcr';
|
||||
} else if (absNum >= 1_000) {
|
||||
return (num / 1_000).toFixed(1).replace(/\.0$/, '') + 'kcr';
|
||||
} else {
|
||||
return num.toString() + 'cr';
|
||||
}
|
||||
}
|
||||
+21
-7
@@ -196,15 +196,29 @@ export const registerSettings = function () {
|
||||
valueStart = actor.system.other.stress.value;
|
||||
maxStart = actor.system.other.stress.max;
|
||||
labelStart = actor.system.other.stress.label;
|
||||
//convert min stress to max calm
|
||||
actor.update({'system.other.stress.max': Math.round(85-(actor.system.other.stress.min*3))});
|
||||
maxEnd = Math.round(85-(actor.system.other.stress.min*3));
|
||||
//update max calm
|
||||
//set max calm to 85 if min stress is 2
|
||||
if (minStart === 2) {
|
||||
actor.update({'system.other.stress.max': 85});
|
||||
maxEnd = 85;
|
||||
//otherwise convert the min stress to max calm
|
||||
} else {
|
||||
actor.update({'system.other.stress.max': Math.round(85-(actor.system.other.stress.value*3))});
|
||||
maxEnd = Math.round(85-(actor.system.other.stress.value*3));
|
||||
}
|
||||
//set min stress to 0
|
||||
actor.update({'system.other.stress.min': 0});
|
||||
minEnd = 0;
|
||||
//convert stress to calm
|
||||
actor.update({'system.other.stress.value': Math.round(85-(actor.system.other.stress.value*3))});
|
||||
valueEnd = Math.round(85-(actor.system.other.stress.value*3));
|
||||
//update calm
|
||||
//set calm to 85 if stress is 2
|
||||
if (valueStart === 2) {
|
||||
actor.update({'system.other.stress.value': 85});
|
||||
valueEnd = 85;
|
||||
//otherwise convert stress to calm
|
||||
} else {
|
||||
actor.update({'system.other.stress.value': Math.round(85-(actor.system.other.stress.value*3))});
|
||||
valueEnd = Math.round(85-(actor.system.other.stress.value*3));
|
||||
}
|
||||
//set stress label to Calm
|
||||
actor.update({'system.other.stress.label': 'Calm'});
|
||||
labelEnd = 'Calm';
|
||||
@@ -234,7 +248,7 @@ export const registerSettings = function () {
|
||||
//set min stress to 20 if > 20
|
||||
if (Math.round((85-actor.system.other.stress.max)/3) > 20) {
|
||||
actor.update({'system.other.stress.min': 20});
|
||||
minEnd = 2;
|
||||
minEnd = 20;
|
||||
//set min stress to 2 if < 2
|
||||
} else if (Math.round((85-actor.system.other.stress.max)/3) < 2) {
|
||||
actor.update({'system.other.stress.min': 2});
|
||||
|
||||
@@ -95,17 +95,22 @@ export class DLCreatureSettings extends FormApplication {
|
||||
"system.swarm.enabled": ev.currentTarget.checked
|
||||
});
|
||||
|
||||
let new_combat = 0;
|
||||
let swarm_combat = 0;
|
||||
let current_combat = 0;
|
||||
|
||||
if (ev.currentTarget.checked) {
|
||||
//set backup of current combat
|
||||
swarm_combat = this.object.system.stats.combat.value;
|
||||
//calculate new combat stat based on wounds,
|
||||
new_combat = this.object.system.swarm.combat.value * ( this.object.system.hits.max - this.object.system.hits.value);
|
||||
current_combat = this.object.system.stats.combat.value * ( this.object.system.hits.max - this.object.system.hits.value);
|
||||
}
|
||||
else{
|
||||
//revert back combat if swarm is disabled
|
||||
new_combat = this.object.system.swarm.combat.value;
|
||||
current_combat = this.object.system.swarm.combat.value;
|
||||
}
|
||||
this.object.update({
|
||||
"system.stats.combat.value":new_combat
|
||||
"system.stats.combat.value":current_combat,
|
||||
"system.swarm.combat.value":swarm_combat
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -150,6 +155,6 @@ export class DLCreatureSettings extends FormApplication {
|
||||
this.object.update({
|
||||
formData
|
||||
});
|
||||
this.object.sheet.render(true);
|
||||
this.object.sheet.render({force: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
options.classes = ["mosh", "sheet", "actor", "character"];
|
||||
options.template = 'systems/mosh/templates/dialogs/actor-generator-dialog.html';
|
||||
options.width = 800;
|
||||
options.height = "auto";
|
||||
options.dragDrop = [{ dragSelector: null, dropSelector: ".dropitem" }];
|
||||
return options;
|
||||
}
|
||||
@@ -111,17 +112,17 @@ export class DLActorGenerator extends FormApplication {
|
||||
let resultText = "";
|
||||
let resultUuid = [];
|
||||
for (var i = 0; i < tableResult.results.length; i++) {
|
||||
if (tableResult.results[i].type == "pack") {
|
||||
if (tableResult.results[i].type == "pack" || tableResult.results[i].type == "document") {
|
||||
if (type == "ul") {
|
||||
this._element.find(`ul[id="${id}.text"]`).append(`<li>${tableResult.results[i].text}</li>`);
|
||||
this._element.find(`ul[id="${id}.text"]`).append(`<li>${tableResult.results[i].name}</li>`);
|
||||
} else {
|
||||
resultText += tableResult.results[i].text + "; ";
|
||||
resultText += tableResult.results[i].name + "; ";
|
||||
}
|
||||
resultUuid.push(tableResult.results[i].documentId);
|
||||
resultUuid.push(tableResult.results[i].documentUuid);
|
||||
} else if (tableResult.results[i].type == "text") {
|
||||
let tableTextmatch = tableResult.results[i].text.match(/(.*)(@UUID.*)/i);
|
||||
let tableTextmatch = tableResult.results[i].description.match(/(.*)(@UUID.*)/i);
|
||||
if (type == "ul") {
|
||||
this._element.find(`ul[id="${id}.text"]`).append(`<li>${await TextEditor.enrichHTML(tableTextmatch[2].replace(/(\<br\s\/>)+/i, ""), { async: true })}</li>`);
|
||||
this._element.find(`ul[id="${id}.text"]`).append(`<li>${await foundry.applications.ux.TextEditor.implementation.enrichHTML(tableTextmatch[2].replace(/(\<br\s\/>)+/i, ""), { async: true })}</li>`);
|
||||
}
|
||||
else {
|
||||
resultText += tableTextmatch[1].replace(/(\<br\s\/>)+/i, "");
|
||||
@@ -146,6 +147,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
async rollPatch(html) {
|
||||
if (!this.patchTable) {
|
||||
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.Error.NoClass"));
|
||||
return;
|
||||
}
|
||||
await this.rollTable(html, "system.class.patch", this.patchTable);
|
||||
|
||||
@@ -153,6 +155,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
async rollTrinket(html) {
|
||||
if (!this.trinketTable) {
|
||||
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.Error.NoClass"));
|
||||
return;
|
||||
}
|
||||
await this.rollTable(html, "system.class.trinket", this.trinketTable);
|
||||
|
||||
@@ -193,23 +196,29 @@ export class DLActorGenerator extends FormApplication {
|
||||
*/
|
||||
async fixedSkillOptionPopup(html, skillPopupOptions) {
|
||||
return new Promise((resolve) => {
|
||||
let buttons_options = {};
|
||||
if(skillPopupOptions.length == 0){
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
let buttons_options = [];
|
||||
for (let j = 0; j < skillPopupOptions.length; j++) {
|
||||
buttons_options[j] = {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
buttons_options.push({
|
||||
icon: 'fas fa-check',
|
||||
action: skillPopupOptions[j].name,
|
||||
label: skillPopupOptions[j].name,
|
||||
callback: () => resolve(skillPopupOptions[j].uuid),
|
||||
};
|
||||
});
|
||||
}
|
||||
let d = new Dialog({
|
||||
title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle"),
|
||||
content: `<p>${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")}</p>`,
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle")},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: `<div class="macro_desc"><h4>${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")}</h4></div>`,
|
||||
buttons: buttons_options,
|
||||
default: "1",
|
||||
//render: html => console.log("Register interactivity in the rendered dialog"),
|
||||
//close: html => console.log("This always is logged no matter which option is chosen")
|
||||
});
|
||||
d.render(true);
|
||||
d.render({force: true});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -220,7 +229,6 @@ export class DLActorGenerator extends FormApplication {
|
||||
* @returns
|
||||
*/
|
||||
async updateSkillHtmlUl(html, skillsUuid) {
|
||||
//html.find(`ul[id="system.class.skils.text"]`).empty();
|
||||
let new_skills = await html.find(`input[id="system.class.skills.uuid"]`).prop("value").split(",").filter(Boolean);
|
||||
for (let i = 0; i < skillsUuid.length; i++) {
|
||||
let skill = null;
|
||||
@@ -242,7 +250,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
}
|
||||
new_skills.push(skill.uuid);
|
||||
/**we need to keep only the Uuid of the item, not the complete string (for now) */
|
||||
let li_html = `<li><img src="${skill.img}" title="${skill.name}" width="24" height="24"/> ${await TextEditor.enrichHTML(skill.name, { async: true })}</li>`;
|
||||
let li_html = `<li>${await foundry.applications.ux.TextEditor.implementation.enrichHTML(skill.name, { async: true })}</li>`;
|
||||
html.find(`ul[id="system.class.skils.text"]`).append(li_html);
|
||||
|
||||
}
|
||||
@@ -321,18 +329,20 @@ export class DLActorGenerator extends FormApplication {
|
||||
}
|
||||
}
|
||||
|
||||
let popUpContent = await renderTemplate(template, skillPopupData);
|
||||
let popUpContent = await foundry.applications.handlebars.renderTemplate(template, skillPopupData);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
let d = new Dialog({
|
||||
title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle"),
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle")},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: popUpContent,
|
||||
buttons: {
|
||||
"1": {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
buttons: [
|
||||
{
|
||||
icon: 'fas fa-check',
|
||||
action: `action_save`,
|
||||
label: "Save",
|
||||
callback: (html) => {
|
||||
let form = html.find('form')[0];
|
||||
callback: (event, button, dialog) => {
|
||||
let form = button.form;
|
||||
let formData = new FormData(form);
|
||||
let new_skills = [];
|
||||
formData.forEach((value, key) => {
|
||||
@@ -345,11 +355,11 @@ export class DLActorGenerator extends FormApplication {
|
||||
this.updateSkillHtmlUl(this._element, new_skills);
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
default: "1",
|
||||
});
|
||||
d.render(true);
|
||||
d.render({force: true});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -361,29 +371,32 @@ export class DLActorGenerator extends FormApplication {
|
||||
async showOptionsDialog(list_option_skills_or) {
|
||||
let popupData = {options:list_option_skills_or};
|
||||
|
||||
let popUpContent = await renderTemplate("systems/mosh/templates/dialogs/actor-generator/actor-generator-skill-option-choice-dialog.html", popupData);
|
||||
let popUpContent = await foundry.applications.handlebars.renderTemplate("systems/mosh/templates/dialogs/actor-generator/actor-generator-skill-option-choice-dialog.html", popupData);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
|
||||
let buttonsData = {};
|
||||
for (let i=0;i<list_option_skills_or.length;i++){
|
||||
buttonsData[i]={
|
||||
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: list_option_skills_or[i].name,//game.i18n.localize("Mosh.CharacterGenerator.SkillOption.ChoiceWord") + ` ${i}`,
|
||||
callback: () => {
|
||||
resolve(list_option_skills_or[i]);
|
||||
}
|
||||
|
||||
};
|
||||
if(list_option_skills_or.length == 0){
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
let d = new Dialog({
|
||||
title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle"),
|
||||
let buttonsData = [];
|
||||
for (let i=0;i<list_option_skills_or.length;i++){
|
||||
buttonsData.push({
|
||||
icon: 'fas fa-check',
|
||||
action: list_option_skills_or[i].name,
|
||||
label: list_option_skills_or[i].name,//game.i18n.localize("Mosh.CharacterGenerator.SkillOption.ChoiceWord") + ` ${i}`,
|
||||
callback: () => {
|
||||
resolve(list_option_skills_or[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: game.i18n.localize("Mosh.CharacterGenerator.SkillOption.PopupTitle")},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: popUpContent,
|
||||
window:{width: 500,},
|
||||
window:{width: 500},
|
||||
buttons: buttonsData,
|
||||
});
|
||||
d.render(true);
|
||||
d.render({force: true});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -395,6 +408,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
let class_uuid = html.find(`input[id="system.class.uuid"]`).prop("value");
|
||||
if (class_uuid == "") {
|
||||
ui.notifications.error(game.i18n.localize("Mosh.CharacterGenerator.SkillOption.Classerror"));
|
||||
return;
|
||||
}
|
||||
let classObject = await fromUuid(class_uuid);
|
||||
//empty previously existing skills
|
||||
@@ -429,6 +443,48 @@ export class DLActorGenerator extends FormApplication {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask the user for the stat options, and apply the bonuses to the form.
|
||||
* @param {Array} list_option_stats_and_saves
|
||||
* @returns
|
||||
*/
|
||||
async statOptions(list_option_stats_and_saves){
|
||||
return new Promise((resolve) => {
|
||||
if(list_option_stats_and_saves.length == 0){
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
for(let i =0;i<list_option_stats_and_saves.length;i++){
|
||||
let option_stats_and_saves = list_option_stats_and_saves[i];
|
||||
if (option_stats_and_saves.modification) {
|
||||
let buttons_options = [];
|
||||
for (let j = 0; j < option_stats_and_saves.stats.length; j++) {
|
||||
let prev_bonus = this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value");
|
||||
buttons_options.push({
|
||||
icon: 'fas fa-check',
|
||||
action: option_stats_and_saves.stats[j],
|
||||
label: option_stats_and_saves.stats[j],//.replace(/\.bonus/i,"").replace(/(.*)\.+/i,""),
|
||||
callback: () => {this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value", (parseInt(option_stats_and_saves.modification) + parseInt(prev_bonus)));
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
let d = new foundry.applications.api.DialogV2({
|
||||
window: {title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle")},
|
||||
classes: ["macro-popup-dialog"],
|
||||
content: `<div class="macro_desc"><h4>${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")} (${option_stats_and_saves.modification})</h4></div>`,
|
||||
buttons: buttons_options,
|
||||
default: "1",
|
||||
//render: html => console.log("Register interactivity in the rendered dialog"),
|
||||
//close: html => console.log("This always is logged no matter which option is chosen")
|
||||
});
|
||||
d.render({force: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the changed or dropped class into the generator, stats, skills and table configuration.
|
||||
* @param {uuid} classUuid
|
||||
@@ -473,35 +529,11 @@ export class DLActorGenerator extends FormApplication {
|
||||
* Stats
|
||||
*/
|
||||
//stats options
|
||||
let list_option_stats_and_saves = droppedObject.system.selected_adjustment.choose_stat;
|
||||
for(let i =0;i<list_option_stats_and_saves.length;i++){
|
||||
let option_stats_and_saves = list_option_stats_and_saves[i];
|
||||
if (option_stats_and_saves.modification) {
|
||||
let buttons_options = {};
|
||||
for (let j = 0; j < option_stats_and_saves.stats.length; j++) {
|
||||
let prev_bonus = this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value");
|
||||
buttons_options[j] = {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: option_stats_and_saves.stats[j],//.replace(/\.bonus/i,"").replace(/(.*)\.+/i,""),
|
||||
callback: () => this._element.find(`input[name="system.stats.${option_stats_and_saves.stats[j]}.bonus"]`).prop("value", (parseInt(option_stats_and_saves.modification) + parseInt(prev_bonus)))
|
||||
};
|
||||
}
|
||||
let d = new Dialog({
|
||||
title: game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupTitle"),
|
||||
content: `<p>${game.i18n.localize("Mosh.CharacterGenerator.StatOptionPopupText")} (${option_stats_and_saves.modification})</p>`,
|
||||
buttons: buttons_options,
|
||||
default: "1",
|
||||
//render: html => console.log("Register interactivity in the rendered dialog"),
|
||||
//close: html => console.log("This always is logged no matter which option is chosen")
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
}
|
||||
await this.statOptions(droppedObject.system.selected_adjustment.choose_stat)
|
||||
|
||||
/**
|
||||
* Skills
|
||||
* */
|
||||
|
||||
await this.applyClassSkills(this._element);
|
||||
|
||||
|
||||
@@ -510,7 +542,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
|
||||
async _onDrop(event) {
|
||||
await super._onDrop(event);
|
||||
const droppedUuid = TextEditor.getDragEventData(event);
|
||||
const droppedUuid = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||
if (droppedUuid.type != "Item") {
|
||||
return;
|
||||
}
|
||||
@@ -538,7 +570,7 @@ export class DLActorGenerator extends FormApplication {
|
||||
for (const [class_key, class_value] of class_options.entries()) {
|
||||
|
||||
html.find(`datalist[id="class_options"]`).append(
|
||||
`<option class="class_option" data-uuid="${class_value.uuid}" value="${class_value.name}">world.Item</option>`
|
||||
`<option class="class_option" data-uuid="${class_value.uuid}" value="${class_value.name}" label="${class_value.name} - world.Item">world.Item</option>`
|
||||
);
|
||||
}
|
||||
|
||||
@@ -547,8 +579,9 @@ export class DLActorGenerator extends FormApplication {
|
||||
for (const [compendium_key, compendium_value] of compendiums.entries()) {
|
||||
let classes = await compendium_value.getDocuments({ type: "class" });
|
||||
for (const [class_key, class_value] of classes.entries()) {
|
||||
let source = class_value.pack.replace(/\..*$/, "");
|
||||
html.find(`datalist[id="class_options"]`).append(
|
||||
`<option class="class_option" data-uuid="${class_value.uuid}" value="${class_value.name}">${class_value.pack}</option>`
|
||||
`<option class="class_option" data-uuid="${class_value.uuid}" value="${class_value.name}" label="${class_value.name} - ${source}"></option>`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -711,8 +744,15 @@ export class DLActorGenerator extends FormApplication {
|
||||
}
|
||||
if (formData["system.class.loadout.uuid"]) {
|
||||
let loadoutItems = formData["system.class.loadout.uuid"].split(",");
|
||||
let itemsToAdd = {};
|
||||
for (var i = 0; i < loadoutItems.length; i++) {
|
||||
await this.object.modifyItem(loadoutItems[i], 1);
|
||||
if(!itemsToAdd[loadoutItems[i]]){
|
||||
itemsToAdd[loadoutItems[i]] = 0;
|
||||
}
|
||||
itemsToAdd[loadoutItems[i]] += 1;
|
||||
}
|
||||
for (const [itemUuid, quantity] of Object.entries(itemsToAdd)) {
|
||||
await this.object.modifyItem(itemUuid, quantity);
|
||||
}
|
||||
}
|
||||
if (formData["system.class.patch.uuid"]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export class DLShipDeckplan extends ActorSheet {
|
||||
export class DLShipDeckplan extends foundry.appv1.sheets.ActorSheet {
|
||||
static get defaultOptions() {
|
||||
const options = super.defaultOptions;
|
||||
options.id = 'sheet-modifiers';
|
||||
@@ -57,6 +57,6 @@ export class DLShipDeckplan extends ActorSheet {
|
||||
this.object.update({
|
||||
formData
|
||||
});
|
||||
this.object.sheet.render(true);
|
||||
this.object.sheet.render({force: true});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { DLShipDeckplan } from "../windows/ship-deckplan.js";
|
||||
|
||||
|
||||
export class DLShipMacros extends BaseSheet {
|
||||
export class DLShipMacros extends foundry.applications.sheets.BaseSheet {
|
||||
static get defaultOptions() {
|
||||
const options = super.defaultOptions;
|
||||
options.id = 'sheet-modifiers';
|
||||
@@ -27,7 +27,7 @@ export class DLShipMacros extends BaseSheet {
|
||||
new DLShipDeckplan(this.object, {
|
||||
top: this.position.top + 40,
|
||||
left: this.position.left + (this.position.width - 400) / 2
|
||||
}).render(true);
|
||||
}).render({force: true});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,7 +59,7 @@ export class DLShipMegaDamage extends FormApplication {
|
||||
megadamageSettingsHTML += `<i class="far fa-circle megadamage-button rollable" data-key="${index}"></i>  `;
|
||||
}
|
||||
|
||||
megadamageSettingsHTML += `<b>${index} |</b> ${entry[1].text} <br/> <br/>`;
|
||||
megadamageSettingsHTML += `<b>${index} |</b> ${entry[1].description} <br/> <br/>`;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.107 5884 Delete type=3 #1
|
||||
2025/01/05-13:03:25.761 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.763 43f4 Level-0 table #5: 15355 bytes OK
|
||||
2025/01/05-13:03:25.766 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!items!1r6ruvSdxn2bHHIk' @ 72057594037927935 : 1 .. '!items!zbKI2RCl5h3vowoy' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.362 20a8 Delete type=3 #1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:16.947 9e0 Delete type=3 #1
|
||||
2025/01/05-13:03:25.746 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.749 43f4 Level-0 table #5: 24497 bytes OK
|
||||
2025/01/05-13:03:25.751 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!items!0ZAwhewvLBwX3opf' @ 72057594037927935 : 1 .. '!items!z0avrplKe6M0RcXk' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.045 2e0c Delete type=3 #1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:16.980 5f1c Delete type=3 #1
|
||||
2025/01/05-13:03:25.728 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.732 43f4 Level-0 table #5: 24089 bytes OK
|
||||
2025/01/05-13:03:25.734 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.751 43f4 Manual compaction at level-0 from '!items!1HNvL7XEUcMQbLps' @ 72057594037927935 : 1 .. '!items!zRzb3Laiuw4ac6p0' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.105 3368 Delete type=3 #1
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.136 9e0 Delete type=3 #1
|
||||
2025/01/05-13:03:25.772 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.775 43f4 Level-0 table #5: 24937 bytes OK
|
||||
2025/01/05-13:03:25.778 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!macros!2xRvRAixuocjCm40' @ 72057594037927935 : 1 .. '!macros!ilBclUmPwcd7aNQK' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.415 20a8 Delete type=3 #1
|
||||
|
||||
Binary file not shown.
+10
-10
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.011 5a8 Delete type=3 #1
|
||||
2025/01/05-13:03:25.735 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.737 43f4 Level-0 table #5: 33305 bytes OK
|
||||
2025/01/05-13:03:25.740 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!macros!2u4a5gEogtLd3XQz' @ 72057594037927935 : 1 .. '!macros!trU0DtBJvJCPddsQ' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.163 3018 Delete type=3 #1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.165 5a8 Delete type=3 #1
|
||||
2025/01/05-13:03:25.766 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.769 43f4 Level-0 table #5: 24964 bytes OK
|
||||
2025/01/05-13:03:25.772 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!macros!0Yw4QWSAeOuUzRqB' @ 72057594037927935 : 1 .. '!macros!z5V92LyXHjfMxnRQ' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.445 2e0c Delete type=3 #1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.040 5884 Delete type=3 #1
|
||||
2025/01/05-13:03:25.740 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.743 43f4 Level-0 table #5: 48976 bytes OK
|
||||
2025/01/05-13:03:25.746 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.752 43f4 Manual compaction at level-0 from '!macros!06NSvDYTtmkeUtLq' @ 72057594037927935 : 1 .. '!macros!zLRsweb35Lw0NMev' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.205 2e0c Delete type=3 #1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.196 5884 Delete type=3 #1
|
||||
2025/01/05-13:03:25.779 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.785 43f4 Level-0 table #5: 34959 bytes OK
|
||||
2025/01/05-13:03:25.788 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.797 43f4 Manual compaction at level-0 from '!tables!1vCm4ElRPotQXgNB' @ 72057594037927935 : 1 .. '!tables.results!kqKpQAXyLTEEyz6Z.xdwwswzfoPuVifvw' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.465 20a8 Delete type=3 #1
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,5 +1 @@
|
||||
2025/01/05-13:02:17.072 5f1c Delete type=3 #1
|
||||
2025/01/05-13:03:25.753 43f4 Level-0 table #5: started
|
||||
2025/01/05-13:03:25.758 43f4 Level-0 table #5: 80209 bytes OK
|
||||
2025/01/05-13:03:25.761 43f4 Delete type=0 #3
|
||||
2025/01/05-13:03:25.778 43f4 Manual compaction at level-0 from '!tables!31YibfjueXuZdNLb' @ 72057594037927935 : 1 .. '!tables.results!ypcoikqHLhnc9tNs.zJkYrssfrdWBSeRm' @ 0 : 0; will stop at (end)
|
||||
2025/08/28-23:53:35.252 2e0c Delete type=3 #1
|
||||
|
||||
Binary file not shown.
+6
-6
@@ -2,7 +2,7 @@
|
||||
"id": "mosh",
|
||||
"title": "MoSh - Unofficial Mothership",
|
||||
"description": "The unofficial Mothership system for FoundryVTT.",
|
||||
"version": "0.5.27",
|
||||
"version": "0.6.0",
|
||||
"esmodules": [
|
||||
"module/mosh.js"
|
||||
],
|
||||
@@ -150,8 +150,8 @@
|
||||
"primaryTokenAttribute": "health",
|
||||
"secondaryTokenAttribute": "other.stress",
|
||||
"url": "https://github.com/Futil/foundry-mothership",
|
||||
"manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/0.5.27/system.json",
|
||||
"download": "https://github.com/Futil/foundry-mothership/releases/download/0.5.27/foundry-mothership.zip",
|
||||
"manifest": "https://raw.githubusercontent.com/Futil/foundry-mothership/0.6.0/system.json",
|
||||
"download": "https://github.com/Futil/foundry-mothership/releases/download/0.6.0/foundry-mothership.zip",
|
||||
"license": "LICENSE.txt",
|
||||
"authors": [
|
||||
{
|
||||
@@ -164,8 +164,8 @@
|
||||
}
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": "11",
|
||||
"maximum": "12",
|
||||
"verified": "12"
|
||||
"minimum": "13",
|
||||
"maximum": "13",
|
||||
"verified": "13"
|
||||
}
|
||||
}
|
||||
+11
-4
@@ -19,6 +19,12 @@
|
||||
"max" : 2,
|
||||
"label" : "Wounds"
|
||||
},
|
||||
"netHP": {
|
||||
"value": 20,
|
||||
"min": 0,
|
||||
"max" : 20,
|
||||
"label" : "Net HP"
|
||||
},
|
||||
"bleeding": {
|
||||
"value": 0,
|
||||
"min": 0,
|
||||
@@ -36,9 +42,6 @@
|
||||
"current" : 0,
|
||||
"capacity" : 0
|
||||
},
|
||||
"settings" : {
|
||||
"useCalm" : false
|
||||
},
|
||||
"class": {
|
||||
"value": ""
|
||||
},
|
||||
@@ -155,6 +158,7 @@
|
||||
"base"
|
||||
],
|
||||
"biography": "",
|
||||
"notes": "",
|
||||
"description": "This is a description",
|
||||
"xp": {
|
||||
"value": 1,
|
||||
@@ -194,9 +198,12 @@
|
||||
"enabled" : false
|
||||
},
|
||||
"armor": {
|
||||
"value": 10,
|
||||
"value": 0,
|
||||
"mod": 0,
|
||||
"min": 0,
|
||||
"max": 99,
|
||||
"damageReduction": 0,
|
||||
"cover": "none",
|
||||
"label": "Armor",
|
||||
"rollLabel": "Armor Save",
|
||||
"enabled" : false
|
||||
|
||||
@@ -353,7 +353,6 @@
|
||||
<a class="tab-select" data-tab="items">{{ localize 'Mosh.Items' }}</a>
|
||||
<a class="tab-select" data-tab="description">{{ localize 'Mosh.Bio' }}</a>
|
||||
<a class="tab-select" data-tab="notes">{{ localize 'Mosh.Notes' }}</a>
|
||||
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
@@ -389,8 +388,8 @@
|
||||
<li class="item flexrow dropitem" data-item-id="{{armor._id}}" role="rowgroup">
|
||||
<div class="item-image" role="cell"><img src="{{armor.img}}" title="{{armor.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 2.55;" role="cell">{{armor.name}}</h4>
|
||||
<div class="skill-stat" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat" role="cell">{{armor.system.damageReduction}}</div>
|
||||
<div class="skill-stat armor-ap list-roll" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat armor-dr list-roll" role="cell">{{armor.system.damageReduction}}</div>
|
||||
<div class="skill-stat">{{armor.system.speed}}</div>
|
||||
{{#if armor.system.oxygenMax}}
|
||||
<div class="skill-stat armor-oxy list-roll" role="cell">{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}</div>
|
||||
@@ -424,7 +423,7 @@
|
||||
<li class="item flexrow dropitem" data-item-id="{{armor._id}}" role="rowgroup">
|
||||
<div class="item-image" role="cell"><img src="{{armor.img}}" title="{{armor.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 2.55;" role="cell">{{armor.name}}</h4>
|
||||
<div class="skill-stat" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat armor-ap list-roll" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat">{{armor.system.speed}}</div>
|
||||
{{#if armor.system.oxygenMax}}
|
||||
<div class="skill-stat armor-oxy list-roll" role="cell">{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}</div>
|
||||
@@ -599,7 +598,7 @@
|
||||
<div class="item-image"><img src="{{weapon.img}}" title="{{weapon.name}}" width="24" height="24" /></div>
|
||||
<div class="skill-name weapon-roll list-roll" style="flex-grow: 2.05;">{{weapon.name}}</div>
|
||||
{{#if weapon.system.antiArmor}}
|
||||
<div class="skill-stat dmg-roll list-roll">{{weapon.system.damage}} ({{ localize 'Mosh.AntyArmorAcronym' }})</div>
|
||||
<div class="skill-stat dmg-roll list-roll">{{weapon.system.damage}} ({{ localize 'Mosh.AntiArmorAcronym' }})</div>
|
||||
{{else}}
|
||||
<div class="skill-stat dmg-roll list-roll">{{weapon.system.damage}}</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
{{#if system.swarm.enabled}}
|
||||
<span class="ability-mod stat-roll rollable creaturestat" data-key="combat" data-roll="d100"
|
||||
data-label="Combat">{{ localize 'Mosh.Combat' }} {{ localize 'Mosh.SwarmWoundShort' }}</span>
|
||||
<input class="creaturestat noborder" style="width: 30px;" type="text" name="system.swarm.combat.value"
|
||||
value="{{system.swarm.combat.value}}" data-dtype="Number" />
|
||||
<input class="creaturestat noborder" style="width: 30px;" type="text" name="system.stats.combat.value"
|
||||
value="{{system.stats.combat.value}}" data-dtype="Number" />
|
||||
{{else}}
|
||||
<span class="ability-mod stat-roll rollable creaturestat" data-key="combat" data-roll="d100"
|
||||
data-label="Combat">{{ localize 'Mosh.Combat' }}</span>
|
||||
@@ -99,7 +99,7 @@
|
||||
</header>
|
||||
<div class="creature-description-grid">
|
||||
<div class="creaturedescription">
|
||||
<div class="grid">
|
||||
<div class="grid grid-3col">
|
||||
<!-- Health -->
|
||||
<div class="resource healthspread minmaxtopstat">
|
||||
<label for="system.health.value" class="resource-label minmaxtext">{{ localize 'Mosh.Health' }}</label>
|
||||
@@ -134,7 +134,35 @@
|
||||
<div class="healthmaxtext">{{ localize 'Mosh.Current' }}</div>
|
||||
<div class="healthmaxtext">{{ localize 'Mosh.Maximum' }}</div>
|
||||
</div>
|
||||
<!-- Armor -->
|
||||
<div class="resource healthspread minmaxtopstat">
|
||||
<label for="system.stats.armor.value" class="resource-label minmaxtext rollable armor-roll">{{ localize 'Mosh.Armor' }}</label>
|
||||
<div class="minmaxwrapper" style="width: 100%; background: black; border-radius: 0.3em;">
|
||||
<div class="maxhealth-input" style="display: flex;">
|
||||
<div class="whiteText" type="text" data-dtype="Number">{{system.stats.armor.mod}}</div>
|
||||
{{#if (compare 'str' system.stats.armor.cover '===' 'insignificant')}}
|
||||
<div class="highlightText" type="text" data-dtype="Number" style="font-size: 0.8rem;"> 5</div>
|
||||
{{/if}}
|
||||
{{#if (compare 'str' system.stats.armor.cover '===' 'light')}}
|
||||
<div class="highlightText" type="text" data-dtype="Number" style="font-size: 0.8rem;"> 10</div>
|
||||
{{/if}}
|
||||
{{#if (compare 'str' system.stats.armor.cover '===' 'heavy')}}
|
||||
<div class="highlightText" type="text" data-dtype="Number" style="font-size: 0.8rem;"> 20</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="slant" style="border-right: 2px solid #ffffff; transform: skewX(0deg);"></div>
|
||||
<div class="maxhealth-input" style="display: flex;">
|
||||
<div class="whiteText" type="text" data-dtype="Number">{{system.stats.armor.damageReduction}}</div>
|
||||
{{#if (compare 'str' system.stats.armor.cover '===' 'heavy')}}
|
||||
<div class="highlightText" type="text" data-dtype="Number" style="font-size: 0.8rem;"> 5</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="healthmaxtext">{{ localize 'Mosh.ArmorPoints' }}</div>
|
||||
<div class="healthmaxtext">{{ localize 'Mosh.DMGReduction' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<br></br>
|
||||
{{editor enriched.description target="system.description" button=true owner=owner editable=true}}
|
||||
</div>
|
||||
<div class="creature-abilities">
|
||||
@@ -159,8 +187,11 @@
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="mosh sheet-tabs tabs" data-group="primary">
|
||||
<a class="tab-select" data-tab="skills">{{ localize 'Mosh.Skills' }}</a>
|
||||
<a class="tab-select" data-tab="weapons">{{ localize 'Mosh.Weapons' }}</a>
|
||||
<a class="tab-select" data-tab="items">{{ localize 'Mosh.Items' }}</a>
|
||||
<a class="tab-select" data-tab="description">{{ localize 'Mosh.Bio' }}</a>
|
||||
<a class="tab-select" data-tab="notes">{{ localize 'Mosh.Notes' }}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
@@ -168,32 +199,248 @@
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="description">
|
||||
{{editor system.biography target="system.biography" button=true owner=owner editable=true}}
|
||||
{{editor enriched.biography target="system.biography" button=true editable=true}}
|
||||
</div>
|
||||
{{!-- Notes Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="notes">
|
||||
{{editor enriched.notes target="system.notes" button=true editable=true}}
|
||||
</div>
|
||||
{{!-- Owned Items Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
|
||||
{{#if system.settings.firstEdition}}
|
||||
<!-- ARMOR -->
|
||||
<ol class="items-list" role="table">
|
||||
<li class="item flexrow item-header" role="rowgroup">
|
||||
<div class="item-image" role="cell"></div>
|
||||
<div class="skill-stat" style="flex-grow: 2.5;" role="cell">{{ localize 'Mosh.ArmorName' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.AP' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.DR' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Speed' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Oxygen' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Equipped' }}</div>
|
||||
<div class="item-controls" role="cell">
|
||||
<a class="item-control item-create" title="{{ localize 'Mosh.CreateArmor' }}" data-type="armor"><i class="fas fa-plus"></i> {{ localize 'Mosh.Add' }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each armors as |armor id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{armor._id}}" role="rowgroup">
|
||||
<div class="item-image" role="cell"><img src="{{armor.img}}" title="{{armor.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 2.55;" role="cell">{{armor.name}}</h4>
|
||||
<div class="skill-stat armor-ap list-roll" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat armor-dr list-roll" role="cell">{{armor.system.damageReduction}}</div>
|
||||
<div class="skill-stat">{{armor.system.speed}}</div>
|
||||
{{#if armor.system.oxygenMax}}
|
||||
<div class="skill-stat armor-oxy list-roll" role="cell">{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}</div>
|
||||
{{else}}
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.NA' }}</div>
|
||||
{{/if}}
|
||||
<div class="skill-stat item-equip" role="cell"><input type="checkbox" name="armor.system.equipped" data-dtype="Boolean"
|
||||
{{checked armor.system.equipped}} /></div>
|
||||
<div class="item-controls" role="cell">
|
||||
<a class="item-control item-edit" title="{{ localize 'Mosh.EditArmor' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteArmor' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{else}}
|
||||
<!-- ARMOR -->
|
||||
<ol class="items-list" role="table">
|
||||
<li class="item flexrow item-header" role="rowgroup">
|
||||
<div class="item-image" role="cell"></div>
|
||||
<div class="skill-stat" style="flex-grow: 2.5;" role="cell">{{ localize 'Mosh.ArmorName' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.SaveBonus' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Speed' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Oxygen' }}</div>
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.Equipped' }}</div>
|
||||
<div class="item-controls" role="cell">
|
||||
<a class="item-control item-create" title="{{ localize 'Mosh.CreateArmor' }}" data-type="armor"><i class="fas fa-plus"></i> {{ localize 'Mosh.Add' }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each armors as |armor id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{armor._id}}" role="rowgroup">
|
||||
<div class="item-image" role="cell"><img src="{{armor.img}}" title="{{armor.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 2.55;" role="cell">{{armor.name}}</h4>
|
||||
<div class="skill-stat armor-ap list-roll" role="cell">{{armor.system.armorPoints}}</div>
|
||||
<div class="skill-stat">{{armor.system.speed}}</div>
|
||||
{{#if armor.system.oxygenMax}}
|
||||
<div class="skill-stat armor-oxy list-roll" role="cell">{{armor.system.oxygenCurrent}}/{{armor.system.oxygenMax}}</div>
|
||||
{{else}}
|
||||
<div class="skill-stat" role="cell">{{ localize 'Mosh.NA' }}</div>
|
||||
{{/if}}
|
||||
<div class="skill-stat item-equip" role="cell"><input type="checkbox" name="armor.system.equipped" data-dtype="Boolean"
|
||||
{{checked armor.system.equipped}} /></div>
|
||||
<div class="item-controls" role="cell">
|
||||
<a class="item-control item-edit" title="{{ localize 'Mosh.EditArmor' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteArmor' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/if}}
|
||||
|
||||
<!-- ITEMS -->
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="skill-stat" style="flex-grow: 1.5;">{{ localize 'Mosh.ItemName' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Quantity' }}</div>
|
||||
{{#if system.settings.hideWeight}}
|
||||
{{else}}
|
||||
<div class="skill-stat">{{ localize 'Mosh.Weight' }}</div>
|
||||
{{/if}}
|
||||
<div class="skill-stat">{{ localize 'Mosh.Value' }}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="{{ localize 'Mosh.CreateItem' }}" data-type="item"><i class="fas fa-plus"></i> Add</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#if system.settings.hideWeight}}
|
||||
{{#each gear as |item id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{item._id}}">
|
||||
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 1.5;">{{item.name}}</h4>
|
||||
<div class="skill-stat list-roll item-quantity">{{item.system.quantity}}</div>
|
||||
<div class="skill-stat">{{item.system.cost}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="{{ localize 'Mosh.EditItem' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteItem'}}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{#each gear as |item id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{item._id}}">
|
||||
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24" /></div>
|
||||
<h4 class="skill-name list-roll description-roll" style="flex-grow: 1.54;">{{item.name}}</h4>
|
||||
<div class="skill-stat list-roll item-quantity">{{item.system.quantity}}</div>
|
||||
<div class="skill-stat">{{item.system.weight}}</div>
|
||||
<div class="skill-stat">{{item.system.cost}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="{{ localize 'Mosh.EditItem' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteItem' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</ol>
|
||||
{{#unless system.settings.hideWeight}}
|
||||
<div class="item flex-group-left item-header">
|
||||
<div class="skill-stat" style="flex-grow: 1.5;">{{ localize 'Mosh.CarryingCapacity' }}: {{system.weight.capacity}}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.CurrentWeight' }}: {{system.weight.current}}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
</div>
|
||||
{{!-- Owned Skills Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="skills">
|
||||
<!-- SKILLS -->
|
||||
<ol class="items-list" style="margin-bottom : 10px;">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.SkillName' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.SkillRank' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.SkillBonus' }}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control skill-create" title="{{ localize 'Mosh.CreateSkill' }}" data-type="skill"><i class="fas fa-plus"></i> {{ localize 'Mosh.Add' }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each skills as |skill id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{skill._id}}">
|
||||
<div class="item-image"><img src="{{skill.img}}" title="{{skill.name}}" width="24" height="24"/></div>
|
||||
<div class="skill-name skill-roll list-roll">{{skill.name}}</div>
|
||||
<div class="skill-stat">{{skill.system.rank}}</div>
|
||||
<div class="skill-stat">{{skill.system.bonus}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control skill-edit" title="{{ localize 'Mosh.EditSkill' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteSkill' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{#if system.settings.firstEdition}}
|
||||
|
||||
<!-- XP -->
|
||||
<div class ="skill_training_frame" style="margin-bottom : 10px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 90px auto 283px ;">
|
||||
<div class="skill-stat" style="position: relative; top: 6px;"><strong>{{ localize 'Mosh.SkillTraining' }}</strong></div>
|
||||
<textarea name="system.xp.selectedSkill" rows="2" class="textarea-input-grey" type="text" data-target="system.xp.selectedSkill" placeholder="" style="height: 30px; margin: 0; position: relative; top: 50%; -ms-transform: translateY(-50%); transform: translateY(-50%); background: white; color: black;">{{system.xp.selectedSkill}}</textarea>
|
||||
<div class="char-pip-button list-roll flex" style="position: relative; top: -7px;" data-key="xp" data-label="XP" data-max="16" data-min="0">{{{system.xp.html}}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
<div class="seperatorLine"></div>
|
||||
|
||||
|
||||
|
||||
<!-- Conditions -->
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Condition' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Severity' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Treatment' }}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="{{ localize 'Mosh.CreateCondition' }}" data-type="condition"><i class="fas fa-plus"></i> {{ localize 'Mosh.Add' }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each conditions as |condition id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{condition._id}}">
|
||||
<div class="item-image"><img src="{{condition.img}}" title="{{condition.name}}" width="24" height="24"/></div>
|
||||
<div class="skill-name description-roll list-roll">{{condition.name}}</div>
|
||||
<div class="skill-stat list-roll severity">{{condition.system.severity}}</div>
|
||||
<div class="skill-stat">
|
||||
{{#if condition.system.treatment.html}}
|
||||
<div class="treatment-button list-roll flex" style="margin: 0; position: relative; top: 50%; -ms-transform: translateY(-50%); transform: translateY(-50%);" data-key="condition" data-label="condition" data-max="3" data-min="0">
|
||||
{{{condition.system.treatment.html}}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="treatment-button list-roll flex" style="margin: 0; position: relative; top: 50%; -ms-transform: translateY(-50%); transform: translateY(-50%);" data-key="condition" data-label="condition" data-max="3" data-min="0">
|
||||
{{condition.name}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control skill-edit" title="{{ localize 'Mosh.EditCondition' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteCondition' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{{!-- Owned Weapons Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="weapons">
|
||||
<!-- WEAPONS -->
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
|
||||
<div class="skill-stat" style="flex-grow: 2;">{{ localize 'Mosh.Name' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Damage' }}{{#if system.swarm.enabled}} {{ localize 'Mosh.SwarmWoundShort' }}{{/if}}</div>
|
||||
<div class="skill-stat" style="flex-grow: 2;">{{ localize 'Mosh.WeaponName' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Damage' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Ammo' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Shots' }}</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.Range' }}</div>
|
||||
|
||||
<div class="item-controls">
|
||||
<a class="item-control weapon-create" title="{{ localize 'Mosh.CreateWeapon' }}" data-type="weapon"><i class="fas fa-plus"></i>
|
||||
{{ localize 'Mosh.Add' }}</a>
|
||||
<a class="item-control weapon-create" title="{{ localize 'Mosh.CreateWeapon' }}" data-type="weapon"><i class="fas fa-plus"></i> {{ localize 'Mosh.Add' }}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{#each weapons as |weapon id|}}
|
||||
<li class="item flexrow dropitem" data-item-id="{{weapon._id}}">
|
||||
<li class="item flexrow dropitem" data-item-id="{{weapon._id}}">
|
||||
<!-- <div class="item-image"><img src="{{skill.img}}" title="{{skill.name}}" width="24" height="24"/></div> -->
|
||||
<div class="item-image"><img src="{{weapon.img}}" title="{{weapon.name}}" width="24" height="24" /></div>
|
||||
<div class="skill-name weapon-roll list-roll" style="flex-grow: 2;">{{weapon.name}}</div>
|
||||
<div class="skill-name weapon-roll list-roll" style="flex-grow: 2.05;">{{weapon.name}}</div>
|
||||
{{#if weapon.system.antiArmor}}
|
||||
<div class="skill-stat dmg-roll list-roll">{{weapon.system.damage}} ({{ localize 'Mosh.AntiArmorAcronym' }})</div>
|
||||
{{else}}
|
||||
<div class="skill-stat dmg-roll list-roll">{{weapon.system.damage}}</div>
|
||||
{{/if}}
|
||||
{{#if weapon.system.useAmmo}}
|
||||
<div class="skill-stat weapon-ammo list-roll">{{weapon.system.ammo}}</div>
|
||||
{{else}}
|
||||
@@ -214,20 +461,16 @@
|
||||
<div class="skill-stat">{{ localize 'Mosh.NA' }}</div>
|
||||
{{/if}}
|
||||
{{#if weapon.system.ranges.value}}
|
||||
<!-- <div class="skill-stat">{{weapon.system.ranges.short}}/{{weapon.system.ranges.medium}}/{{weapon.system.ranges.long}} -->
|
||||
<!-- </div> -->
|
||||
<div class="skill-stat">{{weapon.system.ranges.value}}</div>
|
||||
{{else}}
|
||||
<div class="skill-stat">{{ localize 'Mosh.NA' }}</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="item-controls">
|
||||
<a class="item-control weapon-edit" title="{{ localize 'Mosh.EditWeapon' }}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{ localize 'Mosh.DeleteWeapon' }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
<div class="header" style="grid-template-columns: 0.15fr 1fr;">
|
||||
<div class="header grid" style="grid-template-columns: 75px auto; width:100%;">
|
||||
|
||||
<img class="sbt-profile" src="{{img}}" data-edit="img" title="{{name}}" height="150" width="150" />
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<!-- CLASS -->
|
||||
<div class="">
|
||||
<div class="headerinputtext">{{ localize 'Mosh.Cass' }}</div>
|
||||
<div class="headerinputtext">{{ localize 'Mosh.Class' }}</div>
|
||||
<div class="headerinputfield charname"><input name="system.class" class="noborder" type="text"
|
||||
value="{{system.class}}" placeholder="" /></div>
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@
|
||||
<div class="skill-stat">{{weapon.system.curShots}}/{{weapon.system.shots}} <i
|
||||
class="fas fa-sync weapon-reload list-roll"></i></div>
|
||||
{{else}}
|
||||
<div class="skill-stat">{{ localize 'Mosh.NA' }</div>
|
||||
<div class="skill-stat">{{ localize 'Mosh.NA' }}</div>
|
||||
{{/if}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control weapon-edit" title="{{ localize 'Mosh.EditWeapon' }}"><i class="fas fa-edit"></i></a>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{{/if}}
|
||||
{{#if item.system.damageReduction}}
|
||||
<div class="description">
|
||||
<div class="body"><strong>{{ localize 'Mosh.DamageReduction' }}: </strong>{{item.system.damageReduction}}</div>
|
||||
<div class="body"><strong>{{ localize 'Mosh.DMGReduction' }}: </strong>{{item.system.damageReduction}}</div>
|
||||
</div>
|
||||
<div style="margin-bottom : 5px;"></div>
|
||||
<div style="border-bottom: 1px solid #999; height: 0; width: 100%;"></div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{{#each tableResult}}
|
||||
<li class="table-result flexrow" data-result-id="{{{this._id}}}">
|
||||
<img class="result-image" src="{{{this.img}}}">
|
||||
<div class="result-text"><a class="content-link broken" draggable="true" data-type="Item" data-uuid="undefined"><i class="fas fa-unlink"></i>{{{this.text}}}</a></div>
|
||||
<div class="result-text"><a class="content-link broken" draggable="true" data-type="Item" data-uuid="undefined"><i class="fas fa-unlink"></i>{{{this.description}}}</a></div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
@@ -41,7 +41,7 @@
|
||||
{{#if tableResultEdited}}
|
||||
<div class="description" style="margin-bottom : 20px;">{{{tableResultEdited}}}{{{tableResultFooter}}}</div>
|
||||
{{else}}
|
||||
<div class="description" style="margin-bottom : 20px;">{{{tableResult.[0].text}}}{{{tableResultFooter}}}</div>
|
||||
<div class="description" style="margin-bottom : 20px;">{{{tableResult.[0].description}}}{{{tableResultFooter}}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (compare 'str' specialRoll '===' 'maintenanceCheck')}}
|
||||
|
||||
+2
-27
@@ -28,7 +28,7 @@
|
||||
</option>
|
||||
|
||||
{{#each skills.trained as |skill id|}}
|
||||
<option hidden value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
<option value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
data-prerequisite_ids='[{{#each skill.system.prerequisite_ids as |id|}}"{{id}}"{{#unless @last}},{{/unless}}{{/each}}]'>
|
||||
{{skill.name}}</option>
|
||||
{{/each}}
|
||||
@@ -37,29 +37,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function updateDropdownExpert() {
|
||||
// Logic to update dropdownTrained based on the selection of dropdownExpert
|
||||
|
||||
let dropdownExpert = document.getElementById('dropdownExpert');
|
||||
let dropdownTrained = document.getElementById('dropdownTrained');
|
||||
let selectedValue = dropdownExpert.options[dropdownExpert.selectedIndex].getAttribute('data-uuid');
|
||||
|
||||
let prerequisiteIds = JSON.parse(dropdownExpert.options[dropdownExpert.selectedIndex].getAttribute('data-prerequisite_ids'));
|
||||
|
||||
for (let i = 0; i < dropdownTrained.options.length; i++) {
|
||||
let option = dropdownTrained.options[i];
|
||||
let optionUuid = option.getAttribute('data-uuid');
|
||||
if (prerequisiteIds.includes(optionUuid)) {
|
||||
option.hidden = false;
|
||||
} else {
|
||||
option.hidden = true;
|
||||
if (dropdownTrained.options[dropdownTrained.selectedIndex].getAttribute('data-uuid') == optionUuid) {
|
||||
dropdownTrained.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
+5
-53
@@ -1,3 +1,5 @@
|
||||
<script type="text/javascript" src="relative/path/to/your/javascript.js"></script>
|
||||
|
||||
<div class="mosh">
|
||||
|
||||
<form id="skillForm" class="{{cssClass}} characterGeneratorSkillPopup">
|
||||
@@ -27,7 +29,7 @@
|
||||
</option>
|
||||
|
||||
{{#each skills.expert as |skill id|}}
|
||||
<option hidden value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
<option value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
data-prerequisite_ids='[{{#each skill.system.prerequisite_ids as |id|}}"{{id}}"{{#unless @last}},{{/unless}}{{/each}}]'>
|
||||
{{skill.name}}</option>
|
||||
{{/each}}
|
||||
@@ -41,7 +43,7 @@
|
||||
</option>
|
||||
|
||||
{{#each skills.trained as |skill id|}}
|
||||
<option hidden value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
<option value="{{skill.uuid}}" data-uuid="{{skill.uuid}}" {{skill.disabled}}
|
||||
data-prerequisite_ids='[{{#each skill.system.prerequisite_ids as |id|}}"{{id}}"{{#unless @last}},{{/unless}}{{/each}}]'>
|
||||
{{skill.name}}</option>
|
||||
{{/each}}
|
||||
@@ -50,54 +52,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function updateDropdownMaster() {
|
||||
// Logic to update dropdownExpert based on the selection of dropdownMaster
|
||||
|
||||
let dropdownMaster = document.getElementById('dropdownMaster');
|
||||
let dropdownExpert = document.getElementById('dropdownExpert');
|
||||
let selectedValue = dropdownMaster.options[dropdownMaster.selectedIndex].getAttribute('data-uuid');
|
||||
|
||||
let prerequisiteIds = JSON.parse(dropdownMaster.options[dropdownMaster.selectedIndex].getAttribute('data-prerequisite_ids'));
|
||||
|
||||
for (let i = 0; i < dropdownExpert.options.length; i++) {
|
||||
let option = dropdownExpert.options[i];
|
||||
let optionUuid = option.getAttribute('data-uuid');
|
||||
if (prerequisiteIds.includes(optionUuid)) {
|
||||
option.hidden = false;
|
||||
} else {
|
||||
option.hidden = true;
|
||||
if (dropdownExpert.options[dropdownExpert.selectedIndex].getAttribute('data-uuid') == optionUuid) {
|
||||
dropdownExpert.selectedIndex = 0;
|
||||
let dropdownTrained = document.getElementById('dropdownTrained');
|
||||
dropdownTrained.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function updateDropdownExpert() {
|
||||
// Logic to update dropdownTrained based on the selection of dropdownExpert
|
||||
|
||||
let dropdownExpert = document.getElementById('dropdownExpert');
|
||||
let dropdownTrained = document.getElementById('dropdownTrained');
|
||||
let selectedValue = dropdownExpert.options[dropdownExpert.selectedIndex].getAttribute('data-uuid');
|
||||
|
||||
let prerequisiteIds = JSON.parse(dropdownExpert.options[dropdownExpert.selectedIndex].getAttribute('data-prerequisite_ids'));
|
||||
|
||||
for (let i = 0; i < dropdownTrained.options.length; i++) {
|
||||
let option = dropdownTrained.options[i];
|
||||
let optionUuid = option.getAttribute('data-uuid');
|
||||
if (prerequisiteIds.includes(optionUuid)) {
|
||||
option.hidden = false;
|
||||
} else {
|
||||
option.hidden = true;
|
||||
if (dropdownTrained.options[dropdownTrained.selectedIndex].getAttribute('data-uuid') == optionUuid) {
|
||||
dropdownTrained.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
@@ -1,43 +1,19 @@
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<!-- HEADER -->
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/attributes/armor.png" style="border:none"/></div>
|
||||
<div class="macro_desc"><h3>{{ localize 'Mosh.Cover' }}</h3>
|
||||
{{ localize 'Mosh.TheEnvironmentCanProvideProtectionCalled'}} <strong>{{ localize 'Mosh.Cover'}}</strong>.
|
||||
{{ localize 'Mosh.ItCanBeDestroyedLikeArmor' }}
|
||||
<strong>{{ localize 'Mosh.IfYouShotWhileInCover'}}.</strong> {{ localize 'Mosh.YourCoverValuesAreDisplayedIn'}} <strong><span style="color: orangered">{{ localize 'Mosh.Orange' }}</span></strong>.</div>
|
||||
<div class ="macro_window">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 150px auto">
|
||||
<div class="macro_img"><img src="systems/mosh/images/icons/ui/attributes/armor.png"/></div>
|
||||
<div class="macro_desc"><h4>{{ localize 'Mosh.Cover' }}</h4>
|
||||
{{ localize 'Mosh.TheEnvironmentCanProvideProtectionCalled'}} <strong>{{ localize 'Mosh.Cover'}}</strong>.
|
||||
{{ localize 'Mosh.ItCanBeDestroyedLikeArmor' }}
|
||||
<strong>{{ localize 'Mosh.IfYouShotWhileInCover'}}.</strong> {{ localize 'Mosh.YourCoverValuesAreDisplayedIn'}} <strong><span style="color: orangered">{{ localize 'Mosh.Orange' }}</span></strong>.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="macro_prompt">
|
||||
{{ localize 'Mosh.SelectYourCurrentCoverSituation'}}:
|
||||
</div>
|
||||
<h4>{{ localize 'Mosh.SelectYourCurrentCoverSituation'}}:</h4>
|
||||
<!-- NO COVER -->
|
||||
<label for="none">
|
||||
<div class ="macro_window" style="margin-top: 7px; margin-bottom: 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px auto 250px">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px auto 250px">
|
||||
<input type="radio" id="none" name="cover" value="none" {{none_checked}}>
|
||||
<div class="macro_desc" style="display: table; padding-left: 5px;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
@@ -60,8 +36,8 @@
|
||||
</label>
|
||||
<!-- INSIGNIFICANT COVER -->
|
||||
<label for="insignificant">
|
||||
<div class ="macro_window" style="margin-top: 7px; margin-bottom: 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px auto 250px">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px auto 250px">
|
||||
<input type="radio" id="insignificant" name="cover" value="insignificant" {{insignificant_checked}}>
|
||||
<div class="macro_desc" style="display: table; padding-left: 5px;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
@@ -87,8 +63,8 @@
|
||||
</label>
|
||||
<!-- LIGHT COVER -->
|
||||
<label for="light">
|
||||
<div class ="macro_window" style="margin-top: 7px; margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px auto 250px">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px auto 250px">
|
||||
<input type="radio" id="light" name="cover" value="light" {{light_checked}}>
|
||||
<div class="macro_desc" style="display: table; padding-left: 5px;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
@@ -114,8 +90,8 @@
|
||||
</label>
|
||||
<!-- HEAVY COVER -->
|
||||
<label for="heavy">
|
||||
<div class ="macro_window" style="margin-top: 7px; margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px auto 250px">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px auto 250px">
|
||||
<input type="radio" id="heavy" name="cover" value="heavy" {{heavy_checked}}>
|
||||
<div class="macro_desc" style="display: table; padding-left: 5px;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
|
||||
@@ -1,39 +1,16 @@
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-left: 8px;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px;">
|
||||
<div class="macro_desc"><h3>{{ localize 'Mosh.AddASkill'}}</h3>{{ localize 'Mosh.IfYouHaveARelevantSkill'}} <em>{{ localize 'Mosh.GivingYouAHigherNumber' }}</em>.</div>
|
||||
<div class ="macro_window">
|
||||
<div class="macro_desc" style="padding-left: 8px;">
|
||||
<h4>{{ localize 'Mosh.AddASkill'}}</h4>
|
||||
{{ localize 'Mosh.IfYouHaveARelevantSkill'}} <em>{{ localize 'Mosh.GivingYouAHigherNumber' }}</em>
|
||||
</div>
|
||||
</div>
|
||||
<label for="">
|
||||
<dMosh.Normaliv class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-2col" style="grid-template-columns: 20px auto">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 8px; padding-left: 3px;">
|
||||
<div class="grid grid-2col" style="align-items: center; grid-template-columns: 20px auto">
|
||||
<input type="radio" id="" name="skill" value=0 checked >
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<p>{{ localize 'Mosh.DoNotAddASkillToThisRoll' }}<p>
|
||||
<p> {{ localize 'Mosh.DoNotAddASkillToThisRoll' }}<p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,83 +1,58 @@
|
||||
<style>
|
||||
.macro_window{
|
||||
background: rgb(230,230,230);
|
||||
border-radius: 9px;
|
||||
}
|
||||
.macro_img{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.macro_desc{
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-size: 10.5pt;
|
||||
font-weight: 400;
|
||||
padding-top: 8px;
|
||||
padding-right: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.grid-2col {
|
||||
display: grid;
|
||||
grid-column: span 2 / span 2;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div class ="macro_window" style="margin-bottom : 7px; padding-left: 8px;">
|
||||
<div class="macro_desc"><h3>{{ localize "Mosh.SelectAStat" }}</h3>
|
||||
{{ localize "Mosh.ChooseTheStatForSkillCheck" }}<em>{{ localize "Mosh.GivingYouAHigherNumber"}}.</em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label for="str">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="str" name="stat" value="strength" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/strength.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Strength" }}:</strong> {{ localize "Mosh.StrengthSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="spd">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="spd" name="stat" value="speed">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/speed.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Speed"}}:</strong> {{ localize "Mosh.SpeedSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="int">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="int" name="stat" value="intellect">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/intellect.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Intellect"}}:</strong> {{ localize "Mosh.IntellectSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="com">
|
||||
<div class ="macro_window" style="margin-bottom : 7px; vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="com" name="stat" value="combat">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/combat.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Combat"}}:</strong> {{ localize "Mosh.CombatSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<div class ="macro_window" style="padding-left: 8px;">
|
||||
<div class="macro_desc"><h4>{{ localize "Mosh.SelectAStat" }}</h4>
|
||||
{{ localize "Mosh.ChooseTheStatForSkillCheck" }}<em>{{ localize "Mosh.GivingYouAHigherNumber"}}</em>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label for="str">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="str" name="stat" value="strength" checked="checked">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/strength.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Strength" }}:</strong> {{ localize "Mosh.StrengthSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="spd">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="spd" name="stat" value="speed">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/speed.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Speed"}}:</strong> {{ localize "Mosh.SpeedSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="int">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="int" name="stat" value="intellect">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/intellect.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Intellect"}}:</strong> {{ localize "Mosh.IntellectSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label for="com">
|
||||
<div class ="macro_window" style="vertical-align: middle; padding-left: 3px;">
|
||||
<div class="grid grid-3col" style="align-items: center; grid-template-columns: 20px 60px auto">
|
||||
<input type="radio" id="com" name="stat" value="combat">
|
||||
<div class="macro_img" style="padding-top: 5px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"><img src="systems/mosh/images/icons/ui/attributes/combat.png" style="border:none"/></div>
|
||||
<div class="macro_desc" style="display: table;">
|
||||
<span style="display: table-cell; vertical-align: middle;">
|
||||
<strong>{{ localize "Mosh.Combat"}}:</strong> {{ localize "Mosh.CombatSkillExample"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user