Browse Source

Adjust styling and card costs.

main
Stephanie Gredell 4 months ago
parent
commit
6bacc52d48
  1. 6
      src/data/cards.js
  2. 10
      src/ui/render.js
  3. 2
      style.css

6
src/data/cards.js

@ -50,7 +50,7 @@ export const CARDS = { @@ -50,7 +50,7 @@ export const CARDS = {
},
refactor: {
id: "refactor", name: "Refactor Strike", cost: 1, type: "attack", text: "Deal 7. Draw 1.",
id: "refactor", name: "Refactor Strike", cost: 2, type: "attack", text: "Deal 7. Draw 1.",
effect: (ctx) => { ctx.deal(ctx.enemy, ctx.scalarFromWeak(7)); ctx.draw(1); }
},
@ -99,7 +99,7 @@ export const CARDS = { @@ -99,7 +99,7 @@ export const CARDS = {
},
null_pointer: {
id: "null_pointer", name: "Null Pointer", cost: 1, type: "attack", text: "Deal 8. If enemy has no Block, deal 4 more.",
id: "null_pointer", name: "Null Pointer", cost: 2, type: "attack", text: "Deal 8. If enemy has no Block, deal 4 more.",
effect: (ctx) => {
let dmg = ctx.scalarFromWeak(8);
if (ctx.enemy.block === 0) dmg += ctx.scalarFromWeak(4);
@ -149,7 +149,7 @@ export const CARDS = { @@ -149,7 +149,7 @@ export const CARDS = {
},
hotfix: {
id: "hotfix", name: "Hotfix", cost: 1, type: "attack", text: "Deal 10. Can only be played if HP < 50%.",
id: "hotfix", name: "Hotfix", cost: 2, type: "attack", text: "Deal 10. Can only be played if HP < 50%.",
effect: (ctx) => {
if (ctx.player.hp <= ctx.player.maxHp * 0.5) {
ctx.deal(ctx.enemy, ctx.scalarFromWeak(10));

10
src/ui/render.js

@ -42,9 +42,9 @@ export async function renderBattle(root) { @@ -42,9 +42,9 @@ export async function renderBattle(root) {
const intentInfo = {
attack: { emoji: '', text: `Will attack for ${e.intent.value} damage`, color: 'danger' },
block: { emoji: '🛡', text: `Will gain ${e.intent.value} block`, color: 'info' },
debuff: { emoji: '💀', text: 'Will apply a debuff', color: 'warning' }
}[e.intent.type] || { emoji: '', text: 'Unknown intent', color: 'neutral' };
block: { emoji: '', text: `Will gain ${e.intent.value} block`, color: 'info' },
debuff: { emoji: '', text: 'Will apply a debuff', color: 'warning' }
}[e.intent.type] || { emoji: '', text: 'Unknown intent', color: 'neutral' };
app.innerHTML = `
<div class="battle-scene">
@ -1454,8 +1454,8 @@ export function renderWin(root) { @@ -1454,8 +1454,8 @@ export function renderWin(root) {
<div class="victory-message">
<div class="birthday-celebration">
<h3>Birthday Celebration Complete!</h3>
<p>Thanks to your heroic efforts, ThePrimeagen's birthday party can continue!</p>
<p class="victory-quote">"May your code compile clean and your builds deploy smooth!"</p>
<p>Thanks to your heroic efforts in your old age. ThePrimeagen's boomer years shall continue!</p>
<p class="victory-quote">"Happy Birthday Prime! Hope you have a good one!"</p>
</div>
</div>
</div>

2
style.css

@ -1165,7 +1165,7 @@ h3 { @@ -1165,7 +1165,7 @@ h3 {
.intent-danger { border-color: #dc3545; background: rgba(220, 53, 69, 0.1); }
.intent-info { border-color: #17a2b8; background: rgba(23, 162, 184, 0.1); }
.intent-warning { border-color: #ffc107; background: rgba(255, 193, 7, 0.1); }
.intent-warning { border-color: #ffc107; }
.intent-icon {
font-size: 24px;

Loading…
Cancel
Save