WIP: Current state before PVP combat investigation
This commit is contained in:
@@ -1,328 +1,471 @@
|
||||
/* Combat Visual Effects */
|
||||
|
||||
/* Screen Shake */
|
||||
@keyframes shake {
|
||||
0% {
|
||||
transform: translate(1px, 1px) rotate(0deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
transform: translate(-1px, -2px) rotate(-1deg);
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translate(-3px, 0px) rotate(1deg);
|
||||
}
|
||||
|
||||
30% {
|
||||
transform: translate(3px, 2px) rotate(0deg);
|
||||
}
|
||||
|
||||
40% {
|
||||
transform: translate(1px, -1px) rotate(1deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translate(-1px, 2px) rotate(-1deg);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translate(-3px, 1px) rotate(0deg);
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: translate(3px, 1px) rotate(-1deg);
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translate(-1px, -1px) rotate(1deg);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate(1px, 2px) rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate(1px, -2px) rotate(-1deg);
|
||||
}
|
||||
/* Combat Layout */
|
||||
.combat-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
/* More transparent/themed background */
|
||||
background: rgba(20, 20, 20, 0.6);
|
||||
backdrop-filter: blur(5px);
|
||||
border-radius: 12px;
|
||||
padding: 1rem;
|
||||
color: white;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.shake-effect {
|
||||
animation: shake 0.5s;
|
||||
animation-iteration-count: 1;
|
||||
.glow-effect {
|
||||
box-shadow: 0 0 10px #ff4444, 0 0 20px #ff4444;
|
||||
transition: box-shadow 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
/* Hit Flash */
|
||||
@keyframes flash-red {
|
||||
0% {
|
||||
filter: brightness(1) sepia(0) hue-rotate(0deg) saturate(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
filter: brightness(0.5) sepia(1) hue-rotate(-50deg) saturate(5);
|
||||
}
|
||||
|
||||
/* Red tint */
|
||||
100% {
|
||||
filter: brightness(1) sepia(0) hue-rotate(0deg) saturate(1);
|
||||
}
|
||||
}
|
||||
|
||||
.flash-hit {
|
||||
animation: flash-red 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* Dead Enemy Grayscale */
|
||||
.enemy-dead {
|
||||
.dead .location-image {
|
||||
filter: grayscale(100%);
|
||||
transition: filter 0.5s ease-out;
|
||||
transition: filter 1s ease;
|
||||
}
|
||||
|
||||
/* Fled Enemy Blueish Tint */
|
||||
.enemy-fled {
|
||||
filter: sepia(1) saturate(3) hue-rotate(180deg) brightness(0.8);
|
||||
transition: filter 0.5s ease-out;
|
||||
/* Enemy avatar now uses shared .location-image styles from Game.css */
|
||||
|
||||
/* ... existing code ... */
|
||||
|
||||
/* Action Buttons Center */
|
||||
.combat-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
/* Center horizontally */
|
||||
padding: 1rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Floating Damage Numbers */
|
||||
@keyframes float-up {
|
||||
0% {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: translateY(-30px) scale(1.3);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: translateY(-60px) scale(1.5);
|
||||
}
|
||||
.combat-header {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 0 1rem 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.floating-text-container {
|
||||
.battle-arena {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 2rem 1rem;
|
||||
position: relative;
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
/* Combatants */
|
||||
.combatant {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.combatant.enemy {
|
||||
color: #ffaaaa;
|
||||
}
|
||||
|
||||
.combatant.player {
|
||||
color: #aaddff;
|
||||
}
|
||||
|
||||
.combatant.dead .enemy-avatar {
|
||||
filter: grayscale(100%) brightness(0.5);
|
||||
transition: filter 1s ease-out;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Cleaned up old styles */
|
||||
.player-placeholder {
|
||||
font-size: 5rem;
|
||||
color: #ff4444;
|
||||
}
|
||||
|
||||
.player-placeholder {
|
||||
color: #4488ff;
|
||||
}
|
||||
|
||||
.vs-divider {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
/* Health Bars */
|
||||
.stats-container {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.health-bar-container {
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.health-bar-fill {
|
||||
height: 100%;
|
||||
transition: width 0.3s ease-out;
|
||||
}
|
||||
|
||||
.enemy-fill {
|
||||
background: linear-gradient(90deg, #ff4444, #cc0000);
|
||||
}
|
||||
|
||||
.player-fill {
|
||||
background: linear-gradient(90deg, #4488ff, #0044cc);
|
||||
}
|
||||
|
||||
.health-text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 0.7rem;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 1px black;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* Action Buttons */
|
||||
.combat-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem 0;
|
||||
width: 100%;
|
||||
/* Ensure buttons stack properly */
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.combat-actions-group {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.combat-actions-group {
|
||||
max-width: 400px;
|
||||
/* Limit width of attack/flee buttons */
|
||||
}
|
||||
|
||||
.btn.full-width {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
/* Don't let close button get too wide */
|
||||
}
|
||||
|
||||
.btn-attack {
|
||||
background: #ff4444;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-flee {
|
||||
background: #666;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Combat Log */
|
||||
.combat-log-container {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 8px;
|
||||
padding: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
height: 150px;
|
||||
overflow-y: auto;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.log-message {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.log-player_attack {
|
||||
color: #aaddff;
|
||||
}
|
||||
|
||||
.log-enemy_attack {
|
||||
color: #ffaaaa;
|
||||
}
|
||||
|
||||
.log-victory {
|
||||
color: #44ff44;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.log-defeat {
|
||||
color: #ff4444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Animations & Floats */
|
||||
.floating-text-layer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
z-index: 100;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.floating-text {
|
||||
position: absolute;
|
||||
font-weight: bold;
|
||||
font-size: 2.5rem;
|
||||
text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
|
||||
animation: float-up 2.5s ease-out forwards;
|
||||
white-space: nowrap;
|
||||
font-size: 1.5rem;
|
||||
animation: float-up 5s forwards;
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
text-shadow: 2px 2px 0 #000;
|
||||
}
|
||||
|
||||
.floating-text.damage-player {
|
||||
.type-damage {
|
||||
color: #ff4444;
|
||||
}
|
||||
|
||||
.floating-text.damage-enemy {
|
||||
color: #ff4444;
|
||||
.type-crit {
|
||||
color: #ffaa00;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.floating-text.damage-player-dealt {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.floating-text.heal {
|
||||
.type-heal {
|
||||
color: #44ff44;
|
||||
}
|
||||
|
||||
/* Intent Bubble */
|
||||
.intent-bubble {
|
||||
position: absolute;
|
||||
top: -40px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border: 2px solid #fff;
|
||||
border-radius: 20px;
|
||||
padding: 5px 15px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
|
||||
animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
.type-miss {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
@keyframes pop-in {
|
||||
.type-info {
|
||||
color: #ffff44;
|
||||
}
|
||||
|
||||
@keyframes float-up {
|
||||
0% {
|
||||
transform: translateX(-50%) scale(0);
|
||||
transform: translateY(0) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(-50%) scale(1);
|
||||
transform: translateY(-50px) scale(1.2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.intent-icon {
|
||||
font-size: 1.2em;
|
||||
.type-xp {
|
||||
color: #ffd700;
|
||||
font-size: 1.2rem;
|
||||
/* User wants it lower, so we can adjust top via inline style in TSX or here */
|
||||
/* text-shadow: 1px 1px 0 #000; */
|
||||
}
|
||||
|
||||
.intent-desc {
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
.shake-effect {
|
||||
animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
|
||||
}
|
||||
|
||||
/* Intent Types */
|
||||
.intent-attack {
|
||||
border-color: #ff4444;
|
||||
@keyframes shake {
|
||||
|
||||
10%,
|
||||
90% {
|
||||
transform: translate3d(-1px, 0, 0);
|
||||
}
|
||||
|
||||
20%,
|
||||
80% {
|
||||
transform: translate3d(2px, 0, 0);
|
||||
}
|
||||
|
||||
30%,
|
||||
50%,
|
||||
70% {
|
||||
transform: translate3d(-4px, 0, 0);
|
||||
}
|
||||
|
||||
40%,
|
||||
60% {
|
||||
transform: translate3d(4px, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.intent-defend {
|
||||
border-color: #4488ff;
|
||||
.flash-hit {
|
||||
animation: flash 0.3s;
|
||||
}
|
||||
|
||||
.intent-special {
|
||||
border-color: #ffaa00;
|
||||
@keyframes flash {
|
||||
0% {
|
||||
filter: brightness(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
filter: brightness(2) sepia(1) hue-rotate(-50deg) saturate(5);
|
||||
}
|
||||
|
||||
/* Red flash */
|
||||
100% {
|
||||
filter: brightness(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Container relative positioning for absolute children */
|
||||
.combat-enemy-display-inline {
|
||||
position: relative;
|
||||
.turn-overlay {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 1rem 2rem;
|
||||
border-radius: 20px;
|
||||
font-size: 1.5rem;
|
||||
animation: pulse 1s infinite;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.combat-enemy-image-large {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.combat-enemy-image-large img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
/* Attacking Animation */
|
||||
.attacking {
|
||||
animation: lunge 0.3s;
|
||||
}
|
||||
|
||||
.combat-view {
|
||||
position: relative;
|
||||
/* For screen shake scope if applied here */
|
||||
@keyframes lunge {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Assuming LTR, for enemy use -20px via modifier if needed */
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Combat Container */
|
||||
.combat-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.enemy.attacking {
|
||||
animation: lunge-left 0.3s;
|
||||
}
|
||||
|
||||
/* Combat Content Wrapper - Groups enemy display, turn indicator, and combat log */
|
||||
.combat-content-wrapper {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 1rem;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
@keyframes lunge-left {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateX(-20px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Turn Indicator - Match Enemy Image Width */
|
||||
.combat-turn-indicator-inline {
|
||||
width: 100%;
|
||||
/* Combat Stats Layout - Staggered HP Bars */
|
||||
.combat-stats-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Combat Log Styles */
|
||||
.combat-log-wrapper {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.combat-log-title {
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 1.1em;
|
||||
color: #aaa;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.combat-log-inline {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
padding: 15px;
|
||||
.stat-block {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.log-entries {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
.stat-block.enemy {
|
||||
width: 60%;
|
||||
align-self: flex-start;
|
||||
border-left: 3px solid #dc3545;
|
||||
}
|
||||
|
||||
.stat-block.player {
|
||||
width: 60%;
|
||||
align-self: flex-end;
|
||||
border-right: 3px solid #4caf50;
|
||||
}
|
||||
|
||||
.stat-block .stat-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.25rem;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Custom scrollbar for combat log */
|
||||
.log-entries::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
.stat-block .stat-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.log-entries::-webkit-scrollbar-track {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 4px;
|
||||
.stat-block .stat-numbers {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.log-entries::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.log-entries::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.log-entry {
|
||||
font-size: 0.9em;
|
||||
padding: 6px 8px;
|
||||
line-height: 1.5;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid transparent;
|
||||
transition: background 0.2s ease;
|
||||
.stat-block.player .progress-bar {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Ensure progress bars look like GameHeader */
|
||||
.progress-bar {
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
/* Slightly thinner than header */
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.log-entry:hover {
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.log-time {
|
||||
color: #888;
|
||||
font-size: 0.85em;
|
||||
font-family: monospace;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.log-message {
|
||||
flex: 1;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.player-log {
|
||||
color: #aaddff;
|
||||
border-left-color: #4488ff;
|
||||
}
|
||||
|
||||
.enemy-log {
|
||||
color: #ffaaaa;
|
||||
border-left-color: #ff4444;
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
transition: width 0.3s ease-out;
|
||||
}
|
||||
Reference in New Issue
Block a user