summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-17 06:01:15 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-17 06:01:15 +0000
commit8fd9120aab67440bc7148646ae064354c1067d35 (patch)
treeb9ad8a03cd78a8d97d79846523f3026e70eb801d /src/map/status.c
parent3089bee74700694461fdc50bf9e9aa01fe589730 (diff)
downloadhercules-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/map/status.c')
-rw-r--r--src/map/status.c54
1 files changed, 50 insertions, 4 deletions
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])