#472 Spell resists need to be looked at/implemented

닫힘
neatz091 년 전을 오픈 · 2개의 코멘트
neatz09 코멘트됨, 1 년 전
아직 콘텐츠가 없습니다.
image 코멘트됨, 10 달 전
협업자

so if I recall this was about the way the resistance code worked in the Combat file

the resistances (heat, cold, so on) are all utilized for damage reduction when you are hit and that was the "broken" part I believe per @neatz09

if (victim->IsEntity())
    bonus -= ((Entity*)victim)->GetDamageTypeResistPercentage(damage_type);


Entity* entity_victim = (Entity*)victim;
float chance = 80 + bonus; //80% base chance that the victim will get hit (plus bonus)
sint16 roll_chance = 100;
if(skill)
    roll_chance -= skill->current_val / 25;

we have support for spell avoidance that is "resisting" outright which should work fine:

    skill = entity_victim->GetSkillByName("Spell Avoidance", true);
    if(skill)
        chance -= skill->current_val / 25;
    if(rand()%roll_chance >= chance) {
        return DAMAGE_PACKET_RESULT_RESIST; //successfully resisted 
    }
so if I recall this was about the way the resistance code worked in the Combat file the resistances (heat, cold, so on) are all utilized for damage reduction when you are hit and that was the "broken" part I believe per @neatz09 if (victim->IsEntity()) bonus -= ((Entity*)victim)->GetDamageTypeResistPercentage(damage_type); Entity* entity_victim = (Entity*)victim; float chance = 80 + bonus; //80% base chance that the victim will get hit (plus bonus) sint16 roll_chance = 100; if(skill) roll_chance -= skill->current_val / 25; we have support for spell avoidance that is "resisting" outright which should work fine: skill = entity_victim->GetSkillByName("Spell Avoidance", true); if(skill) chance -= skill->current_val / 25; if(rand()%roll_chance >= chance) { return DAMAGE_PACKET_RESULT_RESIST; //successfully resisted }
image 코멘트됨, 1 개월 전
협업자

for this we need to setup Entity::CalculateDamageAmount to reduce damage for spell based damage. We already reduce melee damage with mitigation.

for this we need to setup Entity::CalculateDamageAmount to reduce damage for spell based damage. We already reduce melee damage with mitigation.
image 1 주 전가 Close
로그인하여 이 대화에 참여
로딩중...
취소
저장
아직 콘텐츠가 없습니다.