summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-08 11:36:34 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-08 11:36:34 +0000
commitbce77426d42cb845ca1c2d81b027d3f1ced293d5 (patch)
tree6e0ee15b16f0a949087b7b9a5728a68c33d981eb
parent89bb1a8cd77e095cd85d698cd134b91f00c8d99c (diff)
downloadhercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.gz
hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.bz2
hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.xz
hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.zip
Fixed bugreport:5513 Chaos Panic should now inflict Confusion/Chaos effect work properly.
Follow up r16085 Fixed the min cap value for negative mdef. Thanks Epoque git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16086 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/const.txt97
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/status.c8
-rw-r--r--src/map/status.h23
4 files changed, 63 insertions, 68 deletions
diff --git a/db/const.txt b/db/const.txt
index f050d3836..2fd7a5cce 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -1155,55 +1155,54 @@ SC__UNLUCKY 455
SC__WEAKNESS 456
SC__STRIPACCESSORY 457
SC__MANHOLE 458
-SC_CHAOS 459
-SC__BLOODYLUST 460
-SC_CIRCLE_OF_FIRE 461
-SC_CIRCLE_OF_FIRE_OPTION 462
-SC_FIRE_CLOAK 463
-SC_FIRE_CLOAK_OPTION 464
-SC_WATER_SCREEN 465
-SC_WATER_SCREEN_OPTION 466
-SC_WATER_DROP 467
-SC_WATER_DROP_OPTION 468
-SC_WATER_BARRIER 469
-SC_WIND_STEP 470
-SC_WIND_STEP_OPTION 471
-SC_WIND_CURTAIN 472
-SC_WIND_CURTAIN_OPTION 473
-SC_ZEPHYR 474
-SC_SOLID_SKIN 475
-SC_SOLID_SKIN_OPTION 476
-SC_STONE_SHIELD 477
-SC_STONE_SHIELD_OPTION 478
-SC_POWER_OF_GAIA 479
-SC_PYROTECHNIC 480
-SC_PYROTECHNIC_OPTION 481
-SC_HEATER 482
-SC_HEATER_OPTION 483
-SC_TROPIC 484
-SC_TROPIC_OPTION 485
-SC_AQUAPLAY 486
-SC_AQUAPLAY_OPTION 487
-SC_COOLER 488
-SC_COOLER_OPTION 489
-SC_CHILLY_AIR 490
-SC_CHILLY_AIR_OPTION 491
-SC_GUST 492
-SC_GUST_OPTION 493
-SC_BLAST 494
-SC_BLAST_OPTION 495
-SC_WILD_STORM 496
-SC_WILD_STORM_OPTION 497
-SC_PETROLOGY 498
-SC_PETROLOGY_OPTION 499
-SC_CURSED_SOIL 500
-SC_CURSED_SOIL_OPTION 501
-SC_UPHEAVAL 502
-SC_UPHEAVAL_OPTION 503
-SC_TIDAL_WEAPON 504
-SC_TIDAL_WEAPON_OPTION 505
-SC_ROCK_CRUSHER 506
-SC_ROCK_CRUSHER_ATK 507
+SC__BLOODYLUST 459
+SC_CIRCLE_OF_FIRE 460
+SC_CIRCLE_OF_FIRE_OPTION 461
+SC_FIRE_CLOAK 462
+SC_FIRE_CLOAK_OPTION 463
+SC_WATER_SCREEN 464
+SC_WATER_SCREEN_OPTION 465
+SC_WATER_DROP 466
+SC_WATER_DROP_OPTION 467
+SC_WATER_BARRIER 468
+SC_WIND_STEP 469
+SC_WIND_STEP_OPTION 470
+SC_WIND_CURTAIN 471
+SC_WIND_CURTAIN_OPTION 472
+SC_ZEPHYR 473
+SC_SOLID_SKIN 474
+SC_SOLID_SKIN_OPTION 475
+SC_STONE_SHIELD 476
+SC_STONE_SHIELD_OPTION 477
+SC_POWER_OF_GAIA 478
+SC_PYROTECHNIC 479
+SC_PYROTECHNIC_OPTION 480
+SC_HEATER 481
+SC_HEATER_OPTION 482
+SC_TROPIC 483
+SC_TROPIC_OPTION 484
+SC_AQUAPLAY 485
+SC_AQUAPLAY_OPTION 486
+SC_COOLER 487
+SC_COOLER_OPTION 488
+SC_CHILLY_AIR 489
+SC_CHILLY_AIR_OPTION 490
+SC_GUST 491
+SC_GUST_OPTION 492
+SC_BLAST 493
+SC_BLAST_OPTION 494
+SC_WILD_STORM 495
+SC_WILD_STORM_OPTION 496
+SC_PETROLOGY 497
+SC_PETROLOGY_OPTION 498
+SC_CURSED_SOIL 499
+SC_CURSED_SOIL_OPTION 500
+SC_UPHEAVAL 501
+SC_UPHEAVAL_OPTION 502
+SC_TIDAL_WEAPON 503
+SC_TIDAL_WEAPON_OPTION 504
+SC_ROCK_CRUSHER 505
+SC_ROCK_CRUSHER_ATK 506
e_gasp 0
e_what 1
diff --git a/src/map/battle.c b/src/map/battle.c
index f7c206228..b38214d52 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3590,7 +3590,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
* Damage from magic = Magic Attack * 111.5/(111.5+eMDEF)
* Damage = Magic Attack * 111.5/(111.5+eMDEF) - sMDEF
**/
- ad.damage = ad.damage * 1115 / ((mdef*-1>111?-1:1)*(1115 + mdef * 10)) - mdef2;
+ if(mdef < -111) mdef = -111; // value smaller -111 brings back the damage to origin up to -223.
+ ad.damage = ad.damage * 1115 / (1115 + mdef * 10) - mdef2;
#else
if(battle_config.magic_defense_type)
ad.damage = ad.damage - mdef*battle_config.magic_defense_type - mdef2;
diff --git a/src/map/status.c b/src/map/status.c
index c1ed31d4a..6f31613aa 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -612,7 +612,7 @@ void initChangeTables(void)
set_sc( SC_WEAKNESS , SC__WEAKNESS , SI_WEAKNESS , SCB_FLEE2|SCB_MAXHP );
set_sc( SC_STRIPACCESSARY , SC__STRIPACCESSORY , SI_STRIPACCESSARY , SCB_DEX|SCB_INT|SCB_LUK );
set_sc_with_vfx( SC_MANHOLE , SC__MANHOLE , SI_MANHOLE , SCB_NONE );
- add_sc( SC_CHAOSPANIC , SC_CHAOS );
+ add_sc( SC_CHAOSPANIC , SC_CONFUSION );
set_sc( SC_BLOODYLUST , SC__BLOODYLUST , SI_BLOODYLUST , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK );
/**
* Sura
@@ -6468,8 +6468,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC__IGNORANCE:
case SC__LAZINESS:
case SC__WEAKNESS:
- case SC__UNLUCKY:
- case SC_CHAOS:
+ case SC__UNLUCKY:
return 0;
case SC_COMBO:
case SC_DANCING:
@@ -7901,7 +7900,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_BITE:
case SC_THORNSTRAP:
case SC__MANHOLE:
- case SC_CHAOS:
case SC_CRYSTALIZE:
case SC_WHITEIMPRISON:
case SC_VACUUM_EXTREME:
@@ -7945,7 +7943,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SILENCE: sc->opt2 |= OPT2_SILENCE; break;
case SC_SIGNUMCRUCIS:
- case SC_CHAOS:
sc->opt2 |= OPT2_SIGNUMCRUCIS;
break;
@@ -8763,7 +8760,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc->opt2 &= ~OPT2_DPOISON;
break;
case SC_SIGNUMCRUCIS:
- case SC_CHAOS:
sc->opt2 &= ~OPT2_SIGNUMCRUCIS;
break;
diff --git a/src/map/status.h b/src/map/status.h
index da9471467..141a272ef 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -534,8 +534,7 @@ typedef enum sc_type {
SC__WEAKNESS,
SC__STRIPACCESSORY,
SC__MANHOLE,
- SC_CHAOS,
- SC__BLOODYLUST,//460
+ SC__BLOODYLUST,//459
/**
* Elemental Spirits
**/
@@ -543,53 +542,53 @@ typedef enum sc_type {
SC_CIRCLE_OF_FIRE_OPTION,
SC_FIRE_CLOAK,
SC_FIRE_CLOAK_OPTION,
- SC_WATER_SCREEN,//465
+ SC_WATER_SCREEN,//464
SC_WATER_SCREEN_OPTION,
SC_WATER_DROP,
SC_WATER_DROP_OPTION,
SC_WATER_BARRIER,
- SC_WIND_STEP,//470
+ SC_WIND_STEP,//469
SC_WIND_STEP_OPTION,
SC_WIND_CURTAIN,
SC_WIND_CURTAIN_OPTION,
SC_ZEPHYR,
- SC_SOLID_SKIN,//475
+ SC_SOLID_SKIN,//474
SC_SOLID_SKIN_OPTION,
SC_STONE_SHIELD,
SC_STONE_SHIELD_OPTION,
SC_POWER_OF_GAIA,
- SC_PYROTECHNIC,//480
+ SC_PYROTECHNIC,//479
SC_PYROTECHNIC_OPTION,
SC_HEATER,
SC_HEATER_OPTION,
SC_TROPIC,
- SC_TROPIC_OPTION,//485
+ SC_TROPIC_OPTION,//484
SC_AQUAPLAY,
SC_AQUAPLAY_OPTION,
SC_COOLER,
SC_COOLER_OPTION,
- SC_CHILLY_AIR,//490
+ SC_CHILLY_AIR,//489
SC_CHILLY_AIR_OPTION,
SC_GUST,
SC_GUST_OPTION,
SC_BLAST,
- SC_BLAST_OPTION,//495
+ SC_BLAST_OPTION,//494
SC_WILD_STORM,
SC_WILD_STORM_OPTION,
SC_PETROLOGY,
SC_PETROLOGY_OPTION,
- SC_CURSED_SOIL,//500
+ SC_CURSED_SOIL,//499
SC_CURSED_SOIL_OPTION,
SC_UPHEAVAL,
SC_UPHEAVAL_OPTION,
SC_TIDAL_WEAPON,
- SC_TIDAL_WEAPON_OPTION,//505
+ SC_TIDAL_WEAPON_OPTION,//504
SC_ROCK_CRUSHER,
SC_ROCK_CRUSHER_ATK,
/* Guild Aura */
SC_LEADERSHIP,
SC_GLORYWOUNDS,
- SC_SOULCOLD, //510
+ SC_SOULCOLD, //509
SC_HAWKEYES,
SC_ODINS_POWER,
SC_RAID,