diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-01 15:56:57 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-01 15:56:57 +0000 |
commit | a9397aeb5a7a50c1fae39dbacb40faeb0722f6ae (patch) | |
tree | be977ec88a9f562f1d3f8b1ed2509ae507fa9d7c /src | |
parent | d9ef2dcf2cbc5fe59f8c22641760bada628f0810 (diff) | |
download | hercules-a9397aeb5a7a50c1fae39dbacb40faeb0722f6ae.tar.gz hercules-a9397aeb5a7a50c1fae39dbacb40faeb0722f6ae.tar.bz2 hercules-a9397aeb5a7a50c1fae39dbacb40faeb0722f6ae.tar.xz hercules-a9397aeb5a7a50c1fae39dbacb40faeb0722f6ae.zip |
- 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.
- Expanded setting debuff_on_logout so that &1 removes negative buffs and &2 removes positive buffs.
- Food status boosts will no longer end on death, but they will end when you respawn or logout.
- Added battle config file status.conf, moved some settings from skill.conf and battle.conf to it since they are entirely Status-Change related.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8033 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 25 | ||||
-rw-r--r-- | src/map/skill.c | 5 | ||||
-rw-r--r-- | src/map/status.c | 38 | ||||
-rw-r--r-- | src/map/unit.c | 27 |
4 files changed, 84 insertions, 11 deletions
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); |