Jump to content
  • 0

Damage SPIRALPERCE


hanzobr

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  08/20/14
  • Last Seen:  

Hi,
I would like to increase the damage of Spiral Spear
I'm using Pre-RE, is this modification line correct?
If yes, where can I make the change to increase the damage?

case LK_SPIRALPIERCE:
        case ML_SPIRALPIERCE:
            if (sd) {
                short index = sd->equip_index[EQI_HAND_R];

                if (index >= 0 &&
                    sd->inventory_data[index] &&
                    sd->inventory_data[index]->type == IT_WEAPON)
                    wd->damage = sd->inventory_data[index]->weight*8/100; //80% of weight

                ATK_ADDRATE(wd->damage, wd->damage2, 50*skill_lv); //Skill modifier applies to weight only.
            } else {
                wd->damage = battle_calc_base_damage(src, sstatus, &sstatus->rhw, sc, tstatus->size, 0); //Monsters have no weight and use ATK instead
            }

            i = sstatus->str/10;
            i*=i;
            ATK_ADD(wd->damage, wd->damage2, i); //Add str bonus.
            switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection?
                case SZ_SMALL: //Small: 125%
                    ATK_RATE(wd->damage, wd->damage2, 25);
                    break;
                //case SZ_MEDIUM: //Medium: 100%
                case SZ_BIG: //Large: 75%
                    ATK_RATE(wd->damage, wd->damage2, 75);
                    break;
            }


 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

2 hours ago, hanzobr said:

Hi,
I would like to increase the damage of Spiral Spear
I'm using Pre-RE, is this modification line correct?
If yes, where can I make the change to increase the damage?


case LK_SPIRALPIERCE:
        case ML_SPIRALPIERCE:
            if (sd) {
                short index = sd->equip_index[EQI_HAND_R];

                if (index >= 0 &&
                    sd->inventory_data[index] &&
                    sd->inventory_data[index]->type == IT_WEAPON)
                    wd->damage = sd->inventory_data[index]->weight*8/100; //80% of weight

                ATK_ADDRATE(wd->damage, wd->damage2, 50*skill_lv); //Skill modifier applies to weight only.
            } else {
                wd->damage = battle_calc_base_damage(src, sstatus, &sstatus->rhw, sc, tstatus->size, 0); //Monsters have no weight and use ATK instead
            }

            i = sstatus->str/10;
            i*=i;
            ATK_ADD(wd->damage, wd->damage2, i); //Add str bonus.
            switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection?
                case SZ_SMALL: //Small: 125%
                    ATK_RATE(wd->damage, wd->damage2, 25);
                    break;
                //case SZ_MEDIUM: //Medium: 100%
                case SZ_BIG: //Large: 75%
                    ATK_RATE(wd->damage, wd->damage2, 75);
                    break;
            }


 

Hello you better use db/skill_damage_db.txt you dont need to touch source for this and easy to implement

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  416
  • Reputation:   73
  • Joined:  05/16/19
  • Last Seen:  

but if you wanna break it just listen to me 

 

case LK_SPIRALPIERCE:
        case ML_SPIRALPIERCE:
            if (sd) {
                short index = sd->equip_index[EQI_HAND_R];

                if (index >= 0 &&
                    sd->inventory_data[index] &&
                    sd->inventory_data[index]->type == IT_WEAPON)
                    wd->damage = sd->inventory_data[index]->weight*8/100; //80% of weight

                ATK_ADDRATE(wd->damage, wd->damage2, 50*skill_lv); //Skill modifier applies to weight only.
            } else {
                wd->damage = battle_calc_base_damage(src, sstatus, &sstatus->rhw, sc, tstatus->size, 0); //Monsters have no weight and use ATK instead
            }

            i = sstatus->str/10;
            i*=i;
            ATK_ADD(wd->damage, wd->damage2, i); //Add str bonus.
            switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection?
                case SZ_SMALL: //Small: 125%
                    ATK_RATE(wd->damage, wd->damage2, 25);
                    break;
                //case SZ_MEDIUM: //Medium: 100%
                case SZ_BIG: //Large: 75%
                    ATK_RATE(wd->damage, wd->damage2, 75);
                    break;
            }
                    wd->damage = sd->inventory_data[index]->weight*8/100; //80% of weight

modify weight 

  i = sstatus->str/10;
            i*=i;
            ATK_ADD(wd->damage, wd->damage2, i); //Add str bonus.

str mod

 

 case SZ_SMALL: //Small: 125%
                    ATK_RATE(wd->damage, wd->damage2, 25);
                    break;
                //case SZ_MEDIUM: //Medium: 100%
                case SZ_BIG: //Large: 75%
                    ATK_RATE(wd->damage, wd->damage2, 75);
                    break;

size mod

 

the rest doesnt really matter beyond changing the 

battle_calc_base_damage

portion 

battle.c

				case LK_SPIRALPIERCE:
				case ML_SPIRALPIERCE:
					skillratio += 50 * skill_lv;

stuff about flags for cards involved but i dont think you need it 

Link to comment
Share on other sites

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.

×
×
  • Create New...