Fix #112 shield/armors for arc
This commit is contained in:
parent
571d015c28
commit
329b7839da
@ -2531,8 +2531,13 @@ export class PegasusActor extends Actor {
|
|||||||
for (let loc of __LocationsArmour) {
|
for (let loc of __LocationsArmour) {
|
||||||
let arcKey = loc + "arc"
|
let arcKey = loc + "arc"
|
||||||
let arc = duplicate(this.system.arcs[arcKey])
|
let arc = duplicate(this.system.arcs[arcKey])
|
||||||
if (level != Number(arc.shieldlevel)) {
|
if (level != Number(arc.maxshieldlevel)) {
|
||||||
arc.shieldlevel = level
|
let lvChanged = level - arc.maxshieldlevel
|
||||||
|
arc.maxshieldlevel = level
|
||||||
|
arc.shieldlevel += lvChanged
|
||||||
|
if ( arc.shieldlevel <= 0 || arc.shieldlevel > level) {
|
||||||
|
arc.shieldlevel = level
|
||||||
|
}
|
||||||
setTimeout(shift, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
setTimeout(shift, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
||||||
shift += 200
|
shift += 200
|
||||||
}
|
}
|
||||||
@ -2549,8 +2554,13 @@ export class PegasusActor extends Actor {
|
|||||||
level += Number(armour.system.armourdicevalue)
|
level += Number(armour.system.armourdicevalue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (level != Number(arc.armourlevel)) {
|
if (level != Number(arc.maxarmourlevel)) {
|
||||||
arc.armourlevel = level
|
let lvChanged = level - arc.maxarmourlevel
|
||||||
|
arc.maxarmourlevel = level
|
||||||
|
arc.armourlevel += lvChanged
|
||||||
|
if ( arc.armourlevel <= 0 || arc.armourlevel > arc.maxarmourlevel) {
|
||||||
|
arc.armourlevel = level
|
||||||
|
}
|
||||||
setTimeout(500, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
setTimeout(500, this.update({ [`system.arcs.${arcKey}`]: arc }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "10.1.3",
|
"version": "10.1.4",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.3.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.4.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -310,6 +310,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": false
|
"is3D": false
|
||||||
},
|
},
|
||||||
"reararc": {
|
"reararc": {
|
||||||
@ -317,6 +319,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": false
|
"is3D": false
|
||||||
},
|
},
|
||||||
"rightarc": {
|
"rightarc": {
|
||||||
@ -324,6 +328,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": false
|
"is3D": false
|
||||||
},
|
},
|
||||||
"leftarc": {
|
"leftarc": {
|
||||||
@ -331,6 +337,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": false
|
"is3D": false
|
||||||
},
|
},
|
||||||
"toparc": {
|
"toparc": {
|
||||||
@ -338,6 +346,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": true
|
"is3D": true
|
||||||
},
|
},
|
||||||
"bottomarc": {
|
"bottomarc": {
|
||||||
@ -345,6 +355,8 @@
|
|||||||
"topspeed": "",
|
"topspeed": "",
|
||||||
"shieldlevel": 0,
|
"shieldlevel": 0,
|
||||||
"armourlevel": 0,
|
"armourlevel": 0,
|
||||||
|
"maxshieldlevel": 0,
|
||||||
|
"maxarmourlevel": 0,
|
||||||
"is3D": true
|
"is3D": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,15 @@
|
|||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Shield</label>
|
<label class="short-label">Shield</label>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="item-field-label-short">
|
||||||
|
<label class="short-label">Max</label>
|
||||||
|
</span>
|
||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<label class="short-label">Armour</label>
|
<label class="short-label">Armour</label>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="item-field-label-short">
|
||||||
|
<label class="short-label">Max</label>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item list-item-shadow" data-arc-name="{{idx}}">
|
<li class="item flexrow list-item list-item-shadow" data-arc-name="{{idx}}">
|
||||||
|
|
||||||
@ -31,16 +37,18 @@
|
|||||||
{{#select arc.shieldlevel}}
|
{{#select arc.shieldlevel}}
|
||||||
{{{@root.optionsDiceList}}}
|
{{{@root.optionsDiceList}}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="item-field-label-short"><label class="short-label">{{getDice arc.maxshieldlevel}}</label></span>
|
||||||
|
|
||||||
<span class="item-field-label-long">
|
<span class="item-field-label-long">
|
||||||
<select type="text" name="system.arcs.{{idx}}.armourlevel" value="{{arc.armourlevel}}" data-dtype="Number">
|
<select type="text" name="system.arcs.{{idx}}.armourlevel" value="{{arc.armourlevel}}" data-dtype="Number">
|
||||||
{{#select arc.armourlevel}}
|
{{#select arc.armourlevel}}
|
||||||
{{{@root.optionsDiceList}}}
|
{{{@root.optionsDiceList}}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="item-field-label-short"><label class="short-label">{{getDice arc.maxarmourlevel}}</label></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user