Skip to content

Commit

Permalink
New generator altar|curse, lower drop rates
Browse files Browse the repository at this point in the history
  • Loading branch information
IGPenguin committed Nov 23, 2024
1 parent 27bd742 commit 77db50d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
2 changes: 1 addition & 1 deletion data/story.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Eternal Realm;💀;Death Sentence;Death;0;0;0;0;0;0;End of the Line;<b>❤️‍
Depths of Slumber;😴;Restless Dream;Dream;0;0;0;0;0;0;Snoring;<b>💤 Sleep</b> to recover depleted <b>🟢 Energy</b>.<br>;
Depths of Slumber;👿;Bad Thought;Demon;1;1;1;0;0;0;Imaginary Threat;<b>🔰 Block</b> or <b>🌀 Dodge</b> to avoid enemy strikes.<br><b>⚔️ Attack</b> when they have no <b>🟢 Energy</b>.;
Depths of Slumber;🦐;Floating Shrimp;Consumable;0;0;0;0;0;0;Imaginary Food;<b>🍴 Eat</b> to restore <b>❤️ Health</b> and <b>🟢 Energy</b>.<br>;
//;Depths of Slumber;👤;Shaping Decision;Upgrade;0;0;0;0;0;0;Turning Point;<b>Choose a perk</b> to shape your character.<br>;
Depths of Slumber;🥱;Waking Moment;Dream;0;0;0;0;0;0;Sudden Epiphany;Focus on the details to <b>increase your chances.</b><br>n/a;

//Work-in-progress
Expand All @@ -24,6 +23,7 @@ Depths of Slumber;🥱;Waking Moment;Dream;0;0;0;0;0;0;Sudden Epiphany;Focus on
//Forsaken Village
Forsaken Village;❓;Prop/Small;Generator-0;0;0;0;0;0;0;XXX;XXX;XXX
Forsaken Village;❓;Easy Encounter;Generator-2;0;0;0;0;0;0;XXX;XXX;XXX
Forsaken Village;❓;Altar|Trap House (Optional);Generator-5;0;0;0;0;0;0;XXX;XXX;XXX

Forsaken Village;❓;Mid House (Optional);Generator-30;0;0;0;0;0;0;XXX;XXX;XXX
Forsaken Village;❓;Mid Encounter;Generator-3;0;0;0;0;0;0;XXX;XXX;XXX
Expand Down
47 changes: 32 additions & 15 deletions js/game_loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,19 +498,20 @@ function generateNextEncounters(generatorID=0){
case 2: //Easy Encounter
logGenerator("easy");
pushEncounter(getRandomEncounter(["Prop"]));
pushEncounter(getRandomEncounter(["Standard"]));
pushEncounter(getRandomEncounter(["Standard","Recruit"]));
break;

case 3: //Mid Encounter - 20% item
logGenerator("mid");
pushEncounter(getRandomEncounter(["Prop"]));
pushEncounter(getRandomEncounter(["Standard","Recruit"]));

//20% item
if (procAbilityChance("",20+playerLck)) {
pushEncounter(getRandomEncounter(["Item"]),2)
} else {
//50% consumable
if(procAbilityChance("",50+playerLck)) pushEncounter(getRandomEncounter(["Consumable"]),2);
//30% consumable
if(procAbilityChance("",30+playerLck)) pushEncounter(getRandomEncounter(["Consumable"]),2);
}
break;

Expand All @@ -519,16 +520,32 @@ function generateNextEncounters(generatorID=0){
pushEncounter(getRandomEncounter(["Prop"]));
pushEncounter(getRandomEncounter(["Swift","Heavy","Demon"]));

if (procAbilityChance("",40+playerLck)) {
//30% item & consumable
if (procAbilityChance("",30+playerLck)) {
pushEncounter(getRandomEncounter(["Item"]),2)
pushEncounter(getRandomEncounter(["Consumable"]),3);
} else {
//60% consumable
if (procAbilityChance("",60+playerLck)) pushEncounter(getRandomEncounter(["Consumable"]),2);
//40% consumable
if (procAbilityChance("",40+playerLck)) pushEncounter(getRandomEncounter(["Consumable"]),2);
}
break;

case 5: //Small|Demon + Altar or Trap
logGenerator("altar|trap");

if (procAbilityChance("",50)) {
pushEncounter(getRandomEncounter(["Prop"]))
pushEncounter(getRandomEncounter(["Altar"]));
pushEncounter(getRandomEncounter(["Standard","Recruit","Demon","Pet"]));
pushEncounter(getRandomEncounter(["Container-3"]))
} else {
pushEncounter(getRandomEncounter(["Prop"]))
pushEncounter(getRandomEncounter(["Curse","Trap","Trap-Attack","Trap-Roll"]));
pushEncounter(getRandomEncounter(["Standard","Recruit","Demon","Pet"]));
pushEncounter(getRandomEncounter(["Container-3"]))
}
break;

//TODO add case small altar with easy enemy and other small random enc
//TODO add choose random enc (similar as house) + add to story.csv

case 9: //Boss
Expand Down Expand Up @@ -575,7 +592,7 @@ function generateNextEncounters(generatorID=0){
}
}

pushEncounter(getRandomEncounter(["Small"]),4);
pushEncounter(getRandomEncounter(["Small","Recruit","Standard","Swift","Heavy","Demon"]),4);
break;

case 31: //House Locked - 100% item/pet/friend, 100% consumable
Expand Down Expand Up @@ -615,13 +632,13 @@ function generateNextEncounters(generatorID=0){
}
break;

case 50: //Optional Big House - 100% consumable, 50% item or maybe altar
case 50: //Optional Big House - 100% consumable, 40% item or maybe altar
logGenerator("h-big");
pushEncounter(getRandomEncounter(["Container-4"]));
pushEncounter(getRandomEncounter(["Curse","Trap","Trap-Attack","Trap-Roll"]),2);
pushEncounter(getRandomEncounter(["Swift","Heavy","Demon"]),3);

if (procAbilityChance("",50+playerLck)) {
if (procAbilityChance("",40+playerLck)) {
pushEncounter(getRandomEncounter(["Item"]),4)
pushEncounter(getRandomEncounter(["Consumable"]),5);
} else {
Expand All @@ -630,14 +647,14 @@ function generateNextEncounters(generatorID=0){
}
break;

case 60: //Optional Huge House - 100% consumable, 60% item or altar
case 60: //Optional Huge House - 100% consumable, 50% item or altar
logGenerator("h-huge");
pushEncounter(getRandomEncounter(["Container-5"]));
pushEncounter(getRandomEncounter(["Small","Standard","Recruit","Pet"]),2);
pushEncounter(getRandomEncounter(["Curse","Trap","Trap-Attack","Trap-Roll"]),3);
pushEncounter(getRandomEncounter(["Swift","Heavy","Demon"]),4);

if (procAbilityChance("",60+playerLck)) {
if (procAbilityChance("",50+playerLck)) {
pushEncounter(getRandomEncounter(["Item"]),5)
pushEncounter(getRandomEncounter(["Consumable"]),6);
} else {
Expand Down Expand Up @@ -1408,7 +1425,7 @@ function resolveAction(button){ //Yeah, this is bad, like really bad
}
playerMgk-=magicDamage;

if ((enemyMgk+enemyMgkLost)<magicDamage){
if ((enemyMgk+enemyMgkLost)<=magicDamage){
enemyHit(magicDamage,true);
} else {
logPlayerAction(actionString,"They resisted the spell -"+magicDamage+" 🔵");
Expand Down Expand Up @@ -1597,14 +1614,14 @@ function resolveAction(button){ //Yeah, this is bad, like really bad
var isSacrifice = (enemyHp<0)

if (isSacrifice) {
if (playerUseItem("🔪","overwritten","The prayer had no effect.",true,true,false)){
if (playerUseItem("🔪","overwritten","overwritten",true,true,false)){
displayEnemyEffect("🩸");
playerChangeStats(enemyHp, enemyAtk, enemySta, enemyLck, enemyInt, enemyMgk,enemyMsg,true,false);
playerHit(0,false,true);
isFishing=false
if (playerHp>0) nextEncounter();
}
logPlayerAction("Missing a sacrificial blade 🔪")
logPlayerAction(actionString,"No effect, missing <b>🔪 Sacrifical Blade</b>.")
displayPlayerEffect("🤲");
displayPlayerCannotEffect();
} else {
Expand Down

0 comments on commit 77db50d

Please sign in to comment.