Jump to content
  • 0

Reduce Grand Cross damage to self.


Question

Posted

As title said, how can I reduce Crusader's Grand Cross damage to self but keep the original damage to target?

Im digging through src: skill.c, status.c, battle.c but cant find any clue on how to do this :(

3 answers to this question

Recommended Posts

  • 0
Posted

Im not surte, but i think that is in battle.c

		switch(skill_id) {
			case CR_GRANDCROSS:
			case NPC_GRANDDARKNESS: {
					struct Damage wd = battle_calc_weapon_attack(src,target,skill_id,skill_lv,mflag);

					ad.damage = battle_attr_fix(src, target, wd.damage + ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv) * (100 + 40 * skill_lv) / 100;
					if(src == target) {
						if(src->type == BL_PC)
							ad.damage = ad.damage / 2;
						else
							ad.damage = 0;
					}
				}
				break;

Here is the GC damage, and the self damage is

if(src->type == BL_PC)
							ad.damage = ad.damage / 2;  // GC Damage / 2

Again, not sure.

u should try.

  • 0
Posted

Im not surte, but i think that is in battle.c

		switch(skill_id) {
			case CR_GRANDCROSS:
			case NPC_GRANDDARKNESS: {
					struct Damage wd = battle_calc_weapon_attack(src,target,skill_id,skill_lv,mflag);

					ad.damage = battle_attr_fix(src, target, wd.damage + ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv) * (100 + 40 * skill_lv) / 100;
					if(src == target) {
						if(src->type == BL_PC)
							ad.damage = ad.damage / 2;
						else
							ad.damage = 0;
					}
				}
				break;

Here is the GC damage, and the self damage is

if(src->type == BL_PC)
							ad.damage = ad.damage / 2;  // GC Damage / 2

Again, not sure.

u should try.

Most of the skill's damage come from the cast cost, though.

 

https://github.com/rathena/rathena/blob/master/db/pre-re/skill_require_db.txt

 

// SkillID,HPCost,MaxHPTrigger,SPCost,HPRateCost,[...]

254,0,0,37:44:51:58:65:72:79:86:93:100,20,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_GRANDCROSS

Thank you, by combining your 2 answers, I can control GC damage now  /kis2

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...