Page 1 of 1

Incorrect combat power checked for certain damage types?

Posted: Sat Jan 19, 2013 12:15 pm
by omeg
Late night yesterday we had an interesting conversation on IRC with jinsediaoying and greycat. It begun with checking whether Wyrmic's Acid Blind from Dissolve uses Mindpower or something else. After checking the code it turned out to actually be... Spellpower. :?:

The talent itself does this:

Code: Select all

		self:attackTarget(target, (self:getTalentLevel(t) >= 2) and DamageType.ACID_BLIND or DamageType.ACID, self:combatTalentWeaponDamage(t, 0.1, 0.60), true)
		self:attackTarget(target, (self:getTalentLevel(t) >= 4) and DamageType.ACID_BLIND or DamageType.ACID, self:combatTalentWeaponDamage(t, 0.1, 0.60), true)
		self:attackTarget(target, (self:getTalentLevel(t) >= 6) and DamageType.ACID_BLIND or DamageType.ACID, self:combatTalentWeaponDamage(t, 0.1, 0.60), true)
		self:attackTarget(target, (self:getTalentLevel(t) >= 8) and DamageType.ACID_BLIND or DamageType.ACID, self:combatTalentWeaponDamage(t, 0.1, 0.60), true)
		return true
Just applying ACID_BLIND damage type. How does ACID_BLIND work?

Code: Select all

		if target and rng.percent(25) then
			if target:canBe("blind") then
				target:setEffect(target.EFF_BLINDED, 3, {src=src, apply_power=src:combatSpellpower()})
			else
				game.logSeen(target, "%s resists!", target.name:capitalize())
			end
		end
Uh-huh. It seems to always go with Spellpower, no matter what talent invoked the effect. I'm no expert on ToME code and/or LUA, but it does certainly seem fishy. Tying a specific damage type to spellpower/mindpower/whatever seems like a bad idea - it should probably check whatever power the talent itself uses.

Ice Claw does ICE damage on sufficiently high level. It in turn has 25% chance to apply FREEZE type. FREEZE also uses Spellpower... That would explain why I've heard from many people that Ice Claw hardly ever freezes. :|

LIGHTNING_DAZE also uses Spellpower.

Bellowing Roar uses CONFUSION that uses Spellpower again, but the talent itself seems to be handling it appropriately:

Code: Select all

		self:project(tg, self.x, self.y, DamageType.CONFUSION, {
			dur=3,
			dam=40 + 6 * self:getTalentLevel(t),
			power_check=function() return self:combatPhysicalpower() end,
			resist_check=self.combatPhysicalResist,
		}, {type="flame"}) 
It seems to replace the power with Physical Power which is expected.

Also unrelated, LEAVES (from Leaves Tide?) doesn't seem to check for cut immunity.

ACID_DISARM and ACID_CORRODE both use Mindpower which is good.

Still I think reworking the damage types so they use whatever power the invoking talent tells them to might be a better idea. I'll leave that to actual developer to think over though. :D

Re: Incorrect combat power checked for certain damage types?

Posted: Sat Jan 19, 2013 12:24 pm
by SageAcrin
I feel a bit less bad about missing that Acid_Blind uses Spellpower apply, since two of the other skills I didn't make do the same thing. :lol:

But yeah, that should be fixed. My bad on Dissolve, anyways.

Re: Incorrect combat power checked for certain damage types?

Posted: Sun Jan 20, 2013 9:22 am
by supermini
That certainly explains why I was able to freeze a total of 1 mob in the entire game with ice claw. Good catch.

Re: Incorrect combat power checked for certain damage types?

Posted: Sun Jan 20, 2013 9:34 am
by wobbly
I'm guessing it's also checking spellpower with +ice & +lightning daze weapons/shields?

Re: Incorrect combat power checked for certain damage types?

Posted: Thu Jun 06, 2013 2:20 pm
by Beamed
Sorry to bump a kinda-dead thread, but was this resolved?

Re: Incorrect combat power checked for certain damage types?

Posted: Thu Oct 24, 2013 12:32 am
by azrael
*bump*

Re: Incorrect combat power checked for certain damage types?

Posted: Fri Oct 25, 2013 9:13 am
by Kaja Rainbow
I believe I've seen this addressed in a patch note somewhere?