Skip to content
Snippets Groups Projects
effect.js 41.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • LollipopScythe's avatar
    LollipopScythe committed
    			V.daily.parasiteEvent.forEach(event => {
    				switch (event) {
    					case "anus0":
    					case "vagina0":
    						if (V.pregnancyStats.parasiteDoctorEvents >= 4) {
    							sWikifier(
    								`You feel ${V.pregnancyStats.namesParasitesChild ? "your grown child" : "the grown parasite"} in your ${
    									event === "anus0" ? "stomach" : "uterus"
    								}. <<ggarousal>>`
    							);
    						} else {
    							sWikifier(
    								`You feel something large move around in your ${
    									event === "anus0" ? "stomach" : "uterus"
    								}. Might be best to go to the hospital again. <<ggarousal>>`
    							);
    						}
    						arousalGain += 2000;
    						break;
    					case "anus1":
    					case "vagina1":
    						if (V.pregnancyStats.parasiteDoctorEvents >= 2) {
    							sWikifier(
    								`You feel one of ${V.pregnancyStats.namesParasitesChild ? "your children" : "the parasites"} move around in your ${
    									event === "anus1" ? "stomach" : "uterus"
    								}. <<ggarousal>>${stressMulti ? "<<gstress>>" : ""}`
    							);
    						} else {
    							sWikifier(`You feel something move around in your ${event === "anus1" ? "stomach" : "uterus"}. Might be best to go to the hospital.
    							<<ggarousal>>${stressMulti ? "<<gstress>>" : ""}`);
    						}
    						arousalGain += (arousalMulti * 500) / (minDaysLeft + 1);
    						V.stress += 300 * stressMulti;
    						break;
    					case "anus2":
    					case "vagina2":
    						sWikifier(
    							`Your ${
    								event === "anus2" ? "stomach" : "uterus"
    							} rumbles a little. You hope the noise hasn't attracted any attention. <<garousal>>${stressMulti ? "<<gstress>>" : ""}`
    						);
    						arousalGain += (arousalMulti * 250) / (minDaysLeft + 1);
    						V.stress += 200 * stressMulti;
    						break;
    					case "anus3":
    					case "vagina3":
    						sWikifier(`You feel a little lightheaded for a moment.${stressMulti ? "<<gstress>>" : ""}`);
    						V.stress += 100 * stressMulti;
    						break;
    				}
    			});
    			if (arousalGain) sWikifier(`<<arousal ${Math.clamp(arousalGain, 0, 10000)}>>`);
    			br();
    			delete V.daily.parasiteEvent;
    		}
    	}
    
    
    LollipopScythe's avatar
    LollipopScythe committed
    	if (numberOfEarSlime() && V.earSlime.event && !V.statFreeze) {
    
    LollipopScythe's avatar
    LollipopScythe committed
    		if (V.earSlime.event.includes("get sperm into your") && V.earSlime.event.includes("completed") && V.earSlime.eventTimer <= 2) {
    			element(
    				"span",
    				`The slime in your ear is pleased that you completed its task of getting sperm into your ${V.player.vaginaExist ? "vagina" : "anus"}.`,
    				"green"
    			);
    			sWikifier(`<<pain -4>><<stress -6>><<trauma -12>><<lpain>><<lltrauma>><<lstress>>`);
    			br();
    			V.earSlime.event = "";
    		} else if (V.earSlime.event.includes("get your own sperm into your") && V.earSlime.event.includes("completed") && V.earSlime.eventTimer <= 2) {
    			element(
    				"span",
    				`The slime in your ear is pleased that you completed its task of getting your own sperm into your ${V.player.vaginaExist ? "vagina" : "anus"}.`,
    				"green"
    			);
    			sWikifier(`<<pain -4>><<stress -6>><<trauma -12>><<lpain>><<lltrauma>><<lstress>>`);
    			if (V.earSlime.growth >= 100 && V.earSlime.focus === "pregnancy" && V.worn.genitals.name === "naked") {
    				sWikifier(`<span class="purple">A new chastity parasite forms around your penis.</span> <<genitalswear 8>>`);
    				V.worn.genitals.origin = "ear slime";
    			}
    			br();
    			V.earSlime.event = "";
    		} else if (V.earSlime.eventTimer <= 2 || (V.earSlime.noSleep && Time.dayState !== "night")) {
    			if (V.earSlime.startedThreats) {
    				element("span", "The slime in your ear punishes you for failing to complete your task.", "red");
    				sWikifier(`<<ggpain>><<ggtrauma>><<ggstress>><<pain 16>><<stress 12>><<trauma 12>>`);
    				V.earSlime.defyCooldown += 4;
    			} else {
    				element("span", "The slime in your ear is upset you were unable to complete what you said you would do.", "cyan");
    			}
    			br();
    			V.earSlime.event = "";
    			V.earSlime.noSleep = false;
    		}
    	}
    
    	sWikifier("<<integritycheck>><<exposure>>");
    
    	V.orgasmdown -= 1;
    
    	if (V.exposed >= 1 && V.exposedcheck === 1) {
    		V.exposedcheck = 0;
    		sWikifier("You feel self-conscious about your <<nudity>>.");
    		br();
    	}
    
    	if (V.timer >= 1) V.timer--;
    	// V.turnCount++;
    
    	sWikifier("<<bindings>>");
    
    	if (V.worn.genitals.cursed === 1 && V.worn.genitals.integrity <= 0) V.worn.genitals.type.push("broken");
    
    	sWikifier("<<heelsUpdate>>");
    
    	if (V.combat) sWikifier("<<pass 10 seconds>>");
    
    	if (fragment.children.length) br();
    
    	V.menu = 0;
    
    
    Ybyx's avatar
    Ybyx committed
    	if (V.combat === 0 && V.ironmanmode === true) IronMan.scheduledSaves();
    
    LollipopScythe's avatar
    LollipopScythe committed
    
    	return fragment;
    }
    
    Macro.add("effects", {
    	handler() {
    		DOL.Perflog.logWidgetStart("effectsJs");
    		const fragment = effects();
    		this.output.append(fragment);
    		DOL.Perflog.logWidgetEnd("effectsJs");
    	},
    });