Skip to content
27 changes: 27 additions & 0 deletions chastity/belt/belt_seal_cyclical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { getUserVar, setUserVar } = require("../../functions/usercontext")
const { clearArousal, getArousal, addArousal } = require("../../functions/vibefunctions")

// Seal of Cyclical Time
// This Seal resets the wearer to their initial state every 3 minutes
// No Increase to denial when worn
exports.denialCoefficient = (data) => { return 1 }

// Events
// Randomly reduce the level of arousal by a random percentage, then reduce by a further 10%
exports.onEquip = (data) => {
// Configure base arousal value
if (!getUserVar(data.userID, "base_arousal") || getUserVar(data.userID, "base_arousal") == undefined) setUserVar(data.userID, "base_arousal", getArousal(data.userID) ?? 0);
if (!getUserVar(data.userID, "stasis_timer") || getUserVar(data.userID, "stasis_timer") == undefined) setUserVar(data.userID, "stasis_timer", Date.now());
}

exports.onUnequip = (data) => {
// Add All Stored Arousal at once
addArousal(data.userID, getUserVar(data.userID, "base_arousal"));
setUserVar(data.userID, "base_arousal", undefined);
setUserVar(data.userID, "stasis_timer", undefined);
}

// Tags
exports.tags = ["seal"]
// Name
exports.name = "Seal of Cyclical Time"
28 changes: 28 additions & 0 deletions chastity/belt/belt_seal_falsecalm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const { getUserVar, setUserVar } = require("../../functions/usercontext")
const { getToys, getBaseToy } = require("../../functions/toyfunctions");
const { getArousal, addArousal } = require("../../functions/vibefunctions")

// Seal of False Calm
// This Seal locks arousal at 0, while tracking what the strongest vibe they are wearing is and storing an arousal value relative to that every minute that is applied on being unequipped
// No Increase to denial when worn
exports.denialCoefficient = (data) => { return 1 }
// Arousal locked to 0
exports.maxArousal = (data) => { return 0 }

// Events
// Randomly reduce the level of arousal by a random percentage, then reduce by a further 10%
exports.onEquip = (data) => {
// Configure base arousal value
if (!getUserVar(data.userID, "base_arousal") || getUserVar(data.userID, "base_arousal") == undefined) setUserVar(data.userID, "base_arousal", getArousal(data.userID) ?? 0);
}

exports.onUnequip = (data) => {
// Add All Stored Arousal at once
addArousal(data.userID, getUserVar(data.userID, "base_arousal"));
setUserVar(data.userID, "base_arousal", undefined);
}

// Tags
exports.tags = ["seal"]
// Name
exports.name = "Seal of False Calm"
13 changes: 13 additions & 0 deletions eventfunctions/chastity/belt_seal_cyclical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { getUserVar, setUserVar } = require("../../functions/usercontext")
const { clearArousal, getArousal, addArousal } = require("../../functions/vibefunctions")

let functiontick = async function(userid) {
// Reset Wearer to initial state every 3 mins~
if(Date.now() > (getUserVar(userid, "stasis_timer") + 180000)){
setUserVar(userid, "stasis_timer", Date.now())
clearArousal(userid);
addArousal(userid, getUserVar(userid, "base_arousal"));
}
}

exports.functiontick = functiontick;
23 changes: 23 additions & 0 deletions eventfunctions/chastity/belt_seal_falsecalm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const { getUserVar, setUserVar } = require("../../functions/usercontext")
const { getToys, getBaseToy } = require("../../functions/toyfunctions");
const { getBotOption } = require("../../functions/configfunctions.js");

let functiontick = async function(userid) {
//Tickrate Modifier
tickMod = (getBotOption("bot-timetickrate") / 60000)

if(getToys(userid).length > 0)
{
// Calc Impact of Toys and increment Base_Arousal
getToys(userid).forEach(toy => {
setUserVar(userid, "base_arousal", getUserVar(userid, "base_arousal") + (getBaseToy(toy.type).calcVibeEffect({ userID: userid, intensity: toy.intensity }) * tickMod))
});
}
else
{
// Slow Decrement of Arousal if no Toys
setUserVar(userid, "base_arousal", Math.max(getUserVar(userid, "base_arousal") - tickMod, 0));
}
}

exports.functiontick = functiontick;