From 2f526028369f0fb0148ced3d9d6d6b970307421d Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Thu, 4 Jun 2009 22:46:14 +0000 Subject: * Updates to ST_PRESERVE and a few other minor details! - Recasting Preserve no longer toggles the skill off while active. - Preserve is no longer saved on log-out or mapserver changes. * Added SC_CRITICALWOUND and SC_SLOWCAST to negative statuses not saved with battle_config.debuff_on_logout&1 * Implemented the skills NPC_HELLPOWER and NPC_WIDEHELLDIGNITY, as per my personal experiences with the skill on iRO. * Increased MAX_MOBSKILLS to 50, as Satan Morroc has over 40 active skills now. * Added skill information for NPC_HELLPOWER and NPC_WIDEHELLDIGNITY, and enabled skills in mob_skill_db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13843 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 7 +++++++ src/map/map.h | 2 +- src/map/skill.c | 8 +++++++- src/map/skill.h | 7 ++++--- src/map/status.c | 10 +++++++--- src/map/status.h | 3 ++- 6 files changed, 28 insertions(+), 9 deletions(-) (limited to 'src/map') diff --git a/src/map/map.c b/src/map/map.c index acf203615..65e22fe48 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1559,6 +1559,11 @@ int map_quit(struct map_session_data *sd) //TO-DO Probably there are way more NPC_type negative status that are removed if(sd->sc.data[SC_CHANGEUNDEAD]) status_change_end(&sd->bl,SC_CHANGEUNDEAD,-1); + // Both these statuses are removed on logout. [L0ne_W0lf] + if(sd->sc.data[SC_SLOWCAST]) + status_change_end(&sd->bl,SC_SLOWCAST,-1); + if(sd->sc.data[SC_CRITICALWOUND]) + status_change_end(&sd->bl,SC_CRITICALWOUND,-1); } if (battle_config.debuff_on_logout&2) { @@ -1568,6 +1573,8 @@ int map_quit(struct map_session_data *sd) status_change_end(&sd->bl,SC_MAXOVERTHRUST,-1); if(sd->sc.data[SC_STEELBODY]) status_change_end(&sd->bl,SC_STEELBODY,-1); + if(sd->sc.data[SC_PRESERVE]) + status_change_end(&sd->bl,SC_PRESERVE,-1); } } diff --git a/src/map/map.h b/src/map/map.h index 56f71e845..d07871951 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -33,7 +33,7 @@ struct item_data; #define AREA_SIZE battle_config.area_size #define DAMAGELOG_SIZE 30 #define LOOTITEM_SIZE 10 -#define MAX_MOBSKILL 40 +#define MAX_MOBSKILL 50 #define MAX_MOB_LIST_PER_MAP 128 #define MAX_EVENTQUEUE 2 #define MAX_EVENTTIMER 32 diff --git a/src/map/skill.c b/src/map/skill.c index bcd25556d..fd9c4b674 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -786,6 +786,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int case NPC_POISON: case NPC_SILENCEATTACK: case NPC_STUNATTACK: + case NPC_HELLPOWER: sc_start(bl,status_skill2sc(skillid),50+10*skilllv,skilllv,skill_get_time2(skillid,skilllv)); break; case NPC_ACIDBREATH: @@ -2555,6 +2556,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case HFLI_SBR44: //[orn] case NPC_BLEEDING: case NPC_CRITICALWOUND: + case NPC_HELLPOWER: skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); break; @@ -3252,6 +3254,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; { int per = 0, sper = 0; + if (status_get_sc(bl)->data[SC_HELLPOWER]) + break; + if (map[bl->m].flag.pvp && dstsd && dstsd->pvp_point < 0) break; @@ -3635,6 +3640,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NJ_NEN: case NPC_DEFENDER: case NPC_MAGICMIRROR: + case ST_PRESERVE: clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); break; @@ -4064,7 +4070,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case TK_READYCOUNTER: case TK_DODGE: case CR_SHRINK: - case ST_PRESERVE: case SG_FUSION: case GS_GATLINGFEVER: if( tsce ) @@ -5607,6 +5612,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NPC_WIDESTONE: case NPC_WIDESTUN: case NPC_SLOWCAST: + case NPC_WIDEHELLDIGNITY: if (flag&1) sc_start(bl,type,100,skilllv,skill_get_time2(skillid,skilllv)); else { diff --git a/src/map/skill.h b/src/map/skill.h index e2dbe2dee..b6495538e 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -973,10 +973,11 @@ enum e_skill { NPC_WIDESOULDRAIN, ALL_INCCARRY = 681, - /* - NPC_TALK = 682, - NPC_HELLPOWER, + + //NPC_TALK = 682, + NPC_HELLPOWER = 683, NPC_WIDEHELLDIGNITY, + /* NPC_INVINCIBLE, NPC_INVINCIBLEOFF, */ diff --git a/src/map/status.c b/src/map/status.c index 0b89ba5a9..6015837f0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -386,9 +386,12 @@ void initChangeTables(void) add_sc( NPC_WIDECURSE , SC_CURSE ); add_sc( NPC_WIDESTUN , SC_STUN ); - set_sc( CASH_BLESSING , SC_BLESSING , SI_BLESSING , SCB_STR|SCB_INT|SCB_DEX ); - set_sc( CASH_INCAGI , SC_INCREASEAGI , SI_INCREASEAGI , SCB_AGI|SCB_SPEED ); - set_sc( CASH_ASSUMPTIO , SC_ASSUMPTIO , SI_ASSUMPTIO , SCB_NONE ); + set_sc( NPC_HELLPOWER , SC_HELLPOWER , SI_HELLPOWER , SCB_NONE ); + set_sc( NPC_WIDEHELLDIGNITY , SC_HELLPOWER , SI_HELLPOWER , SCB_NONE ); + + set_sc( CASH_BLESSING , SC_BLESSING , SI_BLESSING , SCB_STR|SCB_INT|SCB_DEX ); + set_sc( CASH_INCAGI , SC_INCREASEAGI , SI_INCREASEAGI , SCB_AGI|SCB_SPEED ); + set_sc( CASH_ASSUMPTIO , SC_ASSUMPTIO , SI_ASSUMPTIO , SCB_NONE ); set_sc( CR_SHRINK , SC_SHRINK , SI_SHRINK , SCB_NONE ); set_sc( RG_CLOSECONFINE , SC_CLOSECONFINE2 , SI_CLOSECONFINE2 , SCB_NONE ); @@ -6228,6 +6231,7 @@ int status_change_clear(struct block_list* bl, int type) case SC_JAILED: case SC_EXPBOOST: case SC_ITEMBOOST: + case SC_HELLPOWER: continue; } diff --git a/src/map/status.h b/src/map/status.h index e6adb62b7..6a3f89004 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -312,6 +312,7 @@ typedef enum sc_type { SC_ITEMSCRIPT, SC_S_LIFEPOTION, SC_L_LIFEPOTION, + SC_HELLPOWER, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; @@ -623,7 +624,7 @@ enum si_type { SI_TARGET_BLOOD = 301, SI_ARMOR_PROPERTY = 302, // SI_REUSE_LIMIT_A = 303, -// SI_HELLPOWER = 304, + SI_HELLPOWER = 304, // SI_STEAMPACK = 305, // SI_REUSE_LIMIT_B = 306, // SI_REUSE_LIMIT_C = 307, -- cgit v1.2.3-60-g2f50