Fix morph forms: use abilityType=morph (schema-defined) to survive Ebb enforcement; bigger REST button
This commit is contained in:
+6
-3
@@ -1791,13 +1791,16 @@ p {
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
align-self: start;
|
||||
align-self: center;
|
||||
background: linear-gradient(180deg, #4aa8ff 0%, #1b64d8 100%) !important;
|
||||
color: #f4fbff !important;
|
||||
border: 1px solid rgba(134, 209, 255, 0.9) !important;
|
||||
box-shadow: 0 0 0 1px rgba(9, 29, 56, 0.45), 0 0 14px rgba(58, 152, 255, 0.28);
|
||||
padding: 0.28rem 0.55rem !important;
|
||||
font-size: 0.86rem !important;
|
||||
padding: 0.5rem 1rem !important;
|
||||
font-size: 1rem !important;
|
||||
font-weight: 700 !important;
|
||||
letter-spacing: 0.08em !important;
|
||||
text-transform: uppercase !important;
|
||||
}
|
||||
|
||||
.mosh .header-field-compact .headerinputfield {
|
||||
|
||||
@@ -5018,9 +5018,13 @@ export class MothershipActor extends Actor {
|
||||
.filter((item) => {
|
||||
const name = String(item.name ?? "").trim();
|
||||
const sla = item.system?.sla ?? {};
|
||||
// Morph form abilities (Vevaphon etc.) are species abilities, not Ebb abilities — never remove them
|
||||
if (sla.morphForm) return false;
|
||||
if (item.type === "ability") return true;
|
||||
if (item.type === "ability") {
|
||||
// Only flag abilities that are explicitly Ebb abilities.
|
||||
// Morph forms (Vevaphon) get abilityType "morph" from the generator and are never removed.
|
||||
// morphForm flag is a belt-and-suspenders guard in case abilityType is missing.
|
||||
if (sla.morphForm || String(sla.abilityType ?? "ebb").trim() !== "ebb") return false;
|
||||
return true;
|
||||
}
|
||||
if (item.type !== "skill") return false;
|
||||
return name === "Formulate" || name === "Biofeedback" || name === "Ebb (Core)" || name.startsWith("Ebb ");
|
||||
})
|
||||
|
||||
@@ -904,9 +904,11 @@ export class SLAMothershipGenerator extends FormApplication {
|
||||
const worldItem = findWorldItem(morph.name, "ability");
|
||||
if (worldItem) {
|
||||
const embedded = toEmbeddedData(worldItem);
|
||||
// Always ensure morphForm flag is set — prevents Ebb enforcement from deleting these
|
||||
// abilityType "morph" is schema-defined and guaranteed to be stored —
|
||||
// this prevents the Ebb enforcement sweep from ever deleting morph forms.
|
||||
embedded.system ??= {};
|
||||
embedded.system.sla ??= {};
|
||||
embedded.system.sla.abilityType = "morph";
|
||||
embedded.system.sla.morphForm = true;
|
||||
embedded.system.sla.isStartingForm = morph.name === startingMorphForm;
|
||||
items.push(embedded);
|
||||
@@ -921,6 +923,7 @@ export class SLAMothershipGenerator extends FormApplication {
|
||||
summary: morph.summary,
|
||||
special: morph.special,
|
||||
sla: {
|
||||
abilityType: "morph",
|
||||
morphForm: true,
|
||||
instabilityCost: morph.instabilityCost,
|
||||
statMods: morph.statMods ?? {},
|
||||
|
||||
Reference in New Issue
Block a user