[1.6.4] Mitosis wrong split chance

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
zczczc1680
Low Yeek
Posts: 8
Joined: Sun Dec 01, 2019 11:08 pm

[1.6.4] Mitosis wrong split chance

#1 Post by zczczc1680 »

Codes in Actor.lua

Code: Select all

if value > 0 and self:knowTalent(self.T_MITOSIS) and self:isTalentActive(self.T_MITOSIS) then
		local t = self:getTalentFromId(self.T_MITOSIS)
		local chance = t.getChance(self, t)
		local perc = math.min(1, 3 * value / self.life)
		if rng.percent(chance * perc) then
			t.spawn(self, t, value * 2)
		end

The tooltip says: format(t.getMaxHP(self, t), t.getChance(self, t)*3/100, t.getMax(self, t), t.getSummonTime(self, t), t.getOozeResist(self, t), xs)


1. The split chance indecated by tooltip is actually 3 times the real (max) chance : chance * perc <= chance * 1 = t.getChance(self, t)
For example, assumed that the chance dispalyed in tooltip says "percentage of your health lost times 1.59" (refer image attachment), one hit with value equals player's current life only has 1.59/3 = 53% chance to spawn an ooze.

2. Interaction with "die_at": if player's life is lower than 0, the chance will be negative(since 3 * value / self.life < 0) and oozes will never spawn.
Attachments
259680_20191208213146_1.png
259680_20191208213146_1.png (190.47 KiB) Viewed 1162 times

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: [1.6.4] Mitosis wrong split chance

#2 Post by Steven Aus »

Yes, please fix.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [1.6.4] Mitosis wrong split chance

#3 Post by darkgod »

Fixed the die_at part; not sure what you mean for the chance?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Steven Aus
Archmage
Posts: 366
Joined: Sat Dec 13, 2014 3:38 pm

Re: [1.6.4] Mitosis wrong split chance

#4 Post by Steven Aus »

From what I can gather from the OP, the chance indicated in the tooltip is different from the actual functional code.

visage
Archmage
Posts: 345
Joined: Fri Jan 10, 2014 4:09 pm

Re: [1.6.4] Mitosis wrong split chance

#5 Post by visage »

zczczc1680 wrote:Codes in Actor.lua

Code: Select all

if value > 0 and self:knowTalent(self.T_MITOSIS) and self:isTalentActive(self.T_MITOSIS) then
		local t = self:getTalentFromId(self.T_MITOSIS)
		local chance = t.getChance(self, t)
		local perc = math.min(1, 3 * value / self.life)
		if rng.percent(chance * perc) then
			t.spawn(self, t, value * 2)
		end
The tooltip says: ... t.getChance(self, t)*3/100
Ok, so if you're hit for 50% of your current life, then...

According to the tooltip, the likelihood of spawning an ooze is 50% * 3 * getChance.

According to the actual code, it's the lower of getChance * 1 and getChance * 3 * 50%.

It looks like the only place that the talent description is misleading is that life lost above 1/3 of your current is ignored in this calculation. (This could be fixed by including getChance before the math.min is applied.)

Am I reading this correctly?

Post Reply