diff --git a/d20age/d20age.css b/d20age/d20age.css index fcce9b65f21e..0beaa895479b 100644 --- a/d20age/d20age.css +++ b/d20age/d20age.css @@ -146,7 +146,7 @@ fieldset { flex-direction: column; } span { - background-image: url("https://raw.githubusercontent.com/machado-cesar/roll20-character-sheets/feature_d20age/d20age/images/pencil-scribble-banner-3.png"); + background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/d20age/images/pencil-scribble-banner-3.png"); background-size: auto 38px; background-position: center; color: white; @@ -330,15 +330,30 @@ input[type="checkbox"] { width: 231px !important; padding: 15px; border-radius: 4px; - background: linear-gradient( - 145deg, - #fff, - #eee - ); + background-color: #fff; box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3), 1px 1px 2px rgba(255, 255, 255, 0.5) inset; transform: rotate(-0.5deg); } + +.art-container::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient( + 135deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0.04) 60%, + rgba(0, 0, 0, 0.08) 100% + ); + pointer-events: none; + z-index: 1; + border-radius: 4px; +} + .tape { width: 198px !important; height: 30px; @@ -377,7 +392,7 @@ input[type="checkbox"] { .art { border-radius: 8px; background-image: url(@{character_name|avatar}); - background-position: center; + background-position: flex-start; background-size: cover; background-repeat: no-repeat; } @@ -776,7 +791,7 @@ input[type="checkbox"] { } .retainers-header input, .retainers-header select { - background-image: url("https://raw.githubusercontent.com/machado-cesar/roll20-character-sheets/feature_d20age/d20age/images/pencil-scribble-banner-3.png"); + background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/d20age/images/pencil-scribble-banner-3.png"); background-size: auto 38px; background-position: center; color: white !important; @@ -813,7 +828,7 @@ input[type="checkbox"] { } .retainers-hd-moral-and-thac0 button { background-color: unset !important; - background-image: url("https://raw.githubusercontent.com/machado-cesar/roll20-character-sheets/feature_d20age/d20age/images/pencil-scribble-banner-3.png") !important; + background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/d20age/images/pencil-scribble-banner-3.png") !important; background-size: auto 38px; background-position: center; color: white !important; diff --git a/d20age/d20age.html b/d20age/d20age.html index c791e5d5d4aa..2bafd0cfb6ea 100644 --- a/d20age/d20age.html +++ b/d20age/d20age.html @@ -2,7 +2,6 @@ - @@ -18,7 +17,7 @@
logo d20age @@ -418,11 +417,12 @@

Armas

. +
@@ -1224,7 +1224,6 @@

Itens Guardados

[] ); getAttrs(attrArray, (v) => { - console.log("===== values of v: " + JSON.stringify(v) + " ====="); // getValue: if not a number, returns 1 if it is 'on' (checkbox), otherwise returns 0.. const getValue = (section, id, field) => parseFloat(v[`repeating_${section}_${id}_${field}`]) || @@ -1340,22 +1339,26 @@

Itens Guardados

}); }); - on("sheet:opened change:attackType change:strMod", function () { - getAttrs(["attackType", "strMod"], function (values) { - const attackType = values.attackType; - const strMod = parseInt(values.strMod) || 0; - let bonusDamage = 0; // Valor padrão - // Define bonusDamage com base no valor de attackType - if (attackType === "melee") { - bonusDamage = strMod; - } else if (attackType === "ranged") { - bonusDamage = 0; - } - // Atualiza o atributo bonusDamage - setAttrs({ - bonusDamage: bonusDamage - }); - }); + on("sheet:opened change:repeating_weapons:attackType change:strMod", function () { + getSectionIDs("repeating_weapons", function (idArray) { + idArray.forEach(function (id) { + const attributes = [`repeating_weapons_${id}_attackType`, "strMod"]; + getAttrs(attributes, function (values) { + const attackType = values[`repeating_weapons_${id}_attackType`] || ""; + const strMod = parseInt(values.strMod) || 0; // Global strMod + let bonusDamage = 0; + if (attackType.toLowerCase() === "melee") { + bonusDamage = strMod; + } else if (attackType.toLowerCase() === "ranged") { + bonusDamage = 0; + } + console.log(`Repeating weapon update - ID: ${id}, attackType: ${attackType}, bonusDamage: ${bonusDamage}`); + setAttrs({ + [`repeating_weapons_${id}_bonusDamage`]: bonusDamage + }); + }); + }); + }); }); // Atualizar weaponEncumbrance com a soma de todos os weaponWeight em repeating_weapons @@ -1479,8 +1482,6 @@

Itens Guardados

ids.forEach((id) => { const armorValue = parseInt(itemValues[`repeating_armor_${id}_armorValue`]) || 0; const armorWorn = itemValues[`repeating_armor_${id}_armorWorn`] === "on"; - console.log(itemValues[`repeating_armor_${id}_armorWorn`]) - console.log(`Item ID: ${id}, armorValue: ${armorValue}, armorWorn: ${armorWorn}`); if (armorWorn) { totalArmorValue += armorValue; } diff --git a/d20age/d20age.png b/d20age/d20age.png index f22d38f45469..33113cf540cc 100644 Binary files a/d20age/d20age.png and b/d20age/d20age.png differ