Issue information

Issue ID
#768
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jan 8, 2008 0:14
Last Post
Hercules Elf Bot
Jan 8, 2008 0:14
Confirmation
N/A

Hercules Elf Bot - Jan 8, 2008 0:14

Originally posted by [b]Indiona[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=768

Well, according to irowiki.org forums, it seems that Blacksmiths/Whitesmiths can reach 105% fire resistance (and therefore immunity) by using a fire resist potion and specified gear. I tried this on my server and it just didn't work, the Fire Resist Potion reduced the (already very low) damage not by much, and it seemed that it took only 20% damage off.
So I took a look into the source code:

QUOTE
source: http://svn.eathena.ws/svn/ea/branches/stab...rc/map/battle.c
int battle_attr_fix ...
...
if (tsc && tsc->count)
{
if(tsc->data[SC_ARMOR_ELEMENT])
{
if (tsc->data[SC_ARMOR_ELEMENT]->val1 == atk_elem)
ratio -= tsc->data[SC_ARMOR_ELEMENT]->val2;
else
if (tsc->data[SC_ARMOR_ELEMENT]->val3 == atk_elem)
ratio -= tsc->data[SC_ARMOR_ELEMENT]->val4;
}
if(tsc->data[SC_SPIDERWEB] && atk_elem == ELE_FIRE)
{ // [Celest]
damage <<= 1;
status_change_end(target, SC_SPIDERWEB, -1);
}
}
return damage*ratio/100;


SC_ARMOR_ELEMENT is the effect used in the itemscript for resist potions, so it seems that the -20% reduction is calculated after the other elemental reduction gear and skills (welding mask, valk shield, jakk card, skin tempering), although it should work the same way (subele).

Can somebody investigate this, please?


btw: In the thread at irowiki.org forums, Skin Tempering is said to give 25% fire resistance at it's max level 5. However, eathena seems to give only 20% at level 5

QUOTE
source: http://svn.eathena.ws/svn/ea/branches/stab...rc/map/status.c
if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0) {
sd->subele[0] += skill;
sd->subele[3] += skill*4;
}


Which one is correct?