Jump to content
  • 0

Map Flag Like Woe Damage


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

hello

can i know how to make some makeflag reduce damage like woe?

like this

// Melee damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)

gvg_short_attack_damage_rate: 80

// Ranged damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)

gvg_long_attack_damage_rate: 80

// Weapon skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)

gvg_weapon_attack_damage_rate: 60

// Magic skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)

gvg_magic_attack_damage_rate: 60

// Misc skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)

gvg_misc_attack_damage_rate: 60

// Flee penalty on gvg grounds. Official value is 20 (Note 2)

// NOTE: It's %, not absolute, so 20 is -20% of your total flee

gvg_flee_penalty: 20

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   5
  • Joined:  02/26/12
  • Last Seen:  

I think it's not a script request but a source request, the damage for WoE are calculate in src/map/battle.c

int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag)[/color]

{
struct mob_data* md = BL_CAST(BL_MOB, bl);
int class_ = status_get_class(bl);

if (!damage) //No reductions to make.
	return 0;

if(md && md->guardian_data) {
	if(class_ == MOBID_EMPERIUM && flag&BF_SKILL) {
	//Skill immunity.
		switch (skill_num) {
#ifndef RENEWAL
		case MO_TRIPLEATTACK:
#endif
		case HW_GRAVITATION:
			break;
		default:
			return 0;
		}
	}
	if(src->type != BL_MOB) {
		struct guild *g=guild_search(status_get_guild_id(src));
		if (!g) return 0;
		if (class_ == MOBID_EMPERIUM && guild_checkskill(g,GD_APPROVAL) <= 0)
			return 0;
		if (battle_config.guild_max_castles && guild_checkcastles(g)>=battle_config.guild_max_castles)
			return 0; // [MouseJstr]
	}
}

switch (skill_num) {
//Skills with no damage reduction.
case PA_PRESSURE:
case HW_GRAVITATION:
case NJ_ZENYNAGE:
	break;
default:
	/* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
	if (md && md->guardian_data) {
		damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
	}
	*/
	if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [skotlex]
		if (flag&BF_WEAPON)
			damage = damage * battle_config.gvg_weapon_damage_rate/100;
		if (flag&BF_MAGIC)
			damage = damage * battle_config.gvg_magic_damage_rate/100;
		if (flag&BF_MISC)
			damage = damage * battle_config.gvg_misc_damage_rate/100;
	} else { //Normal attacks get reductions based on range.
		if (flag & BF_SHORT)
			damage = damage * battle_config.gvg_short_damage_rate/100;
		if (flag & BF_LONG)
			damage = damage * battle_config.gvg_long_damage_rate/100;
	}
	if(!damage) damage  = 1;
}
return damage;
}

This part should be edited/duplicated if you want some map flags with differents damage values

Edited by Ronaldo07
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  224
  • Reputation:   22
  • Joined:  03/23/12
  • Last Seen:  

Simply add this:

http://rathena.org/board/topic/62238-manage-skill-damage-11/

So you can control skill damage in normal maps, pvp, BG and WoE separately. :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

how to add to mapflag like bat_a01?

coz me use the map for gvg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

Just change bat_a01 to be a gvg map in conf/mapflag/gvg.txt.

Add line:

bat_a01<TAB>mapflag<SPACE>gvg

So any adjustment you make in the file from the first post will reflect in this map.

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