summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/map/status.c b/src/map/status.c
index f6a5e5997..541123050 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -569,7 +569,7 @@ void initChangeTables(void) {
set_sc( RA_FEARBREEZE , SC_FEARBREEZE , SI_FEARBREEZE , SCB_NONE );
set_sc( RA_ELECTRICSHOCKER , SC_ELECTRICSHOCKER , SI_ELECTRICSHOCKER , SCB_NONE );
set_sc( RA_WUGDASH , SC_WUGDASH , SI_WUGDASH , SCB_SPEED );
- set_sc( RA_CAMOUFLAGE , SC_CAMOUFLAGE , SI_CAMOUFLAGE , SCB_CRI|SCB_SPEED );
+ set_sc( RA_CAMOUFLAGE , SC_CAMOUFLAGE , SI_CAMOUFLAGE , SCB_SPEED );
add_sc( RA_MAGENTATRAP , SC_ELEMENTALCHANGE );
add_sc( RA_COBALTTRAP , SC_ELEMENTALCHANGE );
add_sc( RA_MAIZETRAP , SC_ELEMENTALCHANGE );
@@ -982,6 +982,7 @@ void initChangeTables(void) {
StatusChangeStateTable[SC_CURSEDCIRCLE_TARGET] |= SCS_NOMOVE;
StatusChangeStateTable[SC_CRYSTALIZE] |= SCS_NOMOVE|SCS_NOMOVECOND;
StatusChangeStateTable[SC_NETHERWORLD] |= SCS_NOMOVE;
+ StatusChangeStateTable[SC_CAMOUFLAGE] |= SCS_NOMOVE|SCS_NOMOVECOND;
/* StatusChangeState (SCS_) NOPICKUPITEMS */
StatusChangeStateTable[SC_HIDING] |= SCS_NOPICKITEM;
@@ -3415,6 +3416,8 @@ void status_calc_state( struct block_list *bl, struct status_change *sc, enum sc
|| (sc->data[SC_CLOAKING] && //Need wall at level 1-2
sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1))
|| (sc->data[SC_CRYSTALIZE] && bl->type != BL_MOB)
+ || (sc->data[SC_CAMOUFLAGE] && sc->data[SC_CAMOUFLAGE]->val1 < 3
+ && !(sc->data[SC_CAMOUFLAGE]->val3&1))
) {
sc->cant.move += ( start ? 1 : -1 );
}
@@ -4487,8 +4490,6 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch
critical += sc->data[SC_STRIKING]->val1;
if(sc->data[SC__INVISIBILITY])
critical += critical * sc->data[SC__INVISIBILITY]->val3 / 100;
- if(sc->data[SC_CAMOUFLAGE])
- critical += 100;
if(sc->data[SC__UNLUCKY])
critical -= critical * sc->data[SC__UNLUCKY]->val2 / 100;
#ifdef RENEWAL
@@ -4929,7 +4930,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if( sc->data[SC_MARSHOFABYSS] )
val = max( val, 40 + 10 * sc->data[SC_MARSHOFABYSS]->val1 );
if( sc->data[SC_CAMOUFLAGE] && (sc->data[SC_CAMOUFLAGE]->val3&1) == 0 )
- val = max( val, sc->data[SC_CAMOUFLAGE]->val1 < 3 ? 300 : 25 * (6 - sc->data[SC_CAMOUFLAGE]->val1) );
+ val = max( val, sc->data[SC_CAMOUFLAGE]->val1 < 3 ? 0 : 25 * (5 - sc->data[SC_CAMOUFLAGE]->val1) );
if( sc->data[SC__GROOMY] )
val = max( val, sc->data[SC__GROOMY]->val2);
if( sc->data[SC_STEALTHFIELD_MASTER] )
@@ -6028,14 +6029,14 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
case SC_OBLIVIONCURSE: // 100% - (100 - 0.8 x INT)
sc_def = 100 - ( 100 - status->int_* 8 / 10 );
sc_def = max(sc_def, 5); // minimum of 5%
+ break;
+ case SC_BITE: // {(Base Success chance) - (Target's AGI / 4)}
+ rate -= status->agi*1000/4;
+ rate = max(rate,50000); // minimum of 50%
break;
case SC_ELECTRICSHOCKER:
- case SC_BITE: {
- if( bl->type == BL_MOB )
- tick -= 1000 * (status->agi/10);
- if( sd && type != SC_ELECTRICSHOCKER )
- tick >>= 1;
- }
+ if( bl->type == BL_MOB )
+ tick -= 1000 * (status->agi/10);
break;
case SC_CRYSTALIZE:
tick -= (1000*(status->vit/10))+(status_get_lv(bl)/50);
@@ -7836,7 +7837,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 1000; // [GodLesZ] tick time
break;
case SC_CAMOUFLAGE:
- //val3 |= battle_config.pc_camouflage_check_type&7;
+ val4 = tick/1000;
tick_time = 1000; // [GodLesZ] tick time
break;
case SC_WUGDASH:
@@ -9874,10 +9875,12 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
break;
case SC_CAMOUFLAGE:
- if( !status_charge(bl,0,7 - sce->val1) )
- break;
- sc_timer_next(1000 + tick, status_change_timer, bl->id, data);
- return 0;
+ if(--(sce->val4) > 0){
+ status_charge(bl,0,7 - sce->val1);
+ sc_timer_next(1000 + tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ break;
case SC__REPRODUCE:
if(!status_charge(bl, 0, 1))