summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-19 04:36:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-19 04:36:44 +0000
commit90e11bb615a4df66fcc3b538fffe6595bca05015 (patch)
tree291d75b907783d4d89b23a7bebef3baf142e9799 /src/map/battle.c
parent6ce5dacb5b15f16ff4c672596c091a41a190d687 (diff)
downloadhercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.gz
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.bz2
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.xz
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.zip
- Rewrote the jail logic to always use a status change. This means that the character's save point is not changed when jailed, and the char is always warped back to the point where it was before being jailed on unjail.
- Made pc_setpos fail if you are jailed, effectively blocking you from being moved out of the jail map for the duration of jail. - Modified @adjcmdlvl so you can't set a command to require higher level than yourself, and so you can't edit the level of a command which is higher than your own. - Corrected attack_attr_none setting disabling elemental resist cards. - Added missing cap check of 100% to drop rate configs for heal/use/adddrop (cards)/treasures. - Corrected Autoblitz yelling the skill name if the attack splashed. - Corrected Dispell removing Jailed status. - Corrected being able to revive with 0 hp. - Modified the "Restart" code so that it makes you stand on spot when pc_setpos fails to move you back to your originating location. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10028 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c0b50b444..dd18d38bd 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -987,9 +987,6 @@ static struct Damage battle_calc_weapon_attack(
if (skill_num == GS_GROUNDDRIFT)
s_ele = s_ele_ = wflag; //element comes in flag.
- if (s_ele == ELE_NEUTRAL && (battle_config.attack_attr_none&src->type))
- nk|=NK_NO_ELEFIX;
-
if(!skill_num)
{ //Skills ALWAYS use ONLY your right-hand weapon (tested on Aegis 10.2)
if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0)
@@ -1813,7 +1810,8 @@ static struct Damage battle_calc_weapon_attack(
if(skill_num==TF_POISON)
ATK_ADD(15*skill_lv);
- if (!(nk&NK_NO_ELEFIX))
+ if (!(nk&NK_NO_ELEFIX) ||
+ (s_ele == ELE_NEUTRAL && (battle_config.attack_attr_none&src->type)))
{ //Elemental attribute fix
if (wd.damage > 0)
{
@@ -4242,14 +4240,26 @@ void battle_validate_conf() {
battle_config.item_drop_mvp_min = 1;
if(battle_config.item_drop_mvp_max > 10000)
battle_config.item_drop_mvp_max = 10000; // End Addition
-
-/* if (battle_config.night_at_start < 0) // added by [Yor]
- battle_config.night_at_start = 0;
- else if (battle_config.night_at_start > 1) // added by [Yor]
- battle_config.night_at_start = 1; */
- if (battle_config.day_duration != 0 && battle_config.day_duration < 60000) // added by [Yor]
+ if(battle_config.item_drop_heal_min < 1)
+ battle_config.item_drop_heal_min = 1;
+ if(battle_config.item_drop_heal_max > 10000)
+ battle_config.item_drop_heal_max = 10000;
+ if(battle_config.item_drop_use_min < 1)
+ battle_config.item_drop_use_min = 1;
+ if(battle_config.item_drop_use_max > 10000)
+ battle_config.item_drop_use_max = 10000;
+ if(battle_config.item_drop_adddrop_min < 1)
+ battle_config.item_drop_adddrop_min = 1;
+ if(battle_config.item_drop_adddrop_max > 10000)
+ battle_config.item_drop_adddrop_max = 10000;
+ if(battle_config.item_drop_treasure_min < 1)
+ battle_config.item_drop_treasure_min = 1;
+ if(battle_config.item_drop_treasure_max > 10000)
+ battle_config.item_drop_treasure_max = 10000;
+
+ if (battle_config.day_duration && battle_config.day_duration < 60000) // added by [Yor]
battle_config.day_duration = 60000;
- if (battle_config.night_duration != 0 && battle_config.night_duration < 60000) // added by [Yor]
+ if (battle_config.night_duration && battle_config.night_duration < 60000) // added by [Yor]
battle_config.night_duration = 60000;
if (battle_config.hack_info_GM_level > 100)