- Added battle config sc_def_rate which adjusts natural defense of characters against status changes.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5275 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-02-13 21:37:10 +00:00
parent 72347df4fa
commit ea91239d66
6 changed files with 19 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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);

View File

@ -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;
}