From: xangelo Date: Tue, 5 Sep 2023 19:37:32 +0000 (-0400) Subject: feat: remove body-part targeting X-Git-Tag: v0.3.3~3 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=c6a5f62efdb29dfbe89e3d2b6a8cea27e0f35e15;p=risinglegends.git feat: remove body-part targeting The body part targeting stopped working once we moved over to the new vigor system ,but the UI was left in just in case. --- diff --git a/src/server/api.ts b/src/server/api.ts index 7428e79..80aa82a 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -609,8 +609,7 @@ app.post('/fight/turn', authEndpoint, async (req: Request, res: Response) => { } const fightData = await fightRound(req.player, monster, { - action: req.body.action, - target: req.body.fightTarget + action: req.body.action }); diff --git a/src/server/fight.ts b/src/server/fight.ts index ab7b2c6..011cc5c 100644 --- a/src/server/fight.ts +++ b/src/server/fight.ts @@ -35,7 +35,7 @@ function exponentialExp(exp: number, monsterLevel: number, playerLevel: number): return Math.floor(finalExp); } -export async function fightRound(player: Player, monster: Fight, data: {action: 'attack' | 'cast' | 'flee', target: 'head' | 'body' | 'arms' | 'legs'}) { +export async function fightRound(player: Player, monster: Fight, data: {action: 'attack' | 'cast' | 'flee'}) { const playerSkills = await getPlayerSkillsAsObject(player.id); const roundData: FightRound = { monster, diff --git a/src/server/views/fight.ts b/src/server/views/fight.ts index b3ba986..b89f32e 100644 --- a/src/server/views/fight.ts +++ b/src/server/views/fight.ts @@ -86,12 +86,6 @@ export function renderFight(monster: Fight, results: string = '', displayFightAc
${displayFightActions ? `
- ${AttackButton(blockTime)} ${CastButton(blockTime)} @@ -106,8 +100,6 @@ export function renderFight(monster: Fight, results: string = '', displayFightAc } export function renderFightPreRound(monster: Fight, displayFightActions: boolean = true, location: LocationWithCity, closestTown: number) { - const hpPercent = Math.floor((monster.hp / monster.maxHp) * 100); - let html = `
@@ -116,34 +108,8 @@ export function renderFightPreRound(monster: Fight, displayFightActions: boolea

${location.name}

-
-
-
- -
-
-
${monster.name}, level ${monster.level}
-
${hpPercent}% - ${monster.hp} / ${monster.maxHp}
-
-
-
- ${displayFightActions ? ` - - - ${AttackButton()} - ${CastButton()} - - - `: ''} -
-
+ ${renderFight(monster, '', displayFightActions)}
-
`;