summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--conf-tmpl/battle/misc.conf8
-rw-r--r--db/Changelog.txt1
-rw-r--r--db/skill_unit_db.txt2
-rw-r--r--src/map/battle.c32
-rw-r--r--src/map/battle.h5
6 files changed, 41 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 097fe016f..460514886 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/18
+ * Added 5 config settings to adjust damage in pk-mode servers (misc.conf)
+ [Skotlex]
* Fixed mob_max_skilllvl being capped to 11! [Skotlex]
* Rewrote/cleaned up several functions in storage.c [Skotlex]
* Optimized pc_additem comparisons to account for items with more than four
diff --git a/conf-tmpl/battle/misc.conf b/conf-tmpl/battle/misc.conf
index 6e1e7aaa8..2534f1ac8 100644
--- a/conf-tmpl/battle/misc.conf
+++ b/conf-tmpl/battle/misc.conf
@@ -45,6 +45,14 @@ pk_min_level: 55
// players to let them attack each other. 0 disables said limit.
pk_level_range: 0
+// For PK servers. Damage adjustment settings, these follow the same logic
+// as their WoE counterparts (see guild.conf)
+pk_short_attack_damage_rate: 80
+pk_long_attack_damage_rate: 70
+pk_weapon_attack_damage_rate: 60
+pk_magic_attack_damage_rate: 60
+pk_misc_attack_damage_rate: 60
+
// Allow muting of players?
muting_players: yes
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 49d409f88..0804d0ecf 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -27,6 +27,7 @@
=========================
05/18
+ * Corrected LoV's effect range for levels 11+ to range 8. [Skotlex]
* Added new items 2006-04-25 ... 2006-05-16. Thanks to Landarma [Lupus]
05/16
* More Aegis X.2 drop updates [Playtester]
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
index c94b1c3e2..712a3784b 100644
--- a/db/skill_unit_db.txt
+++ b/db/skill_unit_db.txt
@@ -31,7 +31,7 @@
79,0x84, , -1, 1,3000,enemy, 0x008 //PR_MAGNUS#マグヌスエクソシズム
80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#ファイアーピラー
83,0x86, , 0, 3,1000,enemy, 0x000 //WZ_METEOR#メテオストーム
- 85,0x86, , 0,6:6:6:6:6:6:6:6:6:6:25,1250,enemy, 0x008 //WZ_VERMILION#ロードオブヴァーミリオン
+ 85,0x86, , 0,6:6:6:6:6:6:6:6:6:6:8,1250,enemy, 0x008 //WZ_VERMILION#ロードオブヴァーミリオン
87,0x8d, , -1, 0, -1,all, 0x000 //WZ_ICEWALL#アイスウォール
88,0x86, , 0, 2,1000,enemy, 0x000 //WZ_FROSTNOVA#フロストノヴァ
89,0x86, , 0, 5, 450,enemy, 0x008 //WZ_STORMGUST#ストームガスト
diff --git a/src/map/battle.c b/src/map/battle.c
index 6dc56eace..4d856966e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -557,17 +557,21 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
}
}
- if (battle_config.pk_mode && bl->type == BL_PC && damage > 0) {
- if (flag & BF_WEAPON) {
+ if (battle_config.pk_mode && sd && damage > 0)
+ {
+ if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
+ if (flag&BF_WEAPON)
+ damage = damage * battle_config.pk_weapon_damage_rate/100;
+ if (flag&BF_MAGIC)
+ damage = damage * battle_config.pk_magic_damage_rate/100;
+ if (flag&BF_MISC)
+ damage = damage * battle_config.pk_misc_damage_rate/100;
+ } else { //Normal attacks get reductions based on range.
if (flag & BF_SHORT)
- damage = damage * 80/100;
+ damage = damage * battle_config.pk_short_damage_rate/100;
if (flag & BF_LONG)
- damage = damage * 70/100;
+ damage = damage * battle_config.pk_long_damage_rate/100;
}
- if (flag & BF_MAGIC)
- damage = damage * 60/100;
- if(flag & BF_MISC)
- damage = damage * 60/100;
if(damage < 1) damage = 1;
}
@@ -3718,6 +3722,11 @@ static const struct battle_data_short {
{ "gvg_magic_attack_damage_rate", &battle_config.gvg_magic_damage_rate },
{ "gvg_misc_attack_damage_rate", &battle_config.gvg_misc_damage_rate },
{ "gvg_flee_penalty", &battle_config.gvg_flee_penalty },
+ { "pk_short_attack_damage_rate", &battle_config.pk_short_damage_rate },
+ { "pk_long_attack_damage_rate", &battle_config.pk_long_damage_rate },
+ { "pk_weapon_attack_damage_rate", &battle_config.pk_weapon_damage_rate },
+ { "pk_magic_attack_damage_rate", &battle_config.pk_magic_damage_rate },
+ { "pk_misc_attack_damage_rate", &battle_config.pk_misc_damage_rate },
{ "mob_changetarget_byskill", &battle_config.mob_changetarget_byskill},
{ "attack_direction_change", &battle_config.attack_direction_change },
{ "land_skill_limit", &battle_config.land_skill_limit },
@@ -4116,6 +4125,13 @@ void battle_set_defaults() {
battle_config.gvg_misc_damage_rate = 60;
battle_config.gvg_flee_penalty = 20;
battle_config.gvg_eliminate_time = 7000;
+
+ battle_config.pk_short_damage_rate = 80;
+ battle_config.pk_long_damage_rate = 70;
+ battle_config.pk_weapon_damage_rate = 60;
+ battle_config.pk_magic_damage_rate = 60;
+ battle_config.pk_misc_damage_rate = 60;
+
battle_config.mob_changetarget_byskill = 0;
battle_config.attack_direction_change = BL_ALL;
battle_config.land_skill_limit = BL_ALL;
diff --git a/src/map/battle.h b/src/map/battle.h
index 145a14fc8..54ad800e3 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -251,6 +251,11 @@ extern struct Battle_Config {
unsigned short gvg_misc_damage_rate;
unsigned short gvg_flee_penalty;
int gvg_eliminate_time;
+ unsigned short pk_short_damage_rate;
+ unsigned short pk_long_damage_rate;
+ unsigned short pk_weapon_damage_rate;
+ unsigned short pk_magic_damage_rate;
+ unsigned short pk_misc_damage_rate;
unsigned short mob_changetarget_byskill;
unsigned short attack_direction_change;
unsigned short land_skill_limit;