summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 09:14:11 +0000
committerVicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 09:14:11 +0000
commit82cf6eb7d3925cc1a954b61bfbcdb0e07ac130ca (patch)
treeee5eb1d8a1ee5ea725e7dd1b9e5de97d46d5614e
parentb2627b3fa308417022204f028e93a6eaba16a199 (diff)
downloadhercules-82cf6eb7d3925cc1a954b61bfbcdb0e07ac130ca.tar.gz
hercules-82cf6eb7d3925cc1a954b61bfbcdb0e07ac130ca.tar.bz2
hercules-82cf6eb7d3925cc1a954b61bfbcdb0e07ac130ca.tar.xz
hercules-82cf6eb7d3925cc1a954b61bfbcdb0e07ac130ca.zip
partial SC work. it doesn't break, but it doesn't work either.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5529 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/skill_cast_db.txt2
-rw-r--r--src/map/skill.c26
-rw-r--r--src/map/status.c59
-rw-r--r--src/map/status.h12
4 files changed, 79 insertions, 20 deletions
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index abb2c6ec2..d274a7958 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -809,7 +809,7 @@
//===== Gunslinger =========================
//-- GS_GLITTERING
-500,0,0,0,0,0
+500,1000,0,0,600000,0
//-- GS_FLING
501,0,0,0,0,0
//-- GS_TRIPLEACTION
diff --git a/src/map/skill.c b/src/map/skill.c
index f14251c89..f06e3d860 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3095,6 +3095,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
//Until they're at right position - gs_damage- [Vicious]
case GS_TRIPLEACTION:
+ case GS_MAGICALBULLET:
case GS_CRACKER:
case GS_TRACKING:
case GS_PIERCINGSHOT:
@@ -3134,7 +3135,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
case GS_FLING:
//case GS_TRIPLEACTION:
//case GS_BULLSEYE:
- case GS_MAGICALBULLET:
+ //case GS_MAGICALBULLET:
//case GS_CRACKER:
//case GS_TRACKING:
case GS_DISARM:
@@ -5683,9 +5684,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
//Until they're at right position - gs_nodamage- [Vicious]
//Not implemented yet [Vicious]
case GS_GLITTERING:
- if(sd) {
+ if(sd) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(rand()%100 < (50+10*skilllv) )
+ if(rand()%100 < (50+10*skilllv))
pc_addspiritball(sd,skill_get_time(skillid,skilllv),skilllv);
}
break;
@@ -8103,20 +8104,11 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
//SHOULD BE OPTIMALIZED [Komurka]
+ //Optimized #1. optimize comfort later. [Vicious]
case SG_SUN_WARM:
- if ((sd->bl.m == sd->feel_map[0].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
- break;
- clif_skill_fail(sd,skill,0,0);
- return 0;
- break;
case SG_MOON_WARM:
- if ((sd->bl.m == sd->feel_map[1].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
- break;
- clif_skill_fail(sd,skill,0,0);
- return 0;
- break;
case SG_STAR_WARM:
- if ((sd->bl.m == sd->feel_map[2].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
+ if ((sd->bl.m == sd->feel_map[skill-SG_SUN_WARM].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
break;
clif_skill_fail(sd,skill,0,0);
return 0;
@@ -8196,12 +8188,16 @@ int skill_check_condition(struct map_session_data *sd,int type)
}
break;
case GS_MADNESSCANCEL:
- if(sd->spiritball < 4) {
+ if(sd->spiritball < 4 || sd->sc.data[SC_ADJUSTMENT].timer!=-1) {
clif_skill_fail(sd,skill,0,0);
return 0;
}
break;
case GS_ADJUSTMENT:
+ if(sd->sc.data[SC_MADNESSCANCEL].timer == -1) {
+ clif_skill_fail(sd,skill,0,0);
+ return 0;
+ }
case GS_INCREASING:
if(sd->spiritball < 2) {
clif_skill_fail(sd,skill,0,0);
diff --git a/src/map/status.c b/src/map/status.c
index f56436455..ef33c63de 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -278,8 +278,18 @@ void initChangeTables(void) {
set_sc(WZ_SIGHTBLASTER, SC_SIGHTBLASTER, SI_SIGHTBLASTER);
set_sc(DC_WINKCHARM, SC_WINKCHARM, SI_WINKCHARM);
set_sc(MO_BALKYOUNG, SC_STUN, SI_BLANK);
-
- // Storing the target job rather than simply SC_SPIRIT simplifies code later on.
+ //Until they're at right position - gs_set_sc- [Vicious]
+ set_sc(GS_MADNESSCANCEL, SC_MADNESSCANCEL, SI_BLANK);
+ set_sc(GS_ADJUSTMENT, SC_ADJUSTMENT, SI_BLANK);
+ set_sc(GS_INCREASING, SC_INCREASING, SI_BLANK);
+ set_sc(GS_GATLINGFEVER, SC_GATLINGFEVER, SI_BLANK);
+ set_sc(NJ_TATAMIGAESHI, SC_TATAMIGAESHI, SI_BLANK);
+ set_sc(NJ_UTSUSEMI, SC_UTSUSEMI, SI_BLANK);
+ set_sc(NJ_KAENSIN, SC_KAENSIN, SI_BLANK);
+ set_sc(NJ_SUITON, SC_SUITON, SI_BLANK);
+ set_sc(NJ_NEN, SC_NEN, SI_BLANK);
+
+ // Storing the target job rather than simply SC_SPIRIT simplifies code later on.
SkillStatusChangeTable[SL_ALCHEMIST] = MAPID_ALCHEMIST,
SkillStatusChangeTable[SL_MONK] = MAPID_MONK,
SkillStatusChangeTable[SL_STAR] = MAPID_STAR_GLADIATOR,
@@ -1842,6 +1852,8 @@ int status_calc_batk(struct block_list *bl, int batk)
//Curse shouldn't effect on this?
// if(sc->data[SC_BLEEDING].timer != -1)
// batk -= batk * 25/100;
+ if(sc->data[SC_MADNESSCANCEL].timer!=-1)
+ batk += 100;
}
return batk;
@@ -1977,6 +1989,10 @@ int status_calc_flee(struct block_list *bl, int flee)
flee -= flee * 50/100;
if(sc->data[SC_BLIND].timer!=-1)
flee -= flee * 25/100;
+ if(sc->data[SC_ADJUSTMENT].timer!=-1)
+ flee += 30;
+ if(sc->data[SC_GATLINGFEVER].timer!=-1)
+ flee -= sc->data[SC_GATLINGFEVER].val2*5;
}
if (bl->type == BL_PC && map_flag_gvg(bl->m)) //GVG grounds flee penalty, placed here because it's "like" a status change. [Skotlex]
@@ -2156,6 +2172,8 @@ int status_calc_speed(struct block_list *bl, int speed)
speed = speed * sc->data[SC_CHASEWALK].val3/100;
if(sc->data[SC_RUN].timer!=-1)/*駆け足による速度変化*/
speed -= speed * 25/100;
+ if(sc->data[SC_GATLINGFEVER].timer!=-1)
+ speed += speed * 25/100;
}
return speed;
@@ -2209,6 +2227,10 @@ int status_calc_aspd_rate(struct block_list *bl, int aspd_rate)
}
if(sc->data[SC_STAR_COMFORT].timer!=-1)
aspd_rate -= (status_get_lv(bl) + status_get_dex(bl) + status_get_luk(bl))/10;
+ if(sc->data[SC_MADNESSCANCEL].timer!=-1)
+ aspd_rate -= 20;
+ if(sc->data[SC_GATLINGFEVER].timer!=-1)
+ aspd_rate -= sc->data[SC_GATLINGFEVER].val2*2;
}
return aspd_rate;
@@ -4386,7 +4408,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_BENEDICTIO: /* 聖? */
case SC_MAGNIFICAT: /* マグニフィカ?ト */
case SC_AETERNA: /* エ?テルナ */
- case SC_STRIPARMOR:
+ case SC_STRIPARMOR:
case SC_STRIPHELM:
case SC_CP_WEAPON:
case SC_CP_SHIELD:
@@ -4417,6 +4439,20 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_INTRAVISION:
case SC_BASILICA:
break;
+ // gs_something1 [Vicious]
+ case SC_MADNESSCANCEL:
+ case SC_ADJUSTMENT:
+ case SC_INCREASING:
+ case SC_GATLINGFEVER:
+ case SC_TATAMIGAESHI:
+ case SC_KAENSIN:
+ calc_flag = 1;
+ break;
+ case SC_UTSUSEMI:
+ case SC_SUITON:
+ case SC_NEN:
+ break;
+
default:
if(battle_config.error_log)
@@ -4444,6 +4480,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_CLOSECONFINE2:
case SC_ANKLE:
case SC_SPIDERWEB:
+ case SC_MADNESSCANCEL:
battle_stopwalking(bl,1);
break;
case SC_HIDING:
@@ -4974,6 +5011,18 @@ int status_change_end( struct block_list* bl , int type,int tid )
case SC_MOONLIT: //Clear the unit effect. [Skotlex]
skill_setmapcell(bl,CG_MOONLIT, sc->data[SC_MOONLIT].val1, CELL_CLRMOONLIT);
break;
+ //gs_something2 [Vicious]
+ case SC_MADNESSCANCEL:
+ case SC_ADJUSTMENT:
+ case SC_INCREASING:
+ case SC_GATLINGFEVER:
+ case SC_TATAMIGAESHI:
+ case SC_UTSUSEMI:
+ case SC_KAENSIN:
+ case SC_SUITON:
+ case SC_NEN:
+ calc_flag = 1;
+ break;
}
@@ -5496,6 +5545,10 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
}
}
break;
+ // gs_status_change_timer [Vicious]
+ case SC_NEN:
+ sc->data[type].timer=add_timer( 1000*600+tick,status_change_timer, bl->id, data );
+ return 0;
}
// default for all non-handled control paths
diff --git a/src/map/status.h b/src/map/status.h
index 5ca71ce6a..d136394da 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -230,7 +230,17 @@ enum {
SC_SKA, // [marquis007]
SC_TKDORI, // [marquis007]
SC_MIRACLE, //SG 'hidden' skill [Komurka]
- //
+ //Ninja/GS states
+ SC_MADNESSCANCEL,
+ SC_ADJUSTMENT,
+ SC_INCREASING, //230
+ SC_GATLINGFEVER,
+ SC_TATAMIGAESHI,
+ SC_UTSUSEMI,
+ SC_KAENSIN,
+ SC_SUITON,
+ SC_NEN,
+
SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
};
extern int SkillStatusChangeTable[MAX_SKILL];