summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-18 16:15:43 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-18 16:15:43 +0000
commit06ec4b33746917093e146d81e6742d80868d1fa0 (patch)
tree35ac38e43da917d6e9b7eecee299728f596e042f
parent082e468a1a3e7b581529fce6f8e6beffb5fdbb3b (diff)
downloadhercules-06ec4b33746917093e146d81e6742d80868d1fa0.tar.gz
hercules-06ec4b33746917093e146d81e6742d80868d1fa0.tar.bz2
hercules-06ec4b33746917093e146d81e6742d80868d1fa0.tar.xz
hercules-06ec4b33746917093e146d81e6742d80868d1fa0.zip
Fixed bugreport:6008 remove the weight factor with the damage done by LK_SPIRALPIERCE of mobs and recoding of Renewal Spiral Pierce.
Fixed bugreport:5752 SC_AUTOSHADOWSPELL should only consume required items and not sp. Fixed bugreport:5792 updated WM_GLOOMYDAY status effect(mount, ASPD, walk & flee penalty) and should now boost selected skills. Follow up r16309 and bugreport:5940 should now be fixed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16316 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/pre-re/skill_cast_db.txt4
-rw-r--r--db/re/skill_cast_db.txt2
-rw-r--r--src/map/battle.c86
-rw-r--r--src/map/skill.c14
-rw-r--r--src/map/status.c15
5 files changed, 61 insertions, 60 deletions
diff --git a/db/pre-re/skill_cast_db.txt b/db/pre-re/skill_cast_db.txt
index 7c11857e0..3cb1b0542 100644
--- a/db/pre-re/skill_cast_db.txt
+++ b/db/pre-re/skill_cast_db.txt
@@ -1501,7 +1501,7 @@
//-- WM_RANDOMIZESPELL
2424,0,1000,0,0,0,3000
//-- WM_GLOOMYDAY
-2425,1500,1000,0,30000:45000:60000:75000:90000,0,3000
+2425,1000,1000,0,30000:45000:60000:75000:90000,0,10000,500
//-- WM_GREAT_ECHO
2426,2500:2700:2900:3100:3300,1000,0,0,0,10000
//-- WM_SONG_OF_MANA
@@ -1608,7 +1608,7 @@
//-- GN_HELLS_PLANT_ATK
2491,0,0,0,20000,0,0,0
//-- GN_MANDRAGORA
-2492,1000,500,0,10000:15000:20000:25000:30000,0,15000,0
+2492,1000,500,0,10000:15000:20000:25000:30000,0,15000
//-- GN_SLINGITEM //CHECK Whats durations 1 and 2 used for?
2493,0,0,0,77000,10000,1000
diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt
index ee17a8f7e..25bd2bc75 100644
--- a/db/re/skill_cast_db.txt
+++ b/db/re/skill_cast_db.txt
@@ -1502,7 +1502,7 @@
//-- WM_RANDOMIZESPELL
2424,0,1000,0,0,0,3000,0
//-- WM_GLOOMYDAY
-2425,1500,1000,0,30000:45000:60000:75000:90000,0,3000,0
+2425,1000,1000,0,30000:45000:60000:75000:90000,0,10000,500
//-- WM_GREAT_ECHO
2426,2500:2700:2900:3100:3300,1000,0,0,0,10000,0
//-- WM_SONG_OF_MANA
diff --git a/src/map/battle.c b/src/map/battle.c
index 1226175e2..9d884e43e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1937,6 +1937,21 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (wflag&BREAK_NECK) i*=2;
skillratio += i;
break;
+#ifdef RENEWAL
+ case LK_SPIRALPIERCE:
+ case ML_SPIRALPIERCE:
+ {// Formula: Floor[Floor(Weapon Weight/2)*skill level + ATK ]*(100%+50%*s.lvl) * 5 multi-hits
+ short index = sd?sd->equip_index[EQI_HAND_R]:0;
+ int weight = 0;
+
+ if (sd && index >= 0 &&
+ sd->inventory_data[index] &&
+ sd->inventory_data[index]->type == IT_WEAPON)
+ weight = sd->inventory_data[index]->weight/20;
+ ATK_ADD(weight * skill_lv)
+ skillratio += 50*skill_lv;
+ }
+#endif
case ASC_METEORASSAULT:
skillratio += 40*skill_lv-60;
break;
@@ -2228,8 +2243,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
case LG_SHIELDPRESS:
skillratio += 60 + 43 * skill_lv;
- //if( sc && sc->data[SC_GLOOMYDAY_SK] )
- // skillratio += 80 + (5 * sc->data[SC_GLOOMYDAY_SK]->val1);
RE_LVL_DMOD(100);
break;
case LG_PINPOINTATTACK:
@@ -2474,35 +2487,34 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
}
//Div fix.
-#ifdef RENEWAL
- if( skill_num != LK_SPIRALPIERCE && skill_num != ML_SPIRALPIERCE)
-#endif
damage_div_fix(wd.damage, wd.div_);
//The following are applied on top of current damage and are stackable.
- if (sc) {
- if(sc->data[SC_TRUESIGHT])
+ if ( sc ) {
+ if( sc->data[SC_TRUESIGHT] )
ATK_ADDRATE(2*sc->data[SC_TRUESIGHT]->val1);
-#ifdef RENEWAL_EDP
+ if( sc->data[SC_GLOOMYDAY_SK] &&
+ ( skill_num == LK_SPIRALPIERCE || skill_num == KN_BRANDISHSPEAR ||
+ skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN ||
+ skill_num == LG_SHIELDPRESS ) )
+ ATK_ADDRATE(sc->data[SC_GLOOMYDAY_SK]->val2);
// renewal EDP doesn't affect your final damage but your atk and weapon atk
- if(sc->data[SC_EDP] &&
- skill_num != AS_GRIMTOOTH &&
- skill_num != ASC_METEORASSAULT &&
- skill_num != AS_SPLASHER &&
- skill_num != AS_VENOMKNIFE &&
- skill_num != AS_SONICBLOW &&
- skill_num != ASC_BREAKER &&
- skill_num != GC_COUNTERSLASH &&
- skill_num != GC_CROSSIMPACT)
- ATK_ADDRATE(sc->data[SC_EDP]->val3);
- // Skills that have halved damage [Igniz]
- if(sc->data[SC_EDP] &&
- (skill_num == AS_SONICBLOW ||
- skill_num == ASC_BREAKER ||
- skill_num == GC_COUNTERSLASH ||
- skill_num == GC_CROSSIMPACT))
- ATK_RATE(50);
+ if( sc->data[SC_EDP] ){
+ switch(skill_num){
+ case AS_SPLASHER: case AS_VENOMKNIFE: break;
+#ifndef RENEWAL_EDP
+ case ASC_BREAKER: case ASC_METEORASSAULT: break;
+#else
+ case AS_SONICBLOW:
+ case ASC_BREAKER:
+ case GC_COUNTERSLASH:
+ case GC_CROSSIMPACT:
+ ATK_RATE(50); // only modifier is halved but still benefit with the damage bonus
#endif
+ default:
+ ATK_ADDRATE(sc->data[SC_EDP]->val3);
+ }
+ }
}
switch (skill_num) {
@@ -2665,27 +2677,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
flag.idef2||flag.pdef2?0:-vit_def
);
}
-#ifdef RENEWAL
- /**
- * Racial/Size and etc modifications should not work with this formula(only the ATK is affected w/ mods) except for now, since RE ATK formula is not yet fully implemented in rA. [malufett]
- * Formula: Floor[Floor(Weapon Weight/2)*skill level + ATK ]*(100%+50%*s.lvl) * 5 multi-hits
- **/
- if( skill_num == LK_SPIRALPIERCE || skill_num == ML_SPIRALPIERCE)
- {
- short index = sd?sd->equip_index[EQI_HAND_R]:0;
- int weight = sstatus->rhw.atk2;
-
- if (sd && index >= 0 &&
- sd->inventory_data[index] &&
- sd->inventory_data[index]->type == IT_WEAPON)
- weight = sd->inventory_data[index]->weight/20;
-
- ATK_ADD(weight * skill_lv);
- ATK_RATE(100+50*skill_lv);
-
- damage_div_fix(wd.damage, wd.div_);
- }
-#endif
+
//Post skill/vit reduction damage increases
if( sc )
{ //SC skill damages
@@ -4609,6 +4601,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
r_lv = sc->data[SC__AUTOSHADOWSPELL]->val2;
if (r_skill != AL_HOLYLIGHT && r_skill != PR_MAGNUS) {
+ sd->state.autocast = 1;
skill_consume_requirement(sd,r_skill,r_lv,3);
switch( skill_get_casttype(r_skill) ) {
case CAST_GROUND:
@@ -4621,6 +4614,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
skill_castend_damage_id(src, target, r_skill, r_lv, tick, flag);
break;
}
+ sd->state.autocast = 0;
sd->ud.canact_tick = tick + skill_delayfix(src, r_skill, r_lv);
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, r_skill, r_lv), 0, 0, 1);
diff --git a/src/map/skill.c b/src/map/skill.c
index 4d256fe4b..ef41448fe 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8210,17 +8210,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case WM_GLOOMYDAY:
- if( dstsd ) {
- if( pc_checkskill(dstsd,KN_BRANDISHSPEAR) || pc_checkskill(dstsd,LK_SPIRALPIERCE) ||
+ clif_skill_nodamage(src,bl,skillid,skilllv,1);
+ if( dstsd && ( pc_checkskill(dstsd,KN_BRANDISHSPEAR) || pc_checkskill(dstsd,LK_SPIRALPIERCE) ||
pc_checkskill(dstsd,CR_SHIELDCHARGE) || pc_checkskill(dstsd,CR_SHIELDBOOMERANG) ||
- pc_checkskill(dstsd,PA_SHIELDCHAIN) || pc_checkskill(dstsd,LG_SHIELDPRESS) )
+ pc_checkskill(dstsd,PA_SHIELDCHAIN) || pc_checkskill(dstsd,LG_SHIELDPRESS) ) )
{
sc_start(bl,SC_GLOOMYDAY_SK,100,skilllv,skill_get_time(skillid,skilllv));
- } else
- sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv));
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- } else
- sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv));
+ break;
+ }
+ sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv));
break;
case WM_SATURDAY_NIGHT_FEVER:
diff --git a/src/map/status.c b/src/map/status.c
index 33d9f5670..d7e9fd35e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4830,7 +4830,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if( sc->data[SC_DECREASEAGI] )
val = max( val, 25 );
- if( sc->data[SC_QUAGMIRE] || sc->data[SC_HALLUCINATIONWALK_POSTDELAY])
+ if( sc->data[SC_QUAGMIRE] || sc->data[SC_HALLUCINATIONWALK_POSTDELAY] || (sc->data[SC_GLOOMYDAY] && sc->data[SC_GLOOMYDAY]->val4) )
val = max( val, 50 );
if( sc->data[SC_DONTFORGETME] )
val = max( val, sc->data[SC_DONTFORGETME]->val3 );
@@ -7756,8 +7756,17 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = val4; // [GodLesZ] tick time
break;
case SC_GLOOMYDAY:
- val2 = 3 + 2 * val1; // Flee reduction.
- val3 = 3 * val1; // ASPD reduction.
+ val2 = 20 + 5 * val1; // Flee reduction.
+ val3 = 15 + 5 * val1; // ASPD reduction.
+ if( rand()%100 < val1 ){ // (Skill Lv) %
+ val4 = 1; // reduce walk speed by half.
+ if( pc_isriding(sd) ) pc_setriding(sd, 0);
+ if( pc_isridingdragon(sd) ) pc_setoption(sd, sd->sc.option&~OPTION_DRAGON);
+ }
+ break;
+ case SC_GLOOMYDAY_SK:
+ // Random number between [15 ~ (Voice Lesson Skill Level x 5) + (Skill Level x 10)] %.
+ val2 = 15 + rand()%( (sd?pc_checkskill(sd, WM_LESSON)*5:0) + val1*10 );
break;
case SC_SITDOWN_FORCE:
case SC_BANANA_BOMB_SITDOWN: