* Follow-up cd9a776: documentation edits.

Signed-off-by: Euphy <euphy@rathena.org>
This commit is contained in:
Euphy 2013-08-30 17:03:08 -04:00
parent 0fe7006883
commit 1c7c002e46
7 changed files with 89 additions and 73 deletions

View File

@ -1,27 +1,23 @@
// Manage skill damage database
// ----------------------------------------------
// rAthena dev team
// ----------------------------------------------
// Credits:
// [Lilith]
// [Cydh]
// ----------------------------------------------
// <SkillName>,<Caster>,<Map>,<Damage against Players>{,<Damage against Mobs>{,<Damage against Bosses>{,<Damage against Other>}}}
// ----------------------------------------------
// Caster: The adjustment only works if the caster is (bitmask)
// Skill Damage Adjustment Database
//
// Structure of Database:
// SkillName,Caster,Map,Damage against Players{,Damage against Mobs{,Damage against Bosses{,Damage against Other}}}
//
// Caster: The groups for which the adjustment takes effect. (bitmask)
// 1 = Player
// 2 = Monster
// 4 = Pet
// 8 = Homunculus
// 16 = Mercenary
// 32 = Elemental
//
// Map:
// 1 - Normal (the maps that aren't classified as these maps below)
// 2 - PVP
// 4 - GVG
// 8 - Battlegrounds
// 16 - 'skill_damage' mapflag
// Restricted zones - they're configured by 'restricted <numberCastermapflag
// Restricted zones - they're configured by 'restricted <number>' mapflag
// 32 - Zone 1
// 64 - Zone 2
// 128 - Zone 3
@ -29,18 +25,12 @@
// 512 - Zone 5
// 1024 - Zone 6
// 2048 - Zone 7
// Damage adjustments:
// Using value between -100 and 100000
// minus value that mean normal damage will be decreased, and positive is
// otherwise. 0 = no additional rate
// ----------------------------------------------
//
// Notes:
// Damage is percentage between -100 and 100000.
// Negative values decrease damage and positive values increase it (0 = no change).
//
// Examples:
// 1. Mammonite: Normal maps, +50% player vs players, nothing else
//MC_MAMMONITE,1,1,50
// 2. Adoramus: PvP & GvG maps, if the caster is player: +50% vs player, +0% vs
// mob, +10% vs boss mob, +15% vs other
//AB_ADORAMUS,1,6,50,0,10,15
// 3. Asura Strike: Only deals half damage (-50%) if player vs player at PvP &
// GvG maps
//MO_EXTREMITYFIST,1,6,-50
// ----------------------------------------------
// MC_MAMMONITE,1,1,50 // In normal maps, players deal +50% damage to other players with Mammonite.
// MO_EXTREMITYFIST,1,6,-50 // In PVP and GVG, players deal -50% (half) damage to other players with Asura Strike.
// AB_ADORAMUS,1,6,50,0,10,15 // In PVP and GVG, players deal +50% damage to other players, +0% to mobs, +10% to bosses, and +15% to other with Adoramus.

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 20130706
//= 20130830
//===== Description: =========================================
//= List of available mapflags and their functions.
//============================================================
@ -283,36 +283,31 @@ Notes:
---------------------------------------
*skill_damage {<skill_name>,<caster>,<damage1>,<damage2>,<damage3>,<damage4>}
*skill_damage {<skill_name>,<caster>,<damage1>,{<damage2>,{<damage3>,{<damage4>}}}}
Enable skill damage adjustment on this map that used for 'Map' field on
skill_damage_db.txt.
Enables skill damage adjustment on a map. All adjustments in 'db/skill_damage_db.txt'
for 'Map' type 16 will be applied.
For advanced settings, this mapflag can be used to adjust damage of 'skill' if the caster
is 'caster', the damage will be added or reduced 'damage'% from normal damage.
<skill> is name of skill, look at skill_db.txt, not the skill id. Example SM_BASH.
<caster> is to decide who can trigger this adjustment, the invoker not only for player.
Using bitmask, and the available casters are:
1 = Player
2 = Monster
4 = Pet
8 = Homunculus
16 = Mercenary
32 = Elemental
<damage1> addition rate to against player
<damage2> addition rate to against normal monster
<damage3> addition rate to against boss monster
<damage4> addition rate to against other (homunculus, mercenary, pet, and elemetal)
This mapflag can also be used to adjust the damage of one skill by a percentage:
- skill_name:
Name of the skill in 'db/(pre-)re/skill_db.txt' (ex. SM_BASH).
To adjust all skill damage, write "all" (without quotes).
- caster: the groups for which the adjustment takes effect. (bitmask)
1 = Player
2 = Monster
4 = Pet
8 = Homunculus
16 = Mercenary
32 = Elemental
- damage: percent adjustment rate (between -100 and 100000).
1 = against player
2 = against normal monster
3 = against boss monster
4 = against other (homunculus, mercenary, pet, elemental)
Notes:
- If you want to adjust X skill, you need at least define 'skill' (skill name), 'caster',
and 'damage1'
- This mapflag can be used to adjust all skill damages, put "all" (without quotes) at
'skill' column
- Please put the damages value between -100 and 100000. 0 means no addition.
- One map can contains up to 5 skills adjustment
(max. value is defined on map.h, MAX_MAP_SKILL_MODIFIER)
- You MUST enable ADJUST_SKILL_DAMAGE in 'src/config/core.h' for this mapflag to take effect.
- Each map can contain up to 5 adjustments (MAX_MAP_SKILL_MODIFIER in 'src/map/map.h').
---------------------------------------
@ -360,7 +355,7 @@ Allows usage of item Neuralizer (ID 12213).
*jexp <rate>
Changes the base and job experience rates on a map.
<ratecasters given as a percentage (i.e. 100 = 1x EXP). This takes into account the modifiers
<rate> is given as a percentage (i.e. 100 = 1x EXP). This takes into account the modifiers
'base_exp_rate' and 'job_exp_rate' in '/conf/battle/exp.conf'.
---------------------------------------

View File

@ -6072,7 +6072,7 @@ specified.
---------------------------------------
*setmapflag "<map name>",<flag>{,<zone>};
*setmapflag "<map name>",<flag>{,<zone>{,<type>}};
This command marks a specified map with the given map flag, which will alter the
behavior of the map. A full list of mapflags is located in 'db/const.txt' with
@ -6087,7 +6087,15 @@ skills or open up trade deals (mf_notrade, mf_novending, mf_noskill, mf_noicewal
current weather effects (mf_snow, mf_fog, mf_sakura, mf_leaves, mf_rain, mf_clouds,
mf_fireworks) and whether night will be in effect on this map (mf_nightenabled).
The zone optional parameter is used to set the zone for restricted mapflags.
The optional parameter 'zone' is used to set the zone for restricted mapflags.
For the 'skill_damage' mapflag, 'zone' functions as 'value' (-100 to 100000) and
'type' can be:
1: damage against players
2: damage against mobs
3: damage against bosses
4: damage against other
5: caster type
---------------------------------------
@ -6096,15 +6104,23 @@ The zone optional parameter is used to set the zone for restricted mapflags.
This command removes a mapflag from a specified map.
See 'setmapflag' for a list of mapflags.
The zone optional parameter is used to remove the zone from restricted mapflags.
The optional parameter 'zone' is used to remove the zone from restricted mapflags.
---------------------------------------
*getmapflag("<map name>",<flag>)
*getmapflag("<map name>",<flag>{,<type>})
This command checks the status of a given mapflag and returns the mapflag's state.
0 means OFF, and 1 means ON. See 'setmapflag' for a list of mapflags.
The optional parameter 'type' is used in the 'skill_damage' mapflag:
0: if mapflag is set (default)
1: damage against players
2: damage against mobs
3: damage against bosses
4: damage against other
5: caster type
---------------------------------------
*setbattleflag "<battle flag>",<value>;

View File

@ -1,3 +1,20 @@
//===== rAthena Script =======================================
//= Mapflag: Adjust Skill Damage.
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Enables skill damage adjustment. All adjustments in
//= skill_damage_db.txt for 'Map' type 16 will be applied.
//= See the mapflag documentation for details about extra
//= parameters.
//=
//= You MUST enable ADJUST_SKILL_DAMAGE in 'src/config/core.h'
//= for this mapflag to take effect.
//===== Additional Comments: =================================
//= 1.0 Initial script. [Cydh]
//============================================================
//<mapname> mapflag skill_damage {<skill_name>,<caster>,<damage1>,<damage2>,<damage3>,<damage4>}
//------------------------------------------------------------

View File

@ -1,19 +1,17 @@
// --------------------------------------------------------------
// - Map Flags -
// --------------------------------------------------------------
npc: npc/mapflag/battleground.txt
npc: npc/mapflag/nopvp.txt
npc: npc/mapflag/gvg.txt
npc: npc/mapflag/jail.txt
npc: npc/mapflag/night.txt
npc: npc/mapflag/nightmare.txt
npc: npc/mapflag/nobranch.txt
npc: npc/mapflag/noicewall.txt
npc: npc/mapflag/nomemo.txt
npc: npc/mapflag/nopenalty.txt
npc: npc/mapflag/nopvp.txt
npc: npc/mapflag/noreturn.txt
npc: npc/mapflag/nosave.txt
npc: npc/mapflag/noteleport.txt
npc: npc/mapflag/noreturn.txt
npc: npc/mapflag/noskill.txt
npc: npc/mapflag/nowarp.txt
npc: npc/mapflag/nowarpto.txt
@ -21,7 +19,9 @@ npc: npc/mapflag/nowarpto.txt
npc: npc/mapflag/pvp.txt
npc: npc/mapflag/pvp_noparty.txt
npc: npc/mapflag/pvp_noguild.txt
npc: npc/mapflag/restricted.txt
npc: npc/mapflag/night.txt
npc: npc/mapflag/reset.txt
npc: npc/mapflag/restricted.txt
npc: npc/mapflag/battleground.txt
npc: npc/mapflag/skill_damage.txt
npc: npc/mapflag/town.txt

View File

@ -59,12 +59,12 @@
/// Uncomment to enable real-time server stats (in and out data and ram usage).
//#define SHOW_SERVER_STATS
/// Uncomment to enable skill's damage adjustments [Cydh]
/// By enabling this, db/skill_damage.txt and skill_damage mapflag will be active to add
/// damage rate of specified skill againts player, monster, boss-monster, or other.
/// skill_damage mapflag is used to adjust damage of specified skill at specified map
/// Uncomment to enable skills damage adjustments
/// By enabling this, db/skill_damage.txt and the skill_damage mapflag will adjust the
/// damage rate of specified skills.
//#define ADJUST_SKILL_DAMAGE
/// This MAX_SKILL_DAMAGE_RATE is used to cap max the rate
/// The skill damage adjustment rate is capped at 100000.
#ifdef ADJUST_SKILL_DAMAGE
#define MAX_SKILL_DAMAGE_RATE 100000
#endif

View File

@ -18285,9 +18285,7 @@ static bool skill_parse_row_changematerialdb(char* split[], int columns, int cur
}
/*==========================================
* Manage Skill Damage database
* Credits:
[Lilith]
* Manage Skill Damage database [Lilith]
*------------------------------------------*/
#ifdef ADJUST_SKILL_DAMAGE
static bool skill_parse_row_skilldamage(char* split[], int columns, int current)