summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--conf-tmpl/battle/battle.conf4
-rw-r--r--npc/Changelog.txt3
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/status.c10
6 files changed, 19 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1cb0d30a0..87674842d 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,8 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/13
- * Updated the eA custom spawn sets from Playtester: Juperos lv1, Glast heim
- Sewers/Underground and Geffen dungeon lv3. [Skotlex]
+ * Added battle config sc_def_rate which adjusts natural defense of
+ characters against status changes (see conf/battle/battle.conf). [Skotlex]
* Pet eggs will now not be deleted from the inventory until they arrive
from the char-server. [Skotlex]
* pc_readdb will now print if any classes are missing their exp tables.
diff --git a/conf-tmpl/battle/battle.conf b/conf-tmpl/battle/battle.conf
index 07c4ef1be..c812a133f 100644
--- a/conf-tmpl/battle/battle.conf
+++ b/conf-tmpl/battle/battle.conf
@@ -152,3 +152,7 @@ mob_ghostring_fix: yes
// 1 - 100 - percentage of magic damage reduced only during pvp (or gvg)
gtb_pvp_only: no
+// Adjustment for the natural rate of resistance from status changes.
+// If 50, status defense is halved, and you need twice as much stats to block
+// poison/silence/etc (eg: 200 vit to block poison/stun)
+status_def_rate: 100
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index 26a74bf9b..5da7bd8d4 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -28,6 +28,9 @@ Nexon
Date Added
======
+02/13
+ * Updated the eA custom spawn sets from Playtester: Juperos lv1, Glast heim
+ Sewers/Underground and Geffen dungeon lv3. [Skotlex]
02/09
* Fixed another issue of Cube Room Quest [Lupus]
- Fixed event_6_new_hats.txt wrong ID, thanks to phabyo
diff --git a/src/map/battle.c b/src/map/battle.c
index f096ab117..35bc48183 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3828,6 +3828,7 @@ static const struct battle_data_short {
{ "allow_skill_without_day", &battle_config.allow_skill_without_day}, // [Komurka]
{ "skill_caster_check", &battle_config.skill_caster_check },
{ "status_cast_cancel", &battle_config.sc_castcancel },
+ { "status_def_rate", &battle_config.sc_def_rate },
};
static const struct battle_data_int {
@@ -4217,6 +4218,7 @@ void battle_set_defaults() {
battle_config.skill_caster_check = 1;
battle_config.sc_castcancel = 0;
+ battle_config.sc_def_rate = 100;
}
void battle_validate_conf() {
diff --git a/src/map/battle.h b/src/map/battle.h
index 5511f6bee..fc4af0788 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -419,6 +419,7 @@ extern struct Battle_Config {
unsigned short cell_stack_limit; // [Skotlex]
unsigned short skill_caster_check; // [Skotlex]
unsigned short sc_castcancel; // [Skotlex]
+ unsigned short sc_def_rate; // [Skotlex]
} battle_config;
void do_init_battle(void);
diff --git a/src/map/status.c b/src/map/status.c
index 5841c38d9..3efe688be 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3587,16 +3587,19 @@ int status_get_sc_def(struct block_list *bl, int type)
return 0; //Effect that cannot be reduced? Likely a buff.
}
+ sc_def*=100; //Send it on the interval 0->10000
+ if (battle_config.sc_def_rate != 100)
+ sc_def = sc_def*battle_config.sc_def_rate/100;
+
sc = status_get_sc(bl);
if (sc && sc->count)
{
if (sc->data[SC_SCRESIST].timer != -1)
- sc_def += sc->data[SC_SCRESIST].val1; //Status resist
+ sc_def += 100*sc->data[SC_SCRESIST].val1; //Status resist
else if (sc->data[SC_SIEGFRIED].timer != -1)
- sc_def += sc->data[SC_SIEGFRIED].val2; //Status resistance.
+ sc_def += 100*sc->data[SC_SIEGFRIED].val2; //Status resistance.
}
- sc_def*=100; //Send it on the interval 0->10000
if(bl->type == BL_MOB && sc_def > 5000)
sc_def = 5000; //Are mobs really capped to 50% defense?
@@ -3726,6 +3729,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (race)
rate -= rate*race/10000;
}
+
if (!(rand()%10000 < rate))
return 0;
}