diff options
author | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-08-27 03:25:00 +0000 |
---|---|---|
committer | L0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-08-27 03:25:00 +0000 |
commit | 1fe2e1773b9a7218fe5e39c4d2116194216b6986 (patch) | |
tree | 31a19349a7c55280bd21eeab4831fc0b838678bc /src/map/unit.c | |
parent | a2ec62d8f24cbc11dcb646712c4c16a5cf897372 (diff) | |
download | hercules-1fe2e1773b9a7218fe5e39c4d2116194216b6986.tar.gz hercules-1fe2e1773b9a7218fe5e39c4d2116194216b6986.tar.bz2 hercules-1fe2e1773b9a7218fe5e39c4d2116194216b6986.tar.xz hercules-1fe2e1773b9a7218fe5e39c4d2116194216b6986.zip |
- Implemented first version of Archbishop skills. Preliminary version, see doc/3rd_job_notes.txt for details/bugs/issues with skills.
- Implemented fixed cast time, old cast time mechanics no longer available. Added bFixedCastRate used for reducing fixed cast time mechanic.
Cast time calculations probably still needs work, as the cast rate reductions are probably additive and multiplicative as they used to be.
- As a result, skill_delayfix_sc() has been removed, status effects that modify cast time are now calculated DURING cast time, not after.
- Implemented skill cooldown in skill_cast_db.txt. Known issue is that the cooldowns should save on logout/server shutdown/etc.
- Implemented new heal calculation and started work on MATK. Added bWeaponMatk, and bEquipmentMatk for use with new MATK mechanic.
- Removed custom features and their config settings: delay_dependon_dex, delay_dependon_agi, castrate_dex_scale.
- Increased max_def to 9999 for now, as that is by default the largest defense increase found in the Renewal database (Ahura_mazdah, GM item)
- Added shield aspd reduction from job_db1.txt-- Not 100% sure on this one yet. Should be considered a WIP.
- Modified updatestatus(), to display information more in line with the client's status window.
- Updated some calculations in status_calc_misc to match renewal, needs a lot of work still.
- ST_CHASEWALK and HP_BASILICA no longer have 0 cast time while being canceled.
* Implemented 'Boss' Decrease AGI, like 'Boss' Heal - editable in skill.conf
* clif_skill_fail() now accepts a new parameter, to be used in later messages.
* status_change_start() now stores tick as duration upon being called, which fixes timers calling the function from showing negative durations.
* Implemented skill ALL_PARTYFLEE. 1 level, increases party member flee by 10.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14941 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 2165532b4..b992d028b 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -961,7 +961,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh return 0; target = (struct block_list*)map_charid2sd(sd->status.partner_id); if (!target) { - clif_skill_fail(sd,skill_num,0,0); + clif_skill_fail(sd,skill_num,0,0,0); return 0; } break; @@ -1013,7 +1013,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh case BD_ENCORE: //Prevent using the dance skill if you no longer have the skill in your tree. if(!sd->skillid_dance || pc_checkskill(sd,sd->skillid_dance)<=0){ - clif_skill_fail(sd,skill_num,0,0); + clif_skill_fail(sd,skill_num,0,0,0); return 0; } sd->skillid_old = skill_num; @@ -1029,7 +1029,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh case CG_MOONLIT: if (skill_check_pc_partner(sd, skill_num, &skill_lv, 1, 0) < 1) { - clif_skill_fail(sd,skill_num,0,0); + clif_skill_fail(sd,skill_num,0,0,0); return 0; } break; @@ -1098,18 +1098,10 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh case SA_SPELLBREAKER: temp = 1; break; - case ST_CHASEWALK: - if (sc && sc->data[SC_CHASEWALK]) - casttime = 0; - break; case TK_RUN: if (sc && sc->data[SC_RUN]) casttime = 0; break; - case HP_BASILICA: - if( sc && sc->data[SC_BASILICA] ) - casttime = 0; // No Casting time on basilica cancel - break; case KN_CHARGEATK: { unsigned int k = (distance_bl(src,target)-1)/3; //+100% every 3 cells of distance @@ -1123,9 +1115,17 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh break; } - // moved here to prevent Suffragium from ending if skill fails - if (!(skill_get_castnodex(skill_num, skill_lv)&2)) - casttime = skill_castfix_sc(src, casttime); + // Cancel status effects that lower cast time. + if( !(skill_get_castnodex(skill_num, skill_lv)&2) && sc ) + { + if( sc->data[SC_SUFFRAGIUM] ) + status_change_end(src, SC_SUFFRAGIUM, INVALID_TIMER); + if( sc->data[SC_MEMORIZE] ) + { + if ((--sc->data[SC_MEMORIZE]->val2) <= 0) + status_change_end(src, SC_MEMORIZE, INVALID_TIMER); + } + } if( casttime > 0 || temp ) { @@ -1245,7 +1245,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh if( map_getcell(src->m, skill_x, skill_y, CELL_CHKWALL) ) {// can't cast ground targeted spells on wall cells - if (sd) clif_skill_fail(sd,skill_num,0,0); + if (sd) clif_skill_fail(sd,skill_num,0,0,0); return 0; } @@ -1265,9 +1265,17 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh unit_stop_attack(src); - // moved here to prevent Suffragium from ending if skill fails - if (!(skill_get_castnodex(skill_num, skill_lv)&2)) - casttime = skill_castfix_sc(src, casttime); + // Cancel status effects that lower cast time. + if( !(skill_get_castnodex(skill_num, skill_lv)&2) && sc ) + { + if( sc->data[SC_SUFFRAGIUM] ) + status_change_end(src, SC_SUFFRAGIUM, INVALID_TIMER); + if( sc->data[SC_MEMORIZE] ) + { + if ((--sc->data[SC_MEMORIZE]->val2) <= 0) + status_change_end(src, SC_MEMORIZE, INVALID_TIMER); + } + } ud->state.skillcastcancel = castcancel&&casttime>0?1:0; if( !sd || sd->skillitem != skill_num || skill_get_cast(skill_num,skill_lv) ) @@ -1573,7 +1581,7 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t { // attacking when under cast delay has restrictions: if( tid == INVALID_TIMER ) { //requested attack. - if(sd) clif_skill_fail(sd,1,4,0); + if(sd) clif_skill_fail(sd,1,4,0,0); return 0; } //Otherwise, we are in a combo-attack, delay this until your canact time is over. [Skotlex] |