From 4fac208d8bcb39a2087012cc6212629bf2e79453 Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 24 Aug 2020 12:32:27 +1000 Subject: [PATCH] remove targetting arrows and skills from combat, reduce construct hp --- client/src/components/game.construct.jsx | 1 - client/src/components/targeting.arrows.jsx | 79 +--------------------- core/src/construct.rs | 2 +- 3 files changed, 2 insertions(+), 80 deletions(-) diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 2fa74788..5f9fe511 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -95,7 +95,6 @@ class GameConstruct extends preact.Component { style={ activeSkill ? { cursor: 'pointer' } : {}} class={`game-construct ${ko} ${koEvent()} ${unfocus} ${highlight}`}>
- {crypSkills}
diff --git a/client/src/components/targeting.arrows.jsx b/client/src/components/targeting.arrows.jsx index fba1b064..b2bfd995 100644 --- a/client/src/components/targeting.arrows.jsx +++ b/client/src/components/targeting.arrows.jsx @@ -40,25 +40,13 @@ class TargetSvg extends Component { render(props, state) { const { // Changing State Variables - account, - animating, game, gameEffectInfo, } = props; - const { width, height } = state; if (!game) return false; // game will be null when battle ends if (game.phase === 'Finished') return false; // Clear everything if its over (in case of abandon) - // First round of a game - if (!game.resolutions.length && game.stack.length === 0) { - return ( -
-

Select a skill from each construct, click a target for that skill and then click READY.

-
- ); - } - // Whenever someones looking at effects throw it up here if (gameEffectInfo) { const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/; @@ -72,72 +60,7 @@ class TargetSvg extends Component {
); } - - // resolutions happening - // just put skill name up - if (animating) return false; - - const playerTeam = game.players.find(t => t.id === account.id); - const otherTeam = game.players.find(t => t.id !== account.id); - - const playerTeamIds = playerTeam.constructs.map(c => c.id); - const outgoing = game.stack.filter(stack => stack.player === account.id); - - function getPath(cast) { - const source = playerTeam.constructs.findIndex(c => c.id === cast.source); - const defensive = playerTeamIds.includes(cast.target); - const target = defensive - ? playerTeam.constructs.findIndex(c => c.id === cast.target) - : otherTeam.constructs.findIndex(c => c.id === cast.target); - - const skillNumber = window.innerWidth <= 800 // mobile styling trigger - ? playerTeam.constructs[source].skills.findIndex(s => s.skill === cast.skill) - : 0; - const sourceY = height; - const sourceX = (source * width / 3) + width / 18 + skillNumber * (width / 9); - const targetX = (target * width / 3) + width / 6 - + (defensive ? width / 64 : 0) - + (source * width / 18); - const targetY = defensive ? height : 0; - const bendStart = height * (0.7 - 0.1 * source); - const bendEnd = height * 0.20; - - if (defensive) { - const path = ` - M${sourceX},${sourceY} - L${sourceX},${bendStart} - L${targetX},${bendStart} - L${targetX},${targetY} - L${targetX - (width * 0.005)},${height * 0.875} - M${targetX},${targetY} - L${targetX + (width * 0.005)},${height * 0.875} - `; - - return ; - } - - const path = ` - M${sourceX},${sourceY} - L${sourceX},${bendStart} - L${targetX},${bendEnd} - L${targetX},${targetY} - L${targetX - (width * 0.005)},${height * 0.125} - M${targetX},${targetY} - L${targetX + (width * 0.005)},${height * 0.125} - - `; - - return ; - } - - return ( - - {outgoing.map(getPath)} - - ); + return false; } componentDidMount() { diff --git a/core/src/construct.rs b/core/src/construct.rs index bd3c0afa..c3ceb25a 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -233,7 +233,7 @@ impl Construct { blue_power: ConstructStat { base: 320, value: 320, max: 320, stat: Stat::BluePower }, blue_life: ConstructStat { base: 125, value: 125, max: 125, stat: Stat::BlueLife }, green_power: ConstructStat { base: 320, value: 320, max: 320, stat: Stat::GreenPower }, - green_life: ConstructStat { base: 800, value: 800, max: 800, stat: Stat::GreenLife }, + green_life: ConstructStat { base: 400, value: 400, max: 400, stat: Stat::GreenLife }, speed: ConstructStat { base: 100, value: 100, max: 100, stat: Stat::Speed }, // evasion: ConstructStat { base: 0, value: 0, max: 0, stat: Stat::Evasion }, skills: vec![],