0
0
mirror of https://github.com/marcrobledo/savegame-editors.git synced 2025-04-28 09:05:10 +00:00

added rare shards editor to team kirby clash dx

This commit is contained in:
Marc Robledo 2017-04-16 19:33:42 +02:00
parent 8e968826fa
commit 61ac3a89cc

View File

@ -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'));
}
}