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.c190
1 files changed, 124 insertions, 66 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 30728a8fd..68a87b27a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8083,9 +8083,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if( sd )
val1 = sd->status.job_level * pc->checkskill(sd, RK_RUNEMASTERY) / 4; //DEF/MDEF Increase
break;
- case SC_FIGHTINGSPIRIT:
- val_flag |= 1|2;
- break;
case SC_ABUNDANCE:
val4 = tick / 10000;
tick_time = 10000; // [GodLesZ] tick time
@@ -8102,16 +8099,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_VENOMIMPRESS:
val2 = 10 * val1;
- val_flag |= 1|2;
- break;
- case SC_POISONINGWEAPON:
- val_flag |= 1|2|4;
break;
case SC_WEAPONBLOCKING:
val2 = 10 + 2 * val1; // Chance
val4 = tick / 3000;
tick_time = 3000; // [GodLesZ] tick time
- val_flag |= 1|2;
break;
case SC_TOXIN:
val4 = tick / 10000;
@@ -8134,13 +8126,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val4 = tick / 3000;
tick_time = 3000; // [GodLesZ] tick time
break;
- case SC_ROLLINGCUTTER:
- val_flag |= 1;
- break;
case SC_CLOAKINGEXCEED:
val2 = ( val1 + 1 ) / 2; // Hits
val3 = 90 + val1 * 10; // Walk speed
- val_flag |= 1|2|4;
if (bl->type == BL_PC)
val4 |= battle_config.pc_cloak_check_type&7;
else
@@ -8150,7 +8138,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_HALLUCINATIONWALK:
val2 = 50 * val1; // Evasion rate of physical attacks. Flee
val3 = 10 * val1; // Evasion rate of magical attacks.
- val_flag |= 1|2|4;
break;
case SC_WHITEIMPRISON:
status_change_end(bl, SC_BURNING, INVALID_TIMER);
@@ -8179,7 +8166,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if( val4 < 1 )
val4 = 1;
tick_time = 1000; // [GodLesZ] tick time
- val_flag |= 1;
break;
case SC_SHAPESHIFT:
switch( val1 )
@@ -8211,10 +8197,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if( s_sd )
s_sd->shadowform_id = bl->id;
val4 = tick / 1000;
- val_flag |= 1|2|4;
tick_time = 1000; // [GodLesZ] tick time
}
- break;
+ break;
case SC__STRIPACCESSARY:
if (!sd)
val2 = 20;
@@ -8224,17 +8209,14 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val3 = 20 * val1; // CRITICAL
val4 = tick / 1000;
tick_time = 1000; // [GodLesZ] tick time
- val_flag |= 1|2;
break;
case SC__ENERVATION:
val2 = 20 + 10 * val1; // ATK Reduction
- val_flag |= 1|2;
if( sd ) pc->delspiritball(sd,sd->spiritball,0);
break;
case SC__GROOMY:
val2 = 20 + 10 * val1; //ASPD. Need to confirm if Movement Speed reduction is the same. [Jobbie]
val3 = 20 * val1; //HIT
- val_flag |= 1|2|4;
if( sd ) { // Removes Animals
if( pc_isriding(sd) ) pc->setriding(sd, 0);
if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
@@ -8249,15 +8231,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC__LAZINESS:
val2 = 10 + 10 * val1; // Cast reduction
val3 = 10 * val1; // Flee Reduction
- val_flag |= 1|2|4;
break;
case SC__UNLUCKY:
val2 = 10 * val1; // Crit and Flee2 Reduction
- val_flag |= 1|2|4;
break;
case SC__WEAKNESS:
val2 = 10 * val1;
- val_flag |= 1|2;
// bypasses coating protection and MADO
sc_start(bl,SC_NOEQUIPWEAPON,100,val1,tick);
sc_start(bl,SC_NOEQUIPSHIELD,100,val1,tick);
@@ -8271,7 +8250,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val2 = 100;
break;
case SC_PROPERTYWALK:
- val_flag |= 1|2;
val3 = 0;
break;
case SC_WARMER:
@@ -8393,7 +8371,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val3 = 5 + (2 * val1); // Max rage counters
tick = -1; //endless duration in the client
tick_time = 6000; // [GodLesZ] tick time
- val_flag |= 1|2|4;
break;
case SC_EXEEDBREAK:
val1 *= 150; // 150 * skill_lv
@@ -8408,16 +8385,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val1 *= 15; // Defence added
if( sd )
val1 += 10 * pc->checkskill(sd,CR_DEFENDER);
- val_flag |= 1|2;
break;
case SC_BANDING:
tick_time = 5000; // [GodLesZ] tick time
- val_flag |= 1;
- break;
- case SC_SHIELDSPELL_DEF:
- case SC_SHIELDSPELL_MDEF:
- case SC_SHIELDSPELL_REF:
- val_flag |= 1|2;
break;
case SC_MAGNETICFIELD:
val3 = tick / 1000;
@@ -8432,17 +8402,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 1000; // [GodLesZ] tick time
status->change_clear_buffs(bl,3); //Remove buffs/debuffs
break;
- case SC_SPELLFIST:
- case SC_CURSEDCIRCLE_ATKER:
- val_flag |= 1|2|4;
- break;
case SC_CRESCENTELBOW:
val2 = 94 + val1;
- val_flag |= 1|2;
break;
case SC_LIGHTNINGWALK: // [(Job Level / 2) + (40 + 5 * Skill Level)] %
val1 = (sd?sd->status.job_level:2)/2 + 40 + 5 * val1;
- val_flag |= 1;
break;
case SC_RAISINGDRAGON:
val3 = tick / 5000;
@@ -8466,36 +8430,23 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster VIT / 4) x Skill Level]
}
break;
- case SC_PYROTECHNIC_OPTION:
- val_flag |= 1|2|4;
- break;
case SC_HEATER_OPTION:
val2 = 120; // Watk. TODO: Renewal (Atk2)
val3 = 33; // % Increase effects.
val4 = 3; // Change into fire element.
- val_flag |= 1|2|4;
break;
case SC_TROPIC_OPTION:
val2 = 180; // Watk. TODO: Renewal (Atk2)
val3 = MG_FIREBOLT;
break;
- case SC_AQUAPLAY_OPTION:
- val2 = 40;
- val_flag |= 1|2|4;
- break;
case SC_COOLER_OPTION:
val2 = 80; // % Freezing chance
val3 = 33; // % increased damage
val4 = 1; // Change into water elemet
- val_flag |= 1|2|4;
break;
case SC_CHILLY_AIR_OPTION:
val2 = 120; // Matk. TODO: Renewal (Matk1)
val3 = MG_COLDBOLT;
- val_flag |= 1|2;
- break;
- case SC_GUST_OPTION:
- val_flag |= 1|2;
break;
case SC_WIND_STEP_OPTION:
val2 = 50; // % Increase speed and flee.
@@ -8503,30 +8454,24 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_BLAST_OPTION:
val2 = 20;
val3 = ELE_WIND;
- val_flag |= 1|2|4;
break;
case SC_WILD_STORM_OPTION:
val2 = MG_LIGHTNINGBOLT;
- val_flag |= 1|2;
break;
case SC_PETROLOGY_OPTION:
val2 = 5;
val3 = 50;
- val_flag |= 1|2|4;
break;
case SC_CURSED_SOIL_OPTION:
val2 = 10;
val3 = 33;
val4 = 2;
- val_flag |= 1|2|4;
break;
case SC_UPHEAVAL_OPTION:
val2 = WZ_EARTHSPIKE;
- val_flag |= 1|2;
break;
case SC_CIRCLE_OF_FIRE_OPTION:
val2 = 300;
- val_flag |= 1|2;
break;
case SC_FIRE_CLOAK_OPTION:
case SC_WATER_DROP_OPTION:
@@ -8548,7 +8493,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_WATER_BARRIER:
val2 = 40; // Increasement. Mdef1 ???
val3 = 20; // Reductions. Atk2, Flee1, Matk1 ????
- val_flag |= 1|2|4;
break;
case SC_ZEPHYR:
val2 = 22; // Flee.
@@ -8680,7 +8624,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_MONSTER_TRANSFORM:
if( !mob->db_checkid(val1) )
val1 = 1002; // default poring
- val_flag |= 1;
break;
default:
if( calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0 )
@@ -8704,20 +8647,135 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_KAAHI:
val4 = INVALID_TIMER;
break;
- case SC_SUMMON1:
- case SC_SUMMON2:
- case SC_SUMMON3:
- case SC_SUMMON4:
- case SC_SUMMON5:
- case SC_MONSTER_TRANSFORM:
- val_flag |= 1;
- break;
case SC_KYOUGAKU:
clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
break;
}
}
+ /* values that must be set regardless of flag&4 e.g. val_flag */
+ switch(type) {
+ case SC_FIGHTINGSPIRIT:
+ val_flag |= 1|2;
+ break;
+ case SC_VENOMIMPRESS:
+ val_flag |= 1|2;
+ break;
+ case SC_POISONINGWEAPON:
+ val_flag |= 1|2|4;
+ break;
+ case SC_WEAPONBLOCKING:
+ val_flag |= 1|2;
+ break;
+ case SC_ROLLINGCUTTER:
+ val_flag |= 1;
+ break;
+ case SC_CLOAKINGEXCEED:
+ val_flag |= 1|2|4;
+ break;
+ case SC_HALLUCINATIONWALK:
+ val_flag |= 1|2|4;
+ break;
+ case SC_SUMMON1:
+ case SC_SUMMON2:
+ case SC_SUMMON3:
+ case SC_SUMMON4:
+ case SC_SUMMON5:
+ val_flag |= 1;
+ break;
+ case SC__SHADOWFORM:
+ val_flag |= 1|2|4;
+ break;
+ case SC__INVISIBILITY:
+ val_flag |= 1|2;
+ break;
+ case SC__ENERVATION:
+ val_flag |= 1|2;
+ break;
+ case SC__GROOMY:
+ val_flag |= 1|2|4;
+ break;
+ case SC__LAZINESS:
+ val_flag |= 1|2|4;
+ break;
+ case SC__UNLUCKY:
+ val_flag |= 1|2|4;
+ break;
+ case SC__WEAKNESS:
+ val_flag |= 1|2;
+ break;
+ case SC_PROPERTYWALK:
+ val_flag |= 1|2;
+ break;
+ case SC_FORCEOFVANGUARD:
+ val_flag |= 1|2|4;
+ break;
+ case SC_PRESTIGE:
+ val_flag |= 1|2;
+ break;
+ case SC_BANDING:
+ val_flag |= 1;
+ break;
+ case SC_SHIELDSPELL_DEF:
+ case SC_SHIELDSPELL_MDEF:
+ case SC_SHIELDSPELL_REF:
+ val_flag |= 1|2;
+ break;
+ case SC_SPELLFIST:
+ case SC_CURSEDCIRCLE_ATKER:
+ val_flag |= 1|2|4;
+ break;
+ case SC_CRESCENTELBOW:
+ val2 = 94 + val1;
+ val_flag |= 1|2;
+ break;
+ case SC_LIGHTNINGWALK:
+ val_flag |= 1;
+ break;
+ case SC_PYROTECHNIC_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_HEATER_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_AQUAPLAY_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_COOLER_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_CHILLY_AIR_OPTION:
+ val_flag |= 1|2;
+ break;
+ case SC_GUST_OPTION:
+ val_flag |= 1|2;
+ break;
+ case SC_BLAST_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_WILD_STORM_OPTION:
+ val_flag |= 1|2;
+ break;
+ case SC_PETROLOGY_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_CURSED_SOIL_OPTION:
+ val_flag |= 1|2|4;
+ break;
+ case SC_UPHEAVAL_OPTION:
+ val_flag |= 1|2;
+ break;
+ case SC_CIRCLE_OF_FIRE_OPTION:
+ val_flag |= 1|2;
+ break;
+ case SC_WATER_BARRIER:
+ val_flag |= 1|2|4;
+ break;
+ case SC_MONSTER_TRANSFORM:
+ val_flag |= 1;
+ break;
+ }
+
/* [Ind/Hercules] */
if( sd && status->DisplayType[type] ) {
int dval1 = 0, dval2 = 0, dval3 = 0;