Unfortunately there´s no Tutorial anywhere in regards to this. I´ve only found alot of Threads from people who seem to have the same Question, unfortunately again any answer posted doesn't help.
In short, i would like to give certain Monster Elemental Damage Types so that the Resistances like Lightning, Dark etc reduce the Damage taken.
As far as i can tell all of this is already implemented, my battle.cpp as an example:
//[ mob -> PC ] ¿ø¼Ò ¼Ó¼º ¹æ¾î Àû¿ë
//2013/01/17
//¸ó½ºÅÍ ¼Ó¼º°ø°Ý µ¥¹ÌÁöÀÇ 30%¿¡ ÇØ´çÇÏ´Â ¼öÄ¡¿¡¸¸ ÀúÇ×ÀÌ Àû¿ëµÊ.
if (pkAttacker->IsNPC() && pkVictim->IsPC())
{
if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ELEC))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ELEC)) / 100;
else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_FIRE))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_FIRE)) / 100;
else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ICE))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ICE)) / 100;
else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_WIND))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_WIND)) / 100;
else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_EARTH))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_EARTH)) / 100;
else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_DARK))
iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_DARK)) / 100;
}
return iAtk;
My Question is, how do i give certain Monster lightning Damage respectively an aditional Race Flag ?
(as an example, certain Monster are weak against Devil and their Damage gets reduce by Lightning Resistance )
In Mysql, just adding ATT_ELEC as a new Raceflag in the mob_proto under setRaceFlag doesn't work.
Thanks in advance.