From 80aafc7d48eeaf448aa4a30f3caf696087c73f6e Mon Sep 17 00:00:00 2001 From: MageKing17 Date: Sun, 21 Aug 2022 12:22:58 -0700 Subject: [PATCH] All the player sub-objects need to be copied. Not just `mults`. Also, `hacking_chance_mult` still being at the base level appears to be a mistake. --- src/NetscriptFunctions.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 2c617b4b6..65f593179 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1911,10 +1911,9 @@ const base: InternalAPI = { }, getPlayer: () => (): INetscriptPlayer => { const data = { - hp: Player.hp, - skills: Player.skills, - exp: Player.exp, - hacking_chance_mult: Player.mults.hacking_chance, + hp: JSON.parse(JSON.stringify(Player.hp)), + skills: JSON.parse(JSON.stringify(Player.skills)), + exp: JSON.parse(JSON.stringify(Player.exp)), mults: JSON.parse(JSON.stringify(Player.mults)), numPeopleKilled: Player.numPeopleKilled, money: Player.money,