[0.4.16] Succubus Milk cock shrinking

Prent

Well-Known Member
Aug 8, 2021
182
126
29
While you posses the Well Hung trait, Succubus Milk will continually try to shrink your dick every time you drink, even after reaching the minimum size of 3.9 inches. I attempted this with more that 40 consecutive Succubus Milks and received the message every time.
 

Arpie

Well-Known Member
Oct 31, 2018
51
17
54
4 -> 3 without WellHung
6 -> 4.8 with WellHung
4.8 -> 3.9000000000000004 with WellHung
A pleasant cool sensation spreads through your loins. Somehow, despite the chill, your erect member throbs increasingly harder and you end up stripping out of your plain underwear to get a better look at what’s happening. In awe you stare as the glowing member slims and shrinks, decreasing about an inch in size before the transformation ends. It’s quite the cute little prick right now, not at all intimidating.
Rather than disappointed, you actually find it a bit better like this. Too much cock will take away the attention from the rest of your beautiful body after all.
3 -> 3 without WellHung
There was no effect!
3.9000000000000004 -> 3.9000000000000004 with WellHung
3.9 -> 3.9 with WellHung (see below)
A pleasant cool sensation spreads through your loins. Somehow, despite the chill, your erect member throbs increasingly harder and you end up stripping out of your plain underwear to get a better look at what’s happening. In awe you stare as the glowing member slims and shrinks, decreasing about an inch in size before the transformation ends. It’s quite the cute little prick right now, not at all intimidating.
Rather than disappointed, you actually find it a bit better like this. Too much cock will take away the attention from the rest of your beautiful body after all.

The problem is that what is calculated as 3 * 1.3 and displayed as 3.9 in the description is actually 281024616747918980/2*56 , not 281024616747918950.4 /2*56 -- a difference of about 4.1 * 10-16

As an experiment, I set it to a slightly smaller number which displays as 3.9: pc.cocks[0].lengthRaw = 8782019273372467.0 / 2**51

And I get the same message.

So I think there are two bugs:
1) User expects SuccubusMilk to remove cocks, when instead it only is coded to shrink to a minimum size (PinkEgg on the other hand will remove)
2) A mismatch the use of a minimum length between ITEMS.SuccubusMilk.prototype.cock() which doesn't know about PERKS.WellHung and Tf.TfDemonicShrinkCock() which uses Cock.prototype.adjustSize() which respects PERKS.WellHung results in transformation messages when no change is made.

I don't know what the code looks like in the original prior to optimization, but I propose for ITEMS.SuccubusMilk.prototype.cock()

JavaScript:
ITEMS.SuccubusMilk.prototype.cock = function(targetCreature) {
    var minimumLength = targetCreature.hasPerk(PERKS.WellHung) ? 3 * 1.3 : 3 ;
    var transformList = [];
    targetCreature.realCocks().forEach(function(targetCock) {
        if ( targetCock.lengthBase() > minimumLength )
            transformList.push(function() {
                return Tf.TfDemonicShrinkCock(targetCreature, {
                    TFcock: targetCock
                });
            });
    });
    if (transformList.length <= 0)
        return true;
    return randCollection(transformList)();
}
 
Last edited:
  • Like
Reactions: Lone Wolf115

Arpie

Well-Known Member
Oct 31, 2018
51
17
54
The more Object-Oriented way to solve this is by letting the cock do the math.
This is slower but that should be insignificant as it is called only in the case of a UI click for up to 2 cocks; and it has the advantage of future-proofing in case a future creature perk or status effect protects against shrinkage.

JavaScript:
ITEMS.SuccubusMilk.prototype.cock = function(targetCreature) {
    const minimumLength = 3 ;
    var transformList = [];
    targetCreature.realCocks().forEach(function(targetCock) {
        if ( targetCock.canAdjustDown(minimumLength) )
            transformList.push(function() {
                return Tf.TfDemonicShrinkCock(targetCreature, {
                    TFcock: targetCock
                });
            });
    });
    if (transformList.length <= 0)
        return true;
    return randCollection(transformList)();
}