Jump to content
  • 0
Sign in to follow this  
San

Multi-Hit Critical Implementation

Question

Hi guys. how are you doing?

I'll be brief. I've been trying to implement the Multi-Hit Critical for certain skills since kRO have implemented it a while ago but i've got some erros that i don't know how to fix.

I followed this pull from rathena and tried to reproduce it in Hercules source. Everything looks pretty fine unless this part bellow. Seens like they have a check for every BDT.

// crit check is next since crits always hit on official [helvetica]
    if (is_attack_critical(wd, src, target, skill_id, skill_lv, true))
    wd.type = DMG_CRITICAL;
    if (is_attack_critical(wd, src, target, skill_id, skill_lv, true)) {
    if (wd.type&DMG_MULTI_HIT)
    wd.type = DMG_MULTI_HIT_CRITICAL;
    else
    wd.type = DMG_CRITICAL;
    }

 

So i tried to add the "is_attack_critical" function just to make it work but still getting some errors.
Can anyone Support me?

Bellow you can check everything i've add to my source:

Skill.c

else if (strcmpi(type, "IgnoreDefCards") == 0) {
    if (on) {
     sk->nk |= NK_NO_CARDFIX_DEF;
    } else {
     sk->nk &= ~NK_NO_CARDFIX_DEF;
    }
   } else if (strcmpi(type, "SkillCanCritical") == 0) {

    if (on) {
     sk->nk |= NK_CRITICAL;
    } else {
     sk->nk &= ~NK_CRITICAL;
    }
   }

Skill.h

enum e_skill_nk {
 NK_NONE           = 0x00,
 NK_NO_DAMAGE      = 0x01,
 NK_SPLASH         = 0x02|0x04, // 0x4 = splash & split
 NK_SPLASH_ONLY    = 0x02,
 NK_SPLASHSPLIT    = 0x04,
 NK_NO_CARDFIX_ATK = 0x08,
 NK_NO_ELEFIX      = 0x10,
 NK_IGNORE_DEF     = 0x20,
 NK_IGNORE_FLEE    = 0x40,
 NK_NO_CARDFIX_DEF = 0x80,
 NK_CRITICAL       = 0x100, // Multi-Hit Critical
};

Battle.h

enum battle_dmg_type {
 BDT_NORMAL         = 0,  // Normal attack
 //BDT_PICKUP         = 1,  // Pick up item
 //BDT_SITDOWN      = 2,  // Sit down
 //BDT_STANDUP      = 3,  // Stand up
 BDT_ENDURE         = 4,  // Damage (endure)
 BDT_SPLASH         = 5,  // Splash
 BDT_SKILL         = 6,  // Skill
 //BDT_REPEAT       = 7,  // (repeat damage?)
 BDT_MULTIHIT       = 8,  // Multi-hit damage
 BDT_MULTIENDURE    = 9,  // Multi-hit damage (endure)
 BDT_CRIT           = 10, // Critical hit
 BDT_PDODGE         = 11, // Lucky dodge
 //BDT_TOUCH         = 12, // (touch skill?)
 BDT_MULTI_HIT_CRITICAL   = 13, // Multi-Hit Critical
};

Also, i've added the clif.c and skill_db flags. 

 

Thanks in advance

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.