From f4f565729c66e405c51f4858454d5305f3a64b5d Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 28 Feb 2023 20:35:03 -0600 Subject: [PATCH] Fix faint abilities not activating --- index.html | 1 + public/bandaid.png | Bin 0 -> 852 bytes src/data/CharacterSlot.vue | 21 ++++++++++++++++++--- src/data/projEntry.tsx | 5 ++++- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 public/bandaid.png diff --git a/index.html b/index.html index 04ae522..b932997 100644 --- a/index.html +++ b/index.html @@ -83,6 +83,7 @@ + Profectus diff --git a/public/bandaid.png b/public/bandaid.png new file mode 100644 index 0000000000000000000000000000000000000000..61391223d22dbd3ef7340ec6bfc01f766e4abc83 GIT binary patch literal 852 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvE4M+yv$zcaljKx9jP7LeL$-HD>VCM65aSW-L z^Y+fhERjHowuh0)x?g#r%P_J>AY#`O=?nD?;BOm`0CC3`up>b)v8T4 z{`bB;(clsfS+h%)u`8&Cne=l!yR%5ux;$Xrk;LG45 z%y2QMQEK(wZ+mL0^0ek#m;K-Jb^<3tlEq=m&OfR4-BG#KS$FsR-CD8l=jXzYd%mM9 zT33JY{G!G8zU`^}y{}?l$=|H2wOMChmz`iiI0NV+^Fw@@QMc!{K5Y-3zuV-_>Rt1i zXM)`TbIxYgU;SaX=gCK(?|wdCdp>K{*Ea$BK44$KJXHGe+PT6RTXWC9l-}O;e1BZN z=y~<(*P-*R)8g*`kxFKQ`U-5~+SlYGbtL-To$X2E`{)-|NL!l->UP zUFujuGo2Tz1TIo`g6~J zG(c7NceBIRZRPt!&aaQLh_|WV_HWUvUvKA5d|f|%y?pZRVjI*@IGWpdY@7Mob=%)& zorbmHv=WyyKg&O$!pKL`R&V56b-Y^ p9*IxBy)bH + + + @@ -93,16 +96,17 @@ import { jsx, JSXFunction } from "features/feature"; import Tooltip from "features/tooltips/Tooltip.vue"; import { Direction } from "util/common"; import { coerceComponent } from "util/vue"; -import { Component, ref, shallowRef, watch, watchEffect } from "vue"; -import heart from "../../public/heart.png"; -import star from "../../public/presence_v2.png"; +import { ref, shallowRef, watch, watchEffect } from "vue"; +import bandaid from "../../public/bandaid.png"; import lock from "../../public/Freeze icon.png"; +import heart from "../../public/heart.png"; import level1_0 from "../../public/Lvl 1_0.png"; import level1_1 from "../../public/Lvl 1_1.png"; import level2_0 from "../../public/Lvl 2_0.png"; import level2_1 from "../../public/Lvl 2_1.png"; import level2_2 from "../../public/Lvl 2_2.png"; import level3 from "../../public/Lvl 3.png"; +import star from "../../public/presence_v2.png"; import { characters } from "./projEntry"; import { Character } from "./types"; @@ -310,6 +314,17 @@ watchEffect(() => { transform: translate(-50%, -50%); } +.fainted img { + image-rendering: pixelated; + max-height: 10vmin; + filter: drop-shadow(2px 4px 6px black); + z-index: 1; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + @keyframes bouncingMoveIndicator { 0% { transform: translateX(-50%) rotate(180deg) translateY(0%); diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index b4fae49..8f50074 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -968,7 +968,10 @@ export const main = createLayer("main", function (this: BaseLayer) { console.error("Invalid action", action); break; } - if (action.target.presence <= 0 || action.target.relevancy <= 0) { + if ( + characters[action.target.type].abilityType !== "Faint" && + (action.target.presence <= 0 || action.target.relevancy <= 0) + ) { break; } characters[action.target.type].performAbility(action.target);