summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorVicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-28 06:07:07 +0000
committerVicious <Vicious@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-28 06:07:07 +0000
commite24d467f1ae47475e3441d7453f549e22f46f541 (patch)
tree8bbcaa604bfd467b80aa25ff41f7066de7e23bef /src/map/status.c
parent652a86beab80b9d5fa43c502b5e102ae3706e14d (diff)
downloadhercules-e24d467f1ae47475e3441d7453f549e22f46f541.tar.gz
hercules-e24d467f1ae47475e3441d7453f549e22f46f541.tar.bz2
hercules-e24d467f1ae47475e3441d7453f549e22f46f541.tar.xz
hercules-e24d467f1ae47475e3441d7453f549e22f46f541.zip
Commiting mpeg's NJ work(from jA). some things might have gotten reversed/broken, so please do check, and don't kill me! D:
thread: http://www.eathena.ws/board/index.php?showtopic=105413&view=findpost&p=610877 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7936 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c79
1 files changed, 38 insertions, 41 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 06e652950..ebb9d151e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -358,6 +358,8 @@ void initChangeTables(void) {
add_sc(SA_ELEMENTFIRE, SC_ELEMENTALCHANGE);
add_sc(SA_ELEMENTGROUND, SC_ELEMENTALCHANGE);
add_sc(SA_ELEMENTWIND, SC_ELEMENTALCHANGE);
+ add_sc(NJ_HYOUSYOURAKU, SC_FREEZE);
+ set_sc(NJ_NEN, SC_NEN, SI_NEN, SCB_STR|SCB_INT);
//Until they're at right position - gs_set_sc- [Vicious] / some of these don't seem to have a status icon adequate [blackhole89]
set_sc(GS_MADNESSCANCEL, SC_MADNESSCANCEL, SI_MADNESSCANCEL, SCB_BATK|SCB_ASPD);
@@ -369,9 +371,7 @@ void initChangeTables(void) {
//Uncomment and update when you plan on implementing.
// set_sc(NJ_UTSUSEMI, SC_UTSUSEMI, SI_MAEMI);
-// set_sc(NJ_KAENSIN, SC_KAENSIN, SI_BLANK);
- set_sc(NJ_SUITON, SC_SUITON, SI_BLANK, SCB_AGI);
- set_sc(NJ_NEN, SC_NEN, SI_NEN, SCB_STR|SCB_INT);
+ set_sc(NJ_SUITON, SC_SUITON, SI_BLANK, SCB_AGI|SCB_SPEED);
set_sc(HLIF_AVOID, SC_AVOID, SI_BLANK, SCB_SPEED);
set_sc(HLIF_CHANGE, SC_CHANGE, SI_BLANK, SCB_INT);
set_sc(HAMI_BLOODLUST, SC_BLOODLUST, SI_BLANK, SCB_BATK|SCB_WATK);
@@ -2969,7 +2969,7 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
agi -= 2 + sc->data[SC_DECREASEAGI].val1;
if(sc->data[SC_QUAGMIRE].timer!=-1)
agi -= sc->data[SC_QUAGMIRE].val2;
- if(sc->data[SC_SUITON].timer!=-1)
+ if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val4)
agi -= sc->data[SC_SUITON].val2;
if(sc->data[SC_MARIONETTE].timer!=-1)
agi -= (sc->data[SC_MARIONETTE].val3>>8)&0xFF;
@@ -3311,7 +3311,7 @@ static signed char status_calc_def(struct block_list *bl, struct status_change *
if(sc->data[SC_KEEPING].timer!=-1)
return 100;
if(sc->data[SC_SKA].timer != -1)
- return sc->data[SC_SKA].val3;
+ return rand()%100; //Reports indicate SKA actually randomizes defense.
if (sc->data[SC_DEFENCE].timer != -1) //[orn]
def += sc->data[SC_DEFENCE].val2 ;
if(sc->data[SC_STEELBODY].timer!=-1)
@@ -3453,6 +3453,8 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
speed = speed * 100/75;
if(sc->data[SC_QUAGMIRE].timer!=-1)
speed = speed * 100/50;
+ if(sc->data[SC_SUITON].timer!=-1 && sc->data[SC_SUITON].val4)
+ speed = speed * 100/50;
if(sc->data[SC_DONTFORGETME].timer!=-1)
speed = speed * 100/sc->data[SC_DONTFORGETME].val3;
if(sc->data[SC_DEFENDER].timer!=-1)
@@ -4126,6 +4128,7 @@ int status_get_sc_def(struct block_list *bl, int type)
case SC_HALLUCINATION:
case SC_STONE:
case SC_QUAGMIRE:
+ case SC_SUITON:
return 10000;
}
@@ -4462,6 +4465,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_ROKISWEIL:
case SC_COMA:
case SC_GRAVITATION:
+ case SC_SUITON:
return 0;
}
}
@@ -4760,26 +4764,29 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2 = 0;
break;
case SC_SUITON:
- if (status_get_class(bl) != JOB_NINJA) {
- //Is there some kind of formula behind this?
- switch ((val1+1)/3) {
- case 3:
- val2 = 8;
- break;
- case 2:
- val2 = 5;
- break;
- case 1:
- val2 = 3;
- break;
- case 0:
- val2 = 0;
- break;
- default:
- val2 = 3*((val1+1)/3);
- break;
- }
- } else val2 = 0;
+ if (status_get_class(bl) != JOB_NINJA) {
+ if ( bl->type == BL_PC && !map[sd->bl.m].flag.pvp && !map_flag_gvg(sd->bl.m) ) val4=0;
+ else val4=1;
+
+ switch ((val1+1)/3) {
+ case 3:
+ val2 = 8;
+ break;
+ case 2:
+ val2 = 5;
+ break;
+ case 1:
+ val2 = 3;
+ break;
+ case 0:
+ val2 = 0;
+ break;
+ default:
+ val2 = 3*((val1+1)/3);
+ break;
+
+ }
+ } else val2 = 0;
break;
case SC_ONEHAND:
case SC_TWOHANDQUICKEN:
@@ -5379,11 +5386,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val2 = 20*val1; //matk increase.
val3 = 12*val1; //mdef2 reduction.
break;
- case SC_SKA:
- val2 = tick/1000;
- val3 = rand()%100; //Def changes randomly every second...
- tick = 1000;
- break;
case SC_JAILED:
tick = val1>0?1000:250;
break;
@@ -5476,6 +5478,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
case SC_MAXOVERTHRUST:
case SC_OVERTHRUST:
case SC_SWOO: //Why does it shares the same opt as Overthrust? Perhaps we'll never know...
+ case SC_NEN:
sc->opt3 |= 2;
opt_flag = 0;
break;
@@ -5986,6 +5989,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
case SC_OVERTHRUST:
case SC_MAXOVERTHRUST:
case SC_SWOO:
+ case SC_NEN:
sc->opt3 &= ~2;
opt_flag = 0;
break;
@@ -6074,8 +6078,10 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, int data)
hp = status->max_hp - status->hp;
if (hp > sc->data[data].val2)
hp = sc->data[data].val2;
- if (hp)
- status_heal(bl, hp, 0, 2);
+ if (hp) {
+ status_heal(bl, hp, 0, 0);
+ clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
+ }
sc->data[data].val4=-1;
return 1;
}
@@ -6145,15 +6151,6 @@ int status_change_timer(int tid, unsigned int tick, int id, int data)
return 0;
break;
- case SC_SKA:
- if((--sc->data[type].val2)>0){
- sc->data[type].val3 = rand()%100; //Random defense.
- sc->data[type].timer=add_timer(
- 1000+tick, status_change_timer,
- bl->id, data);
- return 0;
- }
-
case SC_HIDING:
if((--sc->data[type].val2)>0){