diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-17 06:01:15 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-17 06:01:15 +0000 |
commit | 8fd9120aab67440bc7148646ae064354c1067d35 (patch) | |
tree | b9ad8a03cd78a8d97d79846523f3026e70eb801d /src | |
parent | 3089bee74700694461fdc50bf9e9aa01fe589730 (diff) | |
download | hercules-8fd9120aab67440bc7148646ae064354c1067d35.tar.gz hercules-8fd9120aab67440bc7148646ae064354c1067d35.tar.bz2 hercules-8fd9120aab67440bc7148646ae064354c1067d35.tar.xz hercules-8fd9120aab67440bc7148646ae064354c1067d35.zip |
Fixed bugreport:5757 Added missing Sorcerer Insignias, Credits to brAthena
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16115 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 5 | ||||
-rw-r--r-- | src/map/pc.c | 24 | ||||
-rw-r--r-- | src/map/skill.c | 178 | ||||
-rw-r--r-- | src/map/status.c | 54 | ||||
-rw-r--r-- | src/map/status.h | 6 |
5 files changed, 161 insertions, 106 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 79f338600..31bad9c6b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2541,10 +2541,9 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch return end; } -int npc_duplicate4instance(struct npc_data *snd, int m) -{ +int npc_duplicate4instance(struct npc_data *snd, int m) { char newname[NAME_LENGTH]; - + if( map[m].instance_id == 0 ) return 1; diff --git a/src/map/pc.c b/src/map/pc.c index a16befff0..a9597b11e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6758,17 +6758,21 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) if(bonus != 100) sp = sp * bonus / 100; } + if( sd->sc.count ) { + if ( sd->sc.data[SC_CRITICALWOUND] ) { + hp -= hp * sd->sc.data[SC_CRITICALWOUND]->val2 / 100; + sp -= sp * sd->sc.data[SC_CRITICALWOUND]->val2 / 100; + } - if (sd->sc.data[SC_CRITICALWOUND]) - { - hp -= hp * sd->sc.data[SC_CRITICALWOUND]->val2 / 100; - sp -= sp * sd->sc.data[SC_CRITICALWOUND]->val2 / 100; - } - - if (sd->sc.data[SC_DEATHHURT]) - { - hp -= hp * 20 / 100; - sp -= sp * 20 / 100; + if ( sd->sc.data[SC_DEATHHURT] ) { + hp -= hp * 20 / 100; + sp -= sp * 20 / 100; + } + + if( sd->sc.data[SC_WATER_INSIGNIA] && sd->sc.data[SC_WATER_INSIGNIA]->val1 == 2 ) { + hp += hp / 10; + sp += sp / 10; + } } return status_heal(&sd->bl, hp, sp, 1); diff --git a/src/map/skill.c b/src/map/skill.c index 32d0f38fe..a2de76a0a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -356,45 +356,43 @@ int skill_get_range2 (struct block_list *bl, int id, int lv) return range; } -int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv, bool heal) -{ +int skill_calc_heal(struct block_list *src, struct block_list *target, int skill_id, int skill_lv, bool heal) { int skill, hp; struct map_session_data *sd = BL_CAST(BL_PC, src); struct map_session_data *tsd = BL_CAST(BL_PC, target); struct status_change* sc; - switch( skill_id ) - { - case BA_APPLEIDUN: - hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery - if( sd ) - hp += 5*pc_checkskill(sd,BA_MUSICALLESSON); - break; - case PR_SANCTUARY: - hp = (skill_lv>6)?777:skill_lv*100; - break; - case NPC_EVILLAND: - hp = (skill_lv>6)?666:skill_lv*100; - break; - default: - if (skill_lv >= battle_config.max_heal_lv) - return battle_config.max_heal; - #ifdef RENEWAL - /** - * Renewal Heal Formula (from Doddler) - * TODO: whats that( 1+ %Modifier / 100 ) ? currently using 'x1' (100/100) until found out - * - Min = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK - [(WeaponMATK * WeaponLvl) / 10] - * - Max = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK + [(WeaponMATK * WeaponLvl) / 10] - **/ - hp = ( ( ( ( status_get_lv(src) + status_get_int(src) ) / 5 ) * 3 ) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) - ( ( status_get_matk_max(src) * status_get_wlv(src) ) / 10 ) ) + rnd()%( ( ( ( status_get_lv(src) + status_get_int(src) ) / 5 ) * 3 ) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) + ( ( status_get_matk_max(src) * status_get_wlv(src) ) / 10 ) ); - #else - hp = ( status_get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8); - #endif - if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) ) - hp += hp * skill * 2 / 100; - else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 ) - hp += hp * skill * 2 / 100; - break; + switch( skill_id ) { + case BA_APPLEIDUN: + hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery + if( sd ) + hp += 5*pc_checkskill(sd,BA_MUSICALLESSON); + break; + case PR_SANCTUARY: + hp = (skill_lv>6)?777:skill_lv*100; + break; + case NPC_EVILLAND: + hp = (skill_lv>6)?666:skill_lv*100; + break; + default: + if (skill_lv >= battle_config.max_heal_lv) + return battle_config.max_heal; + #ifdef RENEWAL + /** + * Renewal Heal Formula (from Doddler) + * TODO: whats that( 1+ %Modifier / 100 ) ? currently using 'x1' (100/100) until found out + * - Min = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK - [(WeaponMATK * WeaponLvl) / 10] + * - Max = ( [ ( BaseLvl + INT ) / 5 ] * 30 ) * (1+( %Modifier / 100)) * (HealLvl * 0.1) + StatusMATK + EquipMATK + [(WeaponMATK * WeaponLvl) / 10] + **/ + hp = ( ( ( ( status_get_lv(src) + status_get_int(src) ) / 5 ) * 3 ) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) - ( ( status_get_matk_max(src) * status_get_wlv(src) ) / 10 ) ) + rnd()%( ( ( ( status_get_lv(src) + status_get_int(src) ) / 5 ) * 3 ) * skill_lv + status_get_matk_min(src) + status_get_matk_max(src) + ( ( status_get_matk_max(src) * status_get_wlv(src) ) / 10 ) ); + #else + hp = ( status_get_lv(src) + status_get_int(src) ) / 8 * (4 + ( skill_id == AB_HIGHNESSHEAL ? ( sd ? pc_checkskill(sd,AL_HEAL) : 10 ) : skill_lv ) * 8); + #endif + if( sd && ((skill = pc_checkskill(sd, HP_MEDITATIO)) > 0) ) + hp += hp * skill * 2 / 100; + else if( src->type == BL_HOM && (skill = merc_hom_checkskill(((TBL_HOM*)src), HLIF_BRAIN)) > 0 ) + hp += hp * skill * 2 / 100; + break; } if( ( (target && target->type == BL_MER) || !heal ) && skill_id != NPC_EVILLAND ) @@ -407,14 +405,15 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill hp += hp*skill/100; sc = status_get_sc(target); - if( sc && sc->count ) - { + if( sc && sc->count ) { if( sc->data[SC_CRITICALWOUND] && heal ) // Critical Wound has no effect on offensive heal. [Inkfish] hp -= hp * sc->data[SC_CRITICALWOUND]->val2/100; if( sc->data[SC_DEATHHURT] && heal ) hp -= hp * 20/100; if( sc->data[SC_INCHEALRATE] && skill_id != NPC_EVILLAND && skill_id != BA_APPLEIDUN ) hp += hp * sc->data[SC_INCHEALRATE]->val1/100; // Only affects Heal, Sanctuary and PotionPitcher.(like bHealPower) [Inkfish] + if( sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 2) + hp += hp / 10; } return hp; @@ -6010,34 +6009,27 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in } case AM_BERSERKPITCHER: - case AM_POTIONPITCHER: - { + case AM_POTIONPITCHER: { int i,x,hp = 0,sp = 0,bonus=100; - if( dstmd && dstmd->class_ == MOBID_EMPERIUM ) - { + if( dstmd && dstmd->class_ == MOBID_EMPERIUM ) { map_freeblock_unlock(); return 1; } - if( sd ) - { + if( sd ) { x = skilllv%11 - 1; i = pc_search_inventory(sd,skill_db[skillid].itemid[x]); - if(i < 0 || skill_db[skillid].itemid[x] <= 0) - { + if( i < 0 || skill_db[skillid].itemid[x] <= 0 ) { clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); map_freeblock_unlock(); return 1; } - if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skillid].amount[x]) - { + if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill_db[skillid].amount[x]) { clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); map_freeblock_unlock(); return 1; } - if( skillid == AM_BERSERKPITCHER ) - { - if( dstsd && dstsd->status.base_level < (unsigned int)sd->inventory_data[i]->elv ) - { + if( skillid == AM_BERSERKPITCHER ) { + if( dstsd && dstsd->status.base_level < (unsigned int)sd->inventory_data[i]->elv ) { clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); map_freeblock_unlock(); return 1; @@ -6050,27 +6042,21 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in potion_flag = potion_target = 0; if( sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_ALCHEMIST ) bonus += sd->status.base_level; - if( potion_per_hp > 0 || potion_per_sp > 0 ) - { + if( potion_per_hp > 0 || potion_per_sp > 0 ) { hp = tstatus->max_hp * potion_per_hp / 100; hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000; - if( dstsd ) - { + if( dstsd ) { sp = dstsd->status.max_sp * potion_per_sp / 100; sp = sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000; } - } - else - { - if( potion_hp > 0 ) - { + } else { + if( potion_hp > 0 ) { hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000; hp = hp * (100 + (tstatus->vit<<1)) / 100; if( dstsd ) hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100; } - if( potion_sp > 0 ) - { + if( potion_sp > 0 ) { sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000; sp = sp * (100 + (tstatus->int_<<1)) / 100; if( dstsd ) @@ -6078,39 +6064,38 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in } } - if (sd->itemgrouphealrate[IG_POTION]>0) - { + if (sd->itemgrouphealrate[IG_POTION]>0) { hp += hp * sd->itemgrouphealrate[IG_POTION] / 100; sp += sp * sd->itemgrouphealrate[IG_POTION] / 100; } - if( (i = pc_skillheal_bonus(sd, skillid)) ) - { + if( (i = pc_skillheal_bonus(sd, skillid)) ) { hp += hp * i / 100; sp += sp * i / 100; } - } - else - { + } else { hp = (1 + rnd()%400) * (100 + skilllv*10) / 100; hp = hp * (100 + (tstatus->vit<<1)) / 100; if( dstsd ) hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100; } - if( dstsd && (i = pc_skillheal2_bonus(dstsd, skillid)) ) - { + if( dstsd && (i = pc_skillheal2_bonus(dstsd, skillid)) ) { hp += hp * i / 100; sp += sp * i / 100; } - if( tsc && tsc->data[SC_CRITICALWOUND] ) - { - hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100; - sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100; - } - if( tsc && tsc->data[SC_DEATHHURT] ) - { - hp -= hp * 20 / 100; - sp -= sp * 20 / 100; + if( tsc && tsc->count ) { + if( tsc->data[SC_CRITICALWOUND] ) { + hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100; + sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100; + } + if( tsc->data[SC_DEATHHURT] ) { + hp -= hp * 20 / 100; + sp -= sp * 20 / 100; + } + if( tsc->data[SC_WATER_INSIGNIA] && tsc->data[SC_WATER_INSIGNIA]->val1 == 2 ) { + hp += hp / 10; + sp += sp / 10; + } } clif_skill_nodamage(src,bl,skillid,skilllv,1); if( hp > 0 || (skillid == AM_POTIONPITCHER && sp <= 0) ) @@ -6792,15 +6777,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in if (sp) sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10 + pc_skillheal2_bonus(dstsd, skillid))/100; } - if (tsc && tsc->data[SC_CRITICALWOUND]) - { - hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100; - sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100; - } - if (tsc && tsc->data[SC_DEATHHURT]) - { - hp -= hp * 20 / 100; - sp -= sp * 20 / 100; + if( tsc && tsc->count ) { + if (tsc->data[SC_CRITICALWOUND]) { + hp -= hp * tsc->data[SC_CRITICALWOUND]->val2 / 100; + sp -= sp * tsc->data[SC_CRITICALWOUND]->val2 / 100; + } + if (tsc->data[SC_DEATHHURT]) { + hp -= hp * 20 / 100; + sp -= sp * 20 / 100; + } + if( tsc->data[SC_WATER_INSIGNIA] && tsc->data[SC_WATER_INSIGNIA]->val1 == 2) { + hp += hp / 10; + sp += sp / 10; + } } if(hp > 0) clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1); @@ -11215,6 +11204,13 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns } break; + case UNT_FIRE_INSIGNIA: + case UNT_WATER_INSIGNIA: + case UNT_WIND_INSIGNIA: + case UNT_EARTH_INSIGNIA: + sc_start(bl,type, 100, sg->skill_lv, sg->interval); + break; + case UNT_VACUUM_EXTREME: sc_start(bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->limit); break; @@ -11340,7 +11336,11 @@ static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int case SC_BLOODYLUST: case EL_WATER_BARRIER: case EL_ZEPHYR: - case EL_POWER_OF_GAIA: + case EL_POWER_OF_GAIA: + case SO_FIRE_INSIGNIA: + case SO_WATER_INSIGNIA: + case SO_WIND_INSIGNIA: + case SO_EARTH_INSIGNIA: if (sce) status_change_end(bl, type, INVALID_TIMER); break; diff --git a/src/map/status.c b/src/map/status.c index 11b057081..3569346d1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -660,6 +660,10 @@ void initChangeTables(void) set_sc( SO_WARMER , SC_WARMER , SI_WARMER , SCB_NONE ); set_sc( SO_VACUUM_EXTREME , SC_VACUUM_EXTREME , SI_VACUUM_EXTREME , SCB_NONE ); set_sc( SO_ARRULLO , SC_DEEPSLEEP , SI_DEEPSLEEP , SCB_NONE ); + set_sc( SO_FIRE_INSIGNIA , SC_FIRE_INSIGNIA , SI_FIRE_INSIGNIA , SCB_MATK ); + set_sc( SO_WATER_INSIGNIA , SC_WATER_INSIGNIA , SI_WATER_INSIGNIA , SCB_NONE ); + set_sc( SO_WIND_INSIGNIA , SC_WIND_INSIGNIA , SI_WIND_INSIGNIA , SCB_NONE ); + set_sc( SO_EARTH_INSIGNIA , SC_EARTH_INSIGNIA , SI_EARTH_INSIGNIA , SCB_MDEF|SCB_DEF|SCB_MAXHP|SCB_MAXSP|SCB_WATK ); /** * Genetic **/ @@ -2969,7 +2973,15 @@ int status_calc_pc_(struct map_session_data* sd, bool first) i = sc->data[SC_STONE_SHIELD_OPTION]->val2; sd->subele[ELE_EARTH] += i; sd->subele[ELE_FIRE] -= i; - } + } + if( sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3 ) + sd->magic_addele[ELE_FIRE] += 25; + if( sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 3 ) + sd->magic_addele[ELE_WATER] += 25; + if( sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 3 ) + sd->magic_addele[ELE_WIND] += 25; + if( sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3 ) + sd->magic_addele[ELE_EARTH] += 25; } status_cpy(&sd->battle_status, status); @@ -4199,6 +4211,15 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan batk += batk * sc->data[SC_BEYONDOFWARCRY]->val3/100; if(sc->data[SC_GT_CHANGE]) batk += batk * sc->data[SC_GT_CHANGE]->val3 / 100; + if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 2) + batk += 50; + if(bl->type == BL_ELEM + && ((sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 1) + || (sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 1) + || (sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 1) + || (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 1)) + ) + batk += batk / 5; if(sc->data[SC_FULL_SWING_K]) batk += sc->data[SC_FULL_SWING_K]->val1; if(sc->data[SC_ODINS_POWER]) @@ -4275,7 +4296,13 @@ static unsigned short status_calc_watk(struct block_list *bl, struct status_chan if( sc->data[SC_WATER_BARRIER] ) watk -= sc->data[SC_WATER_BARRIER]->val3; if( sc->data[SC_PYROTECHNIC_OPTION] ) - watk += sc->data[SC_PYROTECHNIC_OPTION]->val2; + watk += sc->data[SC_PYROTECHNIC_OPTION]->val2; + if((sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 2) + || (sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 2) + || (sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 2) + || (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) + ) + watk += watk / 10; if( sc && sc->data[SC_TIDAL_WEAPON] ) watk += watk * sc->data[SC_TIDAL_WEAPON]->val2 / 100; @@ -4317,6 +4344,8 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan matk += sc->data[SC_CHILLY_AIR_OPTION]->val2; if(sc->data[SC_WATER_BARRIER]) matk -= sc->data[SC_WATER_BARRIER]->val3; + if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3) + matk += 50; if(sc->data[SC_ODINS_POWER]) matk += 70; @@ -4543,6 +4572,8 @@ static defType status_calc_def(struct block_list *bl, struct status_change *sc, def += def * sc->data[SC_POWER_OF_GAIA]->val2 / 100; if( sc->data[SC_PRESTIGE] ) def += def * sc->data[SC_PRESTIGE]->val1 / 100; + if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) + def += 50; if(sc->data[SC_ODINS_POWER]) def -= 20; @@ -4639,6 +4670,8 @@ static defType status_calc_mdef(struct block_list *bl, struct status_change *sc, mdef -= mdef * sc->data[SC_GT_CHANGE]->val3 / 100; if(sc->data[SC_WATER_BARRIER]) mdef += sc->data[SC_WATER_BARRIER]->val2; + if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3) + mdef += 50; if(sc->data[SC_ODINS_POWER]) mdef -= 20; @@ -5065,7 +5098,9 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang maxhp += 3000; if(sc->data[SC_MYSTERIOUS_POWDER]) maxhp -= sc->data[SC_MYSTERIOUS_POWDER]->val1 / 100; - + if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) + maxhp += 500; + return cap_value(maxhp,1,UINT_MAX); } @@ -5084,6 +5119,8 @@ static unsigned int status_calc_maxsp(struct block_list *bl, struct status_chang maxsp += maxsp * (2 + sc->data[SC_RAISINGDRAGON]->val1) / 100; if(sc->data[SC_LIFE_FORCE_F]) maxsp += maxsp * sc->data[SC_LIFE_FORCE_F]->val1/100; + if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3) + maxsp += 50; return cap_value(maxsp,1,UINT_MAX); } @@ -5139,8 +5176,17 @@ unsigned char status_calc_attack_element(struct block_list *bl, struct status_ch return element; if(sc->data[SC_ENCHANTARMS]) return sc->data[SC_ENCHANTARMS]->val2; - if(sc->data[SC_WATERWEAPON]) + if(sc->data[SC_WATERWEAPON] + || sc->data[SC_TIDAL_WEAPON_OPTION] + || sc->data[SC_TIDAL_WEAPON] + || (sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 2) ) return ELE_WATER; + if(sc->data[SC_EARTHWEAPON] || (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) ) + return ELE_EARTH; + if(sc->data[SC_FIREWEAPON] || (sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 2) ) + return ELE_FIRE; + if(sc->data[SC_WINDWEAPON] || (sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 2) ) + return ELE_WIND; if(sc->data[SC_EARTHWEAPON]) return ELE_EARTH; if(sc->data[SC_FIREWEAPON]) diff --git a/src/map/status.h b/src/map/status.h index 141a272ef..b414b46db 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -590,8 +590,14 @@ typedef enum sc_type { SC_GLORYWOUNDS, SC_SOULCOLD, //509 SC_HAWKEYES, + /* ... */ SC_ODINS_POWER, SC_RAID, + /* Sorcerer .extra */ + SC_FIRE_INSIGNIA, + SC_WATER_INSIGNIA, + SC_WIND_INSIGNIA, //515 + SC_EARTH_INSIGNIA, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; |