Macro.add("debugger", {
handler: function(v = State.variables, t = State.temporary){
let args = this.args;
let passage = args[0];
let host = args[1];
let host_id = v.game.entities.cur_identity;
let txt = [];
let stage = 'mature';//args[2] || 'mature';
let parasite_list = ["werm", "canal", "starfish", "choker", "egg"];
let suit_list = ["werm_suit", "canal_suit", "star_suit", "choker_suit"];
let p_count = parasite_list.length; //args[3] || 1;
let b_count = suit_list.length;
txt.push(`The cheat mode was created only for debugging purposes. After using any of the options - the game may be unplayable.`);
txt.push(`<font color="orange" style="bold">YOU HAVE BEEN WARNED!</font>`);
txt.push(`<div class="row" style="display: flex">`);
txt.push(`<div class="column" style="flex: 50%">`);
txt.push("Get parasites:");
for (var i = 0; i < p_count; i++) {
let parasite = parasite_list[i];//args[1];
let parasite_name = parasite.charAt(0).toUpperCase() + parasite.slice(1);
let text = [];
// txt.push(`<<link 'Get ${parasite_name}' '${passage}'>><<storeparasite '${host} ${parasite}'>><</link>>`);
if(parasite!="egg"){
text = `Get a `;
text += `<<link '(Cyan)' '${passage}'>><<storeparasite _pc '${parasite}'>><</link>> `;
text += `<<link '(Red)' '${passage}'>><<storeparasite _pc 'red_${parasite}'>><</link>> `;
text += `<<link '(Blue)' '${passage}'>><<storeparasite _pc 'blue_${parasite}'>><</link>> `;
text += `<<link '(White)' '${passage}'>><<storeparasite _pc 'white_${parasite}'>><</link>> `;
text += `<<link '(Purple)' '${passage}'>><<storeparasite _pc 'purple_${parasite}'>><</link>> `;
text += `${parasite_name}`;
} else {
text = `Get a `;
text += `<<link '(Cyan)' '${passage}'>><<storeparasite _pc 'choker' '${parasite}'>><</link>> `;
text += `<<link '(Red)' '${passage}'>><<storeparasite _pc 'red_choker' '${parasite}'>><</link>> `;
text += `<<link '(Blue)' '${passage}'>><<storeparasite _pc 'blue_choker' '${parasite}'>><</link>> `;
text += `<<link '(White)' '${passage}'>><<storeparasite _pc 'white_choker' '${parasite}'>><</link>> `;
text += `<<link '(Purple)' '${passage}'>><<storeparasite _pc 'purple_choker' '${parasite}'>><</link>> `;
text += `Choker ${parasite_name}`;
}
txt.push(`<font color="#68d">`+text+`</font>`);
}
let p_list_all = `Get `;
p_list_all += `<<link '(Cyan)' '${passage}'>><<storeparasite _pc 'werm'>><<storeparasite _pc 'canal'>><<storeparasite _pc 'starfish'>><<storeparasite _pc 'choker'>><<storeparasite _pc 'choker' 'egg'>><</link>> `;
p_list_all += `<<link '(Red)' '${passage}'>><<storeparasite _pc 'red_werm'>><<storeparasite _pc 'red_canal'>><<storeparasite _pc 'red_starfish'>><<storeparasite _pc 'red_choker'>><<storeparasite _pc 'red_choker' 'egg'>><</link>> `;
p_list_all += `<<link '(Blue)' '${passage}'>><<storeparasite _pc 'blue_werm'>><<storeparasite _pc 'blue_canal'>><<storeparasite _pc 'blue_starfish'>><<storeparasite _pc 'blue_choker'>><<storeparasite _pc 'blue_choker' 'egg'>><</link>> `;
p_list_all += `<<link '(White)' '${passage}'>><<storeparasite _pc 'white_werm'>><<storeparasite _pc 'white_canal'>><<storeparasite _pc 'white_starfish'>><<storeparasite _pc 'white_choker'>><<storeparasite _pc 'white_choker' 'egg'>><</link>> `;
p_list_all += `<<link '(Purple)' '${passage}'>><<storeparasite _pc 'purple_werm'>><<storeparasite _pc 'purple_canal'>><<storeparasite _pc 'purple_starfish'>><<storeparasite _pc 'purple_choker'>><<storeparasite _pc 'purple_choker' 'egg'>><</link>> `;
// txt.push(`<<link 'Get all x1' '${passage}'>>'${p_list_all}'<</link>>`);
p_list_all += `all x1`;
txt.push(`<font color="#68d">`+p_list_all+`</font>`);
txt.push(`</div>`);
txt.push(`<div class="column" style="flex: 25%">`);
txt.push('Get biosuits');
for (var i = 0; i < b_count; i++) {
let suit = suit_list[i];
let parasite = parasite_list[i];//args[1];
let suit_name = parasite.charAt(0).toUpperCase() + parasite.slice(1) + ' Suit';
txt.push(`<<link 'Get ${suit_name}' '${passage}'>><<storeparasite _pc '${suit}'>><</link>>`);
}
let b_list_all = "<<storeparasite _pc 'werm_suit'>><<storeparasite _pc 'canal_suit'>><<storeparasite _pc 'star_suit'>><<storeparasite _pc 'choker_suit'>>";
txt.push(`<<link 'Get all x1' '${passage}'>>'${b_list_all}'<</link>>`);
txt.push(`</div>`);
txt.push(`<div class="column" style="flex: 25%">`);
txt.push('More stuff:');
txt.push(`<a data-passage="${passage}" data-setter="_pc.ai.money += 10000; $game.money+= 10000">Get $10k</a>`);
if(host.stats.base.force < 300){
txt.push(`<a data-passage="${passage}" data-setter="$people['${host_id}'].stats.base.force += 500">Strongest</a>`);
}
txt.push(`<a data-passage="${passage}" data-setter="$people['${host_id}'].stats.base.force *= 0">Weakest</a>`);
if(v.chapter==2){
txt.push(`<a data-passage="Fix Spaceship" data-setter="$biosuit_counter = biosuit_counter()">Head to the spaceship</a>`);
}
txt.push(`</div>`);
txt.push(`</div>`);
console.log('host:', host);
console.log('v', v, 't', t);
new Wikifier(this.output, txt.join('<br>')+'<br>');
}
});