summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt10
-rw-r--r--conf-tmpl/battle/battle.conf20
-rw-r--r--conf-tmpl/battle/skill.conf8
-rw-r--r--conf-tmpl/battle/status.conf61
-rw-r--r--conf-tmpl/battle_athena.conf3
-rw-r--r--src/map/clif.c25
-rw-r--r--src/map/skill.c5
-rw-r--r--src/map/status.c38
-rw-r--r--src/map/unit.c27
9 files changed, 158 insertions, 39 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ed2eae186..511bc5180 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,16 @@ 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/08/01
+ * Modified Self Destruction, so that Marine Spheres in non-versus maps will
+ hurt only enemies, while in all other situations this skill will hurt
+ everyone around them. [Skotlex]
+ * Expanded setting debuff_on_logout so that &1 removes negative buffs and
+ &2 removes positive buffs. [Skotlex]
+ * Food status boosts will no longer end on death, but they will end when
+ you respawn or logout. [Skotlex]
+ * Added battle config file status.conf, moved some settings from skill.conf
+ and battle.conf to it since they are entirely Status-Change related.
+ [Skotlex]
* Added the missing lines to enable script command "kickwaitingroomall"
[Skotlex]
* Magic Rod's can-act delay will no longer be applied when you absorb a
diff --git a/conf-tmpl/battle/battle.conf b/conf-tmpl/battle/battle.conf
index 26dc1113f..4e50a5fc7 100644
--- a/conf-tmpl/battle/battle.conf
+++ b/conf-tmpl/battle/battle.conf
@@ -147,23 +147,3 @@ delay_battle_damage: yes
// Are arrows are consumed when used on a bow? (Note 1)
arrow_decrement: yes
-
-// 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
-// them (eg: 200 vit to completely block stun)
-pc_status_def_rate: 100
-mob_status_def_rate: 100
-
-// Required luk to gain inmunity to status changes.
-// Luk increases resistance by closing the gap between natural resist and max
-// linearly. This setting indicates required luk to gain complete inmunity.
-// Eg: 40 vit -> 40% resist. 150 luk -> +50% of the missing gap.
-// So 40% + (50% of 60%) = 70%
-pc_luk_sc_def: 300
-mob_luk_sc_def: 300
-
-// Maximum resistance to status changes. (10000 = 100%)
-// NOTE: This is applied after cards and equipment, so inmunity cards are
-// capped to this.
-pc_max_status_def: 10000
-mob_max_status_def: 10000
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index eaba3e44e..67fa61e73 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/conf-tmpl/battle/skill.conf
@@ -86,14 +86,6 @@ skillrange_from_weapon: 14
// no effect while the caster is unable to fight (eg: stunned).
skill_caster_check: yes
-// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc?
-status_cast_cancel: no
-
-// Will certain negative skill status-changes be removed on logout?
-// This mimics official servers, where Extremity Fist's no SP regen and
-// Strip Equipment effects are removed when you logout.
-debuff_on_logout: yes
-
// Should ground placed skills be removed as soon as the caster dies? [Note 4]
clear_skills_on_death: 15
diff --git a/conf-tmpl/battle/status.conf b/conf-tmpl/battle/status.conf
new file mode 100644
index 000000000..8d2587b27
--- /dev/null
+++ b/conf-tmpl/battle/status.conf
@@ -0,0 +1,61 @@
+// ______ __ __
+// /\ _ \/\ \__/\ \
+// __\ \ \L\ \ \ ,_\ \ \___ __ ___ __
+// /'__`\ \ __ \ \ \/\ \ _ `\ /'__`\/' _ `\ /'__`\
+///\ __/\ \ \/\ \ \ \_\ \ \ \ \/\ __//\ \/\ \/\ \L\.\_
+//\ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\
+// \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/
+// _ _ _ _ _ _ _ _ _ _ _ _ _
+// / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
+//( e | n | g | l | i | s | h ) ( A | t | h | e | n | a )
+// \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
+//
+//--------------------------------------------------------------
+// eAthena Battle Configuration File
+// Originally Translated by Peter Kieser <pfak@telus.net>
+// Made in to plainer English by Ancyker
+//--------------------------------------------------------------
+//Note 1: Directives can be set using on/off, yes/no or 1/0.
+//Note 2: All rates are in percents, 100 would mean 100%, 200
+// would mean 200%, etc
+//Note 3: Value is not limited to 60K (see below)
+//Note 4: Use bitmask values to specify who is affected
+// (1: Pc, 2: Mob, 4: Pet, 8: Homonculus)
+// Other Information:
+// All options are limited to a max of 60K (aprox) which is 600%
+// or 60secs as appropiate.
+// 1000 miliseconds is 1 second.
+// Unless otherwise specified, the minimum value is 0 for all
+// features.
+//--------------------------------------------------------------
+
+// Should skill casting be cancelled when inflicted by curse/stun/sleep/etc?
+status_cast_cancel: no
+
+// Will certain skill status-changes be removed on logout?
+// This mimics official servers, where Extremity Fist's no SP regen,
+// Strip Equipment, cooking effects are removed when you logout. Setting is:
+// 1 - remove negative buffs (stripping, EF)
+// 2 - remove positive buffs (cooking)
+// 3 - remove all buffs that are not saved on official (default)
+debuff_on_logout: 3
+
+// 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
+// them (eg: 200 vit to completely block stun)
+pc_status_def_rate: 100
+mob_status_def_rate: 100
+
+// Required luk to gain inmunity to status changes.
+// Luk increases resistance by closing the gap between natural resist and max
+// linearly. This setting indicates required luk to gain complete inmunity.
+// Eg: 40 vit -> 40% resist. 150 luk -> +50% of the missing gap.
+// So 40% + (50% of 60%) = 70%
+pc_luk_sc_def: 300
+mob_luk_sc_def: 300
+
+// Maximum resistance to status changes. (10000 = 100%)
+// NOTE: This is applied after cards and equipment, so inmunity cards are
+// capped to this.
+pc_max_status_def: 10000
+mob_max_status_def: 10000
diff --git a/conf-tmpl/battle_athena.conf b/conf-tmpl/battle_athena.conf
index 2c17c4ec9..255e33a05 100644
--- a/conf-tmpl/battle_athena.conf
+++ b/conf-tmpl/battle_athena.conf
@@ -53,6 +53,9 @@ import: conf/battle/player.conf
//Skill related settings
import: conf/battle/skill.conf
+//Status change related settings
+import: conf/battle/status.conf
+
// Anything else that didn't fit anywhere else.
// Includes duel, day/night, mute/manner, log settings.
import: conf/battle/misc.conf
diff --git a/src/map/clif.c b/src/map/clif.c
index 982d60da7..3c5879c8b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8940,6 +8940,31 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) {
if (pc_isdead(sd)) {
pc_setstand(sd);
pc_setrestartvalue(sd, 3);
+ if (sd->sc.count && battle_config.debuff_on_logout&2) {
+ //For some reason food buffs are removed when you respawn.
+ if(sd->sc.data[SC_STRFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_STRFOOD,-1);
+ if(sd->sc.data[SC_AGIFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_AGIFOOD,-1);
+ if(sd->sc.data[SC_VITFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_VITFOOD,-1);
+ if(sd->sc.data[SC_INTFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_INTFOOD,-1);
+ if(sd->sc.data[SC_DEXFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_DEXFOOD,-1);
+ if(sd->sc.data[SC_LUKFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_LUKFOOD,-1);
+ if(sd->sc.data[SC_HITFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_HITFOOD,-1);
+ if(sd->sc.data[SC_FLEEFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_FLEEFOOD,-1);
+ if(sd->sc.data[SC_BATKFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_BATKFOOD,-1);
+ if(sd->sc.data[SC_WATKFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_WATKFOOD,-1);
+ if(sd->sc.data[SC_MATKFOOD].timer!=-1)
+ status_change_end(&sd->bl,SC_MATKFOOD,-1);
+ }
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 2);
}
// in case the player's status somehow wasn't updated yet [Celest]
diff --git a/src/map/skill.c b/src/map/skill.c
index 5e22f2624..42bbd62e3 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4089,10 +4089,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
case NPC_SELFDESTRUCTION:
//Self Destruction hits everyone in range (allies+enemies)
+ //Except for Summoned Marine spheres on non-versus maps, where it's just enemy.
+ i = (md && md->special_state.ai == 2 && !map_flag_vs(src->m))?
+ BCT_ENEMY:BCT_ALL;
clif_skill_nodamage(src, src, skillid, -1, 1);
map_foreachinrange(skill_area_sub, bl,
skill_get_splash(skillid, skilllv), BL_CHAR,
- src, skillid, skilllv, tick, flag|BCT_ALL,
+ src, skillid, skilllv, tick, flag|i,
skill_castend_damage_id);
status_damage(src, src, sstatus->max_hp,0,0,1);
break;
diff --git a/src/map/status.c b/src/map/status.c
index 2e3607ec8..87ebd6795 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5623,16 +5623,36 @@ int status_change_clear(struct block_list *bl,int type)
skill_stop_dancing(bl);
for(i = 0; i < SC_MAX; i++)
{
- //Type 0: PC killed -> Place here stats that do not dispel on death.
- if(sc->data[i].timer == -1 ||
- (type == 0 && (
- i == SC_EDP || i == SC_MELTDOWN || i == SC_XMAS || i == SC_NOCHAT ||
- i == SC_FUSION || i == SC_TKREST || i == SC_READYSTORM ||
- i == SC_READYDOWN || i == SC_READYCOUNTER || i == SC_READYTURN ||
- i == SC_DODGE || i == SC_JAILED
- )))
+ if(sc->data[i].timer == -1)
+ continue;
+ if(type == 0)
+ switch (i)
+ { //Type 0: PC killed -> Place here stats that do not dispel on death.
+ case SC_EDP:
+ case SC_MELTDOWN:
+ case SC_XMAS:
+ case SC_NOCHAT:
+ case SC_FUSION:
+ case SC_TKREST:
+ case SC_READYSTORM:
+ case SC_READYDOWN:
+ case SC_READYCOUNTER:
+ case SC_READYTURN:
+ case SC_DODGE:
+ case SC_JAILED:
+ case SC_STRFOOD:
+ case SC_AGIFOOD:
+ case SC_VITFOOD:
+ case SC_INTFOOD:
+ case SC_DEXFOOD:
+ case SC_LUKFOOD:
+ case SC_HITFOOD:
+ case SC_FLEEFOOD:
+ case SC_BATKFOOD:
+ case SC_WATKFOOD:
+ case SC_MATKFOOD:
continue;
-
+ }
status_change_end(bl, i, -1);
if (type == 1 && sc->data[i].timer != -1)
diff --git a/src/map/unit.c b/src/map/unit.c
index 5cfd25093..606d64801 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1621,7 +1621,7 @@ int unit_free(struct block_list *bl) {
status_change_end(bl,SC_BERSERK,-1);
if(sd->sc.data[SC_TRICKDEAD].timer!=-1)
status_change_end(bl,SC_TRICKDEAD,-1);
- if (battle_config.debuff_on_logout) {
+ if (battle_config.debuff_on_logout&1) {
if(sd->sc.data[SC_ORCISH].timer!=-1)
status_change_end(bl,SC_ORCISH,-1);
if(sd->sc.data[SC_STRIPWEAPON].timer!=-1)
@@ -1637,6 +1637,31 @@ int unit_free(struct block_list *bl) {
if(sd->sc.data[SC_EXPLOSIONSPIRITS].timer!=-1)
status_change_end(bl,SC_EXPLOSIONSPIRITS,-1);
}
+ if (battle_config.debuff_on_logout&2)
+ { //Food items are removed on logout.
+ if(sd->sc.data[SC_STRFOOD].timer!=-1)
+ status_change_end(bl,SC_STRFOOD,-1);
+ if(sd->sc.data[SC_AGIFOOD].timer!=-1)
+ status_change_end(bl,SC_AGIFOOD,-1);
+ if(sd->sc.data[SC_VITFOOD].timer!=-1)
+ status_change_end(bl,SC_VITFOOD,-1);
+ if(sd->sc.data[SC_INTFOOD].timer!=-1)
+ status_change_end(bl,SC_INTFOOD,-1);
+ if(sd->sc.data[SC_DEXFOOD].timer!=-1)
+ status_change_end(bl,SC_DEXFOOD,-1);
+ if(sd->sc.data[SC_LUKFOOD].timer!=-1)
+ status_change_end(bl,SC_LUKFOOD,-1);
+ if(sd->sc.data[SC_HITFOOD].timer!=-1)
+ status_change_end(bl,SC_HITFOOD,-1);
+ if(sd->sc.data[SC_FLEEFOOD].timer!=-1)
+ status_change_end(bl,SC_FLEEFOOD,-1);
+ if(sd->sc.data[SC_BATKFOOD].timer!=-1)
+ status_change_end(bl,SC_BATKFOOD,-1);
+ if(sd->sc.data[SC_WATKFOOD].timer!=-1)
+ status_change_end(bl,SC_WATKFOOD,-1);
+ if(sd->sc.data[SC_MATKFOOD].timer!=-1)
+ status_change_end(bl,SC_MATKFOOD,-1);
+ }
}
if (sd->followtimer != -1)
pc_stop_following(sd);