diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/path.c | 34 | ||||
-rw-r--r-- | src/map/skill.c | 3 | ||||
-rw-r--r-- | src/map/status.c | 16 |
4 files changed, 29 insertions, 30 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 6836aa016..2217ccecc 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3726,8 +3726,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage = 7 * targetVit * skill_lv * (atk + matk) / 100; /* // Pending [malufett] - if( unknown condition ) - md.damage >>= 1; if( unknown condition ){ md.damage = 7 * md.damage % 20; md.damage = 7 * md.damage / 20; @@ -3739,6 +3737,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * vitfactor = (vitfactor * (matk + atk) / 10) / status_get_vit(target); ftemp = max(0, vitfactor) + (targetVit * (matk + atk)) / 10; md.damage = (int64)(ftemp * 70 * skill_lv / 100); + if (target->type == BL_PC) + md.damage >>= 1; } md.damage -= totaldef; } @@ -5325,7 +5325,7 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}] int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status->get_lv(target) / 125; if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK - rdamage = rdamage * ratio / 100 + (damage) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; + rdamage = ratio + (damage)* (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; skill->blown(target, src, skill->get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit->getdir(src), 0); clif->skill_damage(target, src, tick, status_get_amotion(src), 0, rdamage, 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does diff --git a/src/map/path.c b/src/map/path.c index 21d14c815..3b33fce65 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -82,29 +82,17 @@ int path_blownpos(int16 m,int16 x0,int16 y0,int16 dx,int16 dy,int count) dy=(dy>0)?1:((dy<0)?-1:0); } - while( count > 0 && (dx != 0 || dy != 0) ) { - if( !md->getcellp(md,x0+dx,y0+dy,CELL_CHKPASS) ) {// attempt partial movement - int fx = ( dx != 0 && md->getcellp(md,x0+dx,y0,CELL_CHKPASS) ); - int fy = ( dy != 0 && md->getcellp(md,x0,y0+dy,CELL_CHKPASS) ); - if( fx && fy ) - { - if(rnd()&1) - dx=0; - else - dy=0; - } - if( !fx ) - dx=0; - if( !fy ) - dy=0; - } - - x0 += dx; - y0 += dy; - count--; - } - - return (x0<<16)|y0; //TODO: use 'struct point' here instead? + while( count > 0 && (dx != 0 || dy != 0) ) {
+ if( !md->getcellp(md,x0+dx,y0+dy,CELL_CHKPASS) ) {
+ break;
+ }
+
+ x0 += dx;
+ y0 += dy;
+ count--;
+ }
+
+ return (x0<<16)|y0; //TODO: use 'struct point' here instead?
} /*========================================== diff --git a/src/map/skill.c b/src/map/skill.c index 22d97fff1..8e2e44883 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2629,6 +2629,9 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr case WL_CRIMSONROCK: dir = map->calc_dir(bl,skill->area_temp[4],skill->area_temp[5]); break; + case MC_CARTREVOLUTION:
+ dir = 6; // Official servers push target to the West
+ break; } diff --git a/src/map/status.c b/src/map/status.c index ee72f0319..56b0531cb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9206,8 +9206,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_ITEMSCRIPT: if( sd ) { switch( val1 ) { - //case ITEMID_PHREEONI_CARD: - //case ITEMID_GHOSTRING_CARD: + case ITEMID_PHREEONI_CARD:
+ clif->status_change(bl, SI_FOOD_BASICHIT, 1, tick, 0, 0, 0);
+ break;
+ case ITEMID_GHOSTRING_CARD:
+ clif->status_change(bl,SI_ARMOR_PROPERTY,1,tick,0,0,0);
+ break; case ITEMID_TAO_GUNKA_CARD: clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0); break; @@ -10084,8 +10088,12 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case SC_ITEMSCRIPT: if( sd ) { switch( sce->val1 ) { - //case ITEMID_PHREEONI_CARD: - //case ITEMID_GHOSTRING_CARD: + case ITEMID_PHREEONI_CARD:
+ clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_FOOD_BASICHIT);
+ break;
+ case ITEMID_GHOSTRING_CARD:
+ clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_ARMOR_PROPERTY);
+ break; case ITEMID_TAO_GUNKA_CARD: clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_TAOGUNKA); break; |