Jump to content
  • 0

Skill Modifying: TF_DOUBLE and TF_MISS


darkpatow

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  07/09/20
  • Last Seen:  

Hi,

My idea is to do the following:

a) TF_DOUBLE [Double Attack]:

For each skill level, it gives +1% ASPD (and it still gives double attack normally).

So in level 10, it'd give +10% ASPD.

b) TF_MISS [Improve Flee]:

For each skill level, you can have +1 monster attacking you, without suffering flee penalty (and it still gives the same flee bonus)

About this flee penalty, there's an option in battle.conf

agi_penalty_count: 3

So the default value is 3, which means that, if the number of monsters attacking you is >= 3, you lose x% flee for each monster, counting from the 3rd (inclusive).

What i'd like to change is, for example, if you have Improve Flee level 1, you only lose flee counting from the 4th monster (inclusive); if you have Improve Flee level 10, you only lose flee counting from the 13th monster (inclusive).

 

Any help will be appreciated!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

TF_DOUBLE doesn't look like it has a status attached, but status changes are how some of the easier aspd boosts work (like "Madness Canceller / Last Stand" for Gunslinger). Since I don't feel like coding in an entirely new status, you could look for this in status.cpp:
 

	if ((skill_lv = pc_checkskill(sd,SA_ADVANCEDBOOK)) > 0 && sd->status.weapon == W_BOOK)
		val += (skill_lv - 1) / 2 + 1;


And add this below it:

	if ((skill_lv = pc_checkskill(sd,TF_DOUBLE)) > 0)
		val += skill_lv;


And then look for this in status.cpp as well:
 

	if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK)
		base_status->aspd_rate -= 5*skill;


And add this below:
 

	if((skill=pc_checkskill(sd,TF_DOUBLE))>0 )
		base_status->aspd_rate -= 10*skill;



This should add aspd like Sage's "Advanced Book / Study" does, but give a 1% boost instead of the 0.5% boost.

- - - - -


For TF_MISS, in battle.cpp look for:
 

		if(attacker_count >= battle_config.agi_penalty_count) {
			if (battle_config.agi_penalty_type == 1)
				flee = (flee * (100 - (attacker_count - (battle_config.agi_penalty_count - 1)) * battle_config.agi_penalty_num)) / 100;
			else //assume type 2: absolute reduction
				flee -= (attacker_count - (battle_config.agi_penalty_count - 1)) * battle_config.agi_penalty_num;
			if(flee < 1)
				flee = 1;
		}
	}


And change it to this:
 

		if(attacker_count >= (battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS))) {
			if (battle_config.agi_penalty_type == 1)
				flee = (flee * (100 - (attacker_count - ((battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS)) - 1)) * battle_config.agi_penalty_num)) / 100;
			else //assume type 2: absolute reduction
				flee -= (attacker_count - ((battle_config.agi_penalty_count + pc_checkskill(sd,TF_MISS)) - 1)) * battle_config.agi_penalty_num;
			if(flee < 1)
				flee = 1;
		}
	}


That should cause TF_MISS to affect both how many monsters attack you before you take a penalty, and how big the penalty is (if you didn't write it like this, then let's say you have 11 extra monsters attacking and you just passed the TF_MISS bonus protection, instead of suffering a 5% percent flee penalty for 1 extra monster, you would suffer a 55% flee penalty for 11 extra monsters).

Of course, I haven't tested these, and I'm a bit newer at coding. Feel free to try them out though. (This is also based off of the version of code that I have, so it might be a bit different on the newer updates.)

Edited by Humble_Bee
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...