Mary Magdalene
New member
- Messages
- 13
- Points
- 0
Hello, i would like to ask if there's a function where your damage / skill damage will be depending on your distance with the target?
Thank you!
Thank you!
Hey thank you very much for the reply, i'll see that!Well, the skill RL_SLUGSHOT the accuracy depends of distance, try to make something like it.
case KN_CHARGEATK: { int k = (flag-1)/3; //+100% every 3 cells of distance if( k > 2 ) k = 2; // ...but hard-limited to 300%. skillratio += 100 * k; } break;
Thanks for the reply, but i don't understand this formula:The skill Charge Attack of Knight increment the damage by distance, try check in Battle.c this:
case KN_CHARGEATK: { int k = (flag-1)/3; //+100% every 3 cells of distance if( k > 2 ) k = 2; // ...but hard-limited to 300%. skillratio += 100 * k; } break;
int k = (flag-1)/3;
I don't understand much this, I assimilate that this refers to the damage of KN_CHARGEATK:Thanks for the reply, but i don't understand this formula:
Code:int k = (flag-1)/3;
unsigned int dist = distance_bl(src, bl);skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, dist);/* int skill_attack(int attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) */battle->calc_attack(attack_type,src,bl,skill_id,skill_lv,flag&0xFFF);/* struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,uint16 skill_id,uint16 skill_lv,int count) */battle->calc_weapon_attack(bl,target,skill_id,skill_lv,count)/* struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int wflag) */battle->calc_skillratio(BF_WEAPON, src, target, skill_id, skill_lv, skillratio, wflag)/* int battle_calc_skillratio(int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag) */
This is a good idea, with just small modifications like making it 100% chance. I'll be trying this one,Why not makes this skill similar of Blitz Beat? (Autocast)
In skill.c
switch(skill_id) { case 0: { // Normal attacks (no skill used) if( attack_type&BF_SKILL ) break; // If a normal attack is a skill, it's splash damage. [Inkfish] if(sd) { // Automatic trigger of Blitz Beat if (pc_isfalcon(sd) && sd->status.weapon == W_BOW && (temp=pc->checkskill(sd,HT_BLITZBEAT))>0 && rnd()%1000 <= sstatus->luk*3 ) { rate = sd->status.job_level / 10 + 1; skill->castend_damage_id(src,bl,HT_BLITZBEAT,(temp<rate)?temp:rate,tick,SD_LEVEL); }
Add:
if((temp=pc->checkskill(sd,CS_CUSTOMSKILL))>0 && rnd()%1000 <= sstatus->luk*3 ) {skill->castend_damage_id(src,bl,CS_CUSTOMSKILL,temp,tick,0);}
rnd()%1000 <= sstatus->luk*3: This is the chance of autocast, there chance aument of luk*3.
Change this as you wish.
We use essential cookies to make this site work, and optional cookies to enhance your experience.