Skip to content

Commit

Permalink
- Update Fire Cloack to official formula
Browse files Browse the repository at this point in the history
- Update Water Barrier to official formula
- Insignia end status for everyone but spirits
- Neutral Barrier def/mdef bonus should not be show in status window
- Striking should be show in status window (bug:7945)
- Reverberation should be cast on the caster (bug:8291)
  • Loading branch information
Michieru committed Aug 8, 2014
1 parent c9b2545 commit 781ba96
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion db/re/skill_cast_db.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@
//-- EL_WATER_DROP
8405,0,0,0,-1,0,0,-1
//-- EL_WATER_BARRIER
8406,1000,0,0,15000,0,0,-1
8406,0,0,0,15000,0,0,-1
//-- EL_WIND_STEP
8407,0,0,0,-1,0,0,-1
//-- EL_WIND_CURTAIN
Expand Down
2 changes: 1 addition & 1 deletion db/re/skill_unit_db.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
8212,0x97, , 0, 1,1000,enemy, 0x006 //MA_FREEZINGTRAP

8403,0xed, , -1, 1,1000,enemy, 0x018 //EL_FIRE_MANTLE
8406,0xee, , 0, 1, -1,friend,0x2018 //EL_WATER_BARRIER
8406,0xee, , 1, 0, -1,friend,0x2018 //EL_WATER_BARRIER
8409,0xef, , 0, 1, -1,friend,0x2018 //EL_ZEPHYR
8412,0xf0, , 0, 1, -1,friend,0x2018 //EL_POWER_OF_GAIA

Expand Down
7 changes: 7 additions & 0 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
ratio += skill->enchant_eff[sc->data[SC_VIOLENTGALE]->val1-1];
if(sc->data[SC_DELUGE] && atk_elem == ELE_WATER)
ratio += skill->enchant_eff[sc->data[SC_DELUGE]->val1-1];
if(sc->data[SC_FIRE_CLOAK_OPTION] && atk_elem == ELE_FIRE)
damage += damage * sc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
}
if( target && target->type == BL_SKILL ) {
if( atk_elem == ELE_FIRE && battle->get_current_skill(target) == GN_WALLOFTHORN ) {
Expand Down Expand Up @@ -373,6 +375,8 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
if( tsc->data[SC_COLD] && target->type != BL_MOB)
status_change_end(target, SC_COLD, INVALID_TIMER);
if( tsc->data[SC_EARTH_INSIGNIA]) damage += damage/2;
if( tsc->data[SC_FIRE_CLOAK_OPTION])
damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
if( tsc->data[SC_VOLCANIC_ASH]) damage += damage/2; //150%
break;
case ELE_HOLY:
Expand Down Expand Up @@ -2863,6 +2867,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
damage >>= 2; //75% reduction
}

if ( sc->data[SC_WATER_BARRIER] )
damage = damage * ( 100 - 20 ) / 100;

// Compressed code, fixed by map.h [Epoque]
if (src->type == BL_MOB) {
int i;
Expand Down
14 changes: 9 additions & 5 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -11475,6 +11475,8 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
break;

case UNT_REVERBERATION:
if (sg->src_id == bl->id)
break; //Does not affect the caster.
clif->changetraplook(&src->bl,UNT_USED_TRAPS);
map->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
sg->unit_id = UNT_USED_TRAPS;
Expand Down Expand Up @@ -12299,16 +12301,18 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
case EL_WATER_BARRIER:
case EL_ZEPHYR:
case EL_POWER_OF_GAIA:
case SO_FIRE_INSIGNIA:
case SO_WATER_INSIGNIA:
case SO_WIND_INSIGNIA:
case SO_EARTH_INSIGNIA:
case SO_ELEMENTAL_SHIELD:
case SC_BLOODYLUST:
if (sce)
status_change_end(bl, type, INVALID_TIMER);
break;
case SO_FIRE_INSIGNIA:
case SO_WATER_INSIGNIA:
case SO_WIND_INSIGNIA:
case SO_EARTH_INSIGNIA:
if (sce && bl->type != BL_ELEM)
status_change_end(bl, type, INVALID_TIMER);
break;

case BA_POEMBRAGI:
case BA_WHISTLE:
case BA_ASSASSINCROSS:
Expand Down
31 changes: 12 additions & 19 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ void initChangeTables(void) {
set_sc( EL_FIRE_CLOAK , SC_FIRE_CLOAK_OPTION , SI_FIRE_CLOAK_OPTION , SCB_ALL );
set_sc( EL_WATER_SCREEN , SC_WATER_SCREEN_OPTION , SI_WATER_SCREEN_OPTION , SCB_NONE );
set_sc( EL_WATER_DROP , SC_WATER_DROP_OPTION , SI_WATER_DROP_OPTION , SCB_ALL );
set_sc( EL_WATER_BARRIER , SC_WATER_BARRIER , SI_WATER_BARRIER , SCB_MDEF|SCB_WATK|SCB_MATK|SCB_FLEE );
set_sc( EL_WATER_BARRIER , SC_WATER_BARRIER , SI_WATER_BARRIER , SCB_WATK|SCB_FLEE );
set_sc( EL_WIND_STEP , SC_WIND_STEP_OPTION , SI_WIND_STEP_OPTION , SCB_SPEED|SCB_FLEE );
set_sc( EL_WIND_CURTAIN , SC_WIND_CURTAIN_OPTION , SI_WIND_CURTAIN_OPTION , SCB_ALL );
set_sc( EL_ZEPHYR , SC_ZEPHYR , SI_ZEPHYR , SCB_FLEE );
Expand Down Expand Up @@ -4567,8 +4567,8 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc,

if( !viewable ){
/* some statuses that are hidden in the status window */
if(sc->data[SC_STRIKING])
watk += sc->data[SC_STRIKING]->val2;
if( sc->data[SC_WATER_BARRIER] )
watk -= sc->data[SC_WATER_BARRIER]->val3;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val2)
watk += sc->data[SC_GENTLETOUCH_CHANGE]->val2;
return (unsigned short)cap_value(watk,0,USHRT_MAX);
Expand Down Expand Up @@ -4597,8 +4597,6 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc,
watk += sc->data[SC_TROPIC_OPTION]->val2;
if( sc->data[SC_HEATER_OPTION] )
watk += sc->data[SC_HEATER_OPTION]->val2;
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;

Expand All @@ -4613,10 +4611,6 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc,
watk += sc->data[SC_NIBELUNGEN]->val2;
}
}
if(sc->data[SC_STRIKING])
watk += sc->data[SC_STRIKING]->val2;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val2)
watk += sc->data[SC_GENTLETOUCH_CHANGE]->val2;
if(sc->data[SC_LKCONCENTRATION])
watk += watk * sc->data[SC_LKCONCENTRATION]->val2/100;
#endif
Expand All @@ -4638,6 +4632,8 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc,
watk += sc->data[SC_RUSH_WINDMILL]->val2;
if (sc->data[SC_ODINS_POWER])
watk += 40 + 30 * sc->data[SC_ODINS_POWER]->val1;
if(sc->data[SC_STRIKING])
watk += sc->data[SC_STRIKING]->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)
Expand Down Expand Up @@ -4670,8 +4666,6 @@ unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc
matk += sc->data[SC_CHILLY_AIR_OPTION]->val2;
if(sc->data[SC_COOLER_OPTION])
matk += sc->data[SC_COOLER_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])
Expand Down Expand Up @@ -4709,8 +4703,6 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc,
matk += sc->data[SC_CHILLY_AIR_OPTION]->val2;
if(sc->data[SC_COOLER_OPTION])
matk += sc->data[SC_COOLER_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])
Expand Down Expand Up @@ -4933,6 +4925,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def -= def * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100;
if( sc->data[SC_OVERED_BOOST] && bl->type == BL_PC )
def -= def * 50 / 100;
if( sc->data[SC_NEUTRALBARRIER] )
def += def * (10 + 5*sc->data[SC_NEUTRALBARRIER]->val1) / 100;
if( sc && sc->data[SC_GENTLETOUCH_REVITALIZE] && sc->data[SC_GENTLETOUCH_REVITALIZE]->val4 )
def += 2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val4;
if( sc->data[SC_FORCEOFVANGUARD] )
Expand Down Expand Up @@ -5007,6 +5001,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def

if( sc->data[SC_POWER_OF_GAIA] )
def += def * sc->data[SC_POWER_OF_GAIA]->val2 / 100;
if( sc->data[SC_SHIELDSPELL_REF] && sc->data[SC_SHIELDSPELL_REF]->val1 == 2 )
def += sc->data[SC_SHIELDSPELL_REF]->val2;
if( sc->data[SC_PRESTIGE] )
def += def * sc->data[SC_PRESTIGE]->val1 / 100;
if(sc->data[SC_VOLCANIC_ASH] && (bl->type==BL_MOB)){
Expand Down Expand Up @@ -5101,6 +5097,8 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md

if( !viewable ){
/* some statuses that are hidden in the status window */
if(sc->data[SC_NEUTRALBARRIER] )
mdef += mdef * (5 * sc->data[SC_NEUTRALBARRIER]->val1 + 10) / 100;
if(sc->data[SC_MDEFSET])
return sc->data[SC_MDEFSET]->val1;
return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX);
Expand All @@ -5124,8 +5122,6 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md
mdef += (sc->data[SC_ENDURE]->val4 == 0) ? sc->data[SC_ENDURE]->val1 : 1;
if(sc->data[SC_STONEHARDSKIN])// Final MDEF increase divided by 10 since were using classic (pre-renewal) mechanics. [Rytech]
mdef += sc->data[SC_STONEHARDSKIN]->val1;
if(sc->data[SC_WATER_BARRIER])
mdef += sc->data[SC_WATER_BARRIER]->val2;
if(sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
mdef += 25*mdef/100;
if(sc->data[SC_FREEZE])
Expand All @@ -5136,8 +5132,6 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md
mdef += mdef * sc->data[SC_SYMPHONY_LOVE]->val2 / 100;
if(sc->data[SC_GENTLETOUCH_CHANGE] && sc->data[SC_GENTLETOUCH_CHANGE]->val4)
mdef -= mdef * sc->data[SC_GENTLETOUCH_CHANGE]->val4 / 100;
if(sc->data[SC_NEUTRALBARRIER] )
mdef += mdef * (5 * sc->data[SC_NEUTRALBARRIER]->val1 + 10) / 100;
if (sc->data[SC_ODINS_POWER])
mdef -= 20;
if(sc->data[SC_BURNING])
Expand Down Expand Up @@ -8893,8 +8887,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
tick_time = val3;
break;
case SC_WATER_BARRIER:
val2 = 40; // Increasement. Mdef1 ???
val3 = 30; // Reductions. Atk2, Flee1, Matk1 ????
val3 = 20; // Reductions. Atk2, Flee1
break;
case SC_ZEPHYR:
val2 = 25; // Flee.
Expand Down

0 comments on commit 781ba96

Please sign in to comment.