Skip to content
TORNLIFE More

Temporary Needle Changes

Started by Chrono208 [367543] on in Suggestions.

0 replies · 13 views · thread synced · 7 days ago · View on torn.com
About this thread

Posts archived: 1 / 1 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
1
Discussion span
→
People posting
1
Likes on archived posts
1
Authority score
23 / 100
Historical score
12 / 100
Story score
25 / 100
Engagement score
24 / 100
Chrono208 [367543]
I noticed that during attacks, i.e. being attacked, that the temporary needles will be used multiple times despite one just being used...

I'm wondering if we could confirm/make a change to this type of attack mechanism.

All I'm saying is that while defending, we implement a input from the user, similar to our percentage sliders of which items to use in the attack settings. So a user defending wont immediately use a serotonin just because it's equipped, instead, we will check how much time is left on the temp, maybe even against user input and if not under that value, we don't waste the temp.

I'll even provide some pseudo code/logic for this. Please don't judge my code too hard, I've only been a coder in industry a few years...

defaultTempNeedleInput = 30; //Seconds
userDefinedNeedleInput = settings.user.getNeedleInput(); //Input from slider

if ( userDefinedNeedleInput == null ) {//if user input isn't set

userDefinedNeedleInput = defaultTempNeedleInput;
}


while (defending) { //you likely have the logic to know when defending so just leaving this and its check alone

if ( ( tempItem.getItem() == "Serotonin" ) || ( tempItem.getItem() == "Epinephrine" ) || ( tempItem.getItem() == "Melatonin" ) ) {

if ( currentNeedleTimer.getTime() <= userDefinedNeedleInput ) {

user.reApplyNeedle( temporary.getCurrentTemporary() );
}

} elseif ( currentNeedleTimer.getTime() > userDefinedNeedleInput ) {

user.unequip( temporary.getCurrentTemporary() );
}