From 61ac3a89cc4bcdc6ff214fb502e02dc623aa4e1f Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Sun, 16 Apr 2017 19:33:42 +0200 Subject: [PATCH] added rare shards editor to team kirby clash dx --- editors/team-kirby-clash-dx.js | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/editors/team-kirby-clash-dx.js b/editors/team-kirby-clash-dx.js index baa20bb..a09bfbf 100644 --- a/editors/team-kirby-clash-dx.js +++ b/editors/team-kirby-clash-dx.js @@ -1,5 +1,5 @@ /* - Team Kirby Clash Deluxe savegame editor v20170415 + Team Kirby Clash Deluxe savegame editor v20170416 by Marc Robledo 2017 */ @@ -12,11 +12,12 @@ SavegameEditor={ Offsets:{ APPLE_GEMS:0x199c, BOUGHT_APPLE_GEMS:0x19b8, + SHARDS_RED:0x19bc, + SHARDS_BLUE:0x19c0, + SHARDS_YELLOW:0x19c4, + SHARDS_RARE:0x19c8 /* not tested? */ }, - /* private functions */ - //none? - /* check if savegame is valid */ checkValidSavegame:function(){ return (tempFile.fileSize===8464) @@ -30,6 +31,7 @@ SavegameEditor={ /* prepare editor */ card( + 'Apple gems', row([9,3], label('number-applegems', 'Apple gems'), inputNumber('applegems', 0, 65535, tempFile.readShort(this.Offsets.APPLE_GEMS)) @@ -39,11 +41,35 @@ SavegameEditor={ inputNumber('boughtapplegems', 0, 3000, tempFile.readShort(this.Offsets.BOUGHT_APPLE_GEMS)) ) ); + card( + 'Crystal shards', + row([9,3], + label('number-shards-red', 'Fire shards'), + inputNumber('shards-red', 0, 999, tempFile.readShort(this.Offsets.SHARDS_RED)) + ), + row([9,3], + label('number-shards-blue', 'Water shards'), + inputNumber('shards-blue', 0, 999, tempFile.readShort(this.Offsets.SHARDS_BLUE)) + ), + row([9,3], + label('number-shards-yellow', 'Light shards'), + inputNumber('shards-yellow', 0, 999, tempFile.readShort(this.Offsets.SHARDS_YELLOW)) + ), + row([9,3], + label('number-shards-rare', 'Rare shards'), + inputNumber('shards-rare', 0, 999, tempFile.readShort(this.Offsets.SHARDS_RARE)) + ) + ); }, /* save function */ save:function(){ tempFile.writeShort(this.Offsets.APPLE_GEMS, getValue('applegems')); tempFile.writeShort(this.Offsets.BOUGHT_APPLE_GEMS, getValue('boughtapplegems')); + + tempFile.writeShort(this.Offsets.SHARDS_RED, getValue('shards-red')); + tempFile.writeShort(this.Offsets.SHARDS_BLUE, getValue('shards-blue')); + tempFile.writeShort(this.Offsets.SHARDS_YELLOW, getValue('shards-yellow')); + tempFile.writeShort(this.Offsets.SHARDS_RARE, getValue('shards-rare')); } } \ No newline at end of file