mirror of
https://github.com/thepaperpilot/Super-Auto-Coots.git
synced 2024-11-28 11:01:35 +00:00
Fix faint abilities not activating
This commit is contained in:
parent
24f2103717
commit
f4f565729c
4 changed files with 23 additions and 4 deletions
|
@ -83,6 +83,7 @@
|
|||
<link rel="prefetch" href="yard_small.png" />
|
||||
<link rel="prefetch" href="shop_Switch1.png" />
|
||||
<link rel="prefetch" href="Fire.png" />
|
||||
<link rel="prefetch" href="bandaid.png" />
|
||||
|
||||
<title>Profectus</title>
|
||||
<meta name="description" content="A project made in Profectus"/>
|
||||
|
|
BIN
public/bandaid.png
Normal file
BIN
public/bandaid.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 852 B |
|
@ -82,6 +82,9 @@
|
|||
<img :src="level2_2" v-if="character.exp === 5" />
|
||||
<img :src="level3" v-if="character.exp === 6" />
|
||||
</span>
|
||||
<span class="fainted" v-if="character != null && (character.presence <= 0 || character.relevancy <= 0)">
|
||||
<img :src="bandaid" />
|
||||
</span>
|
||||
<Node v-if="id" :id="id" />
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
@ -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%);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue