diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-19 20:53:36 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-19 20:53:36 +0000 |
commit | d7af6a74ec465f3e741cddeb222b208d4fd38f46 (patch) | |
tree | dab314abfdc188b4d372e93a93b1a296c5c61e5b | |
parent | cba78be11327390da594bf212497e088cc42d8f6 (diff) | |
download | hercules-d7af6a74ec465f3e741cddeb222b208d4fd38f46.tar.gz hercules-d7af6a74ec465f3e741cddeb222b208d4fd38f46.tar.bz2 hercules-d7af6a74ec465f3e741cddeb222b208d4fd38f46.tar.xz hercules-d7af6a74ec465f3e741cddeb222b208d4fd38f46.zip |
- Fixed parsing of @kamic/@kamib to check for case.
- Now you can hide from Pressure.
- Weapon endowing will work on targets already endowed with the same element.
- Now reseff cards will take effect even if the status change is passed with &8 flag. In short, now reseff are ALWAYS applied to the status change defense.
- Removed a missing break that was making AM_TWILIGHT2/3 always fail.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5327 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 10 | ||||
-rw-r--r-- | conf-tmpl/battle/battle.conf | 4 | ||||
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 23 | ||||
-rw-r--r-- | src/map/status.c | 33 |
5 files changed, 44 insertions, 30 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ace5de05e..4793f6492 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,16 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
+2006/02/19
+ * Fixed parsing of @kamic/@kamib to check for case. [Skotlex]
+ * Now you can hide from Pressure. [Skotlex]
+ * Weapon endowing will work on targets already endowed with the same
+ element. [Skotlex]
+ * Now reseff cards will take effect even if the status change is passed
+ with &8 flag. In short, now reseff are ALWAYS applied to the status change
+ defense. [Skotlex]
+ * Removed a missing break that was making AM_TWILIGHT2/3 always fail.
+ [Skotlex]
2006/02/18
* Removed the SP_<stat> cases from status_get_sc_def as they were colliding
with other status changes. [Skotlex]
diff --git a/conf-tmpl/battle/battle.conf b/conf-tmpl/battle/battle.conf index a2546a04f..42f5cd934 100644 --- a/conf-tmpl/battle/battle.conf +++ b/conf-tmpl/battle/battle.conf @@ -159,7 +159,7 @@ pc_status_def_rate: 100 mob_status_def_rate: 100 // Maximum resistance to status changes. (10000 = 100%) -// NOTE: This is applied after cards and equipment. -// So inmunity cards will be capped to this value. +// NOTE: This is applied before cards and equipment. +// So inmunity cards can go beyond to this value. pc_max_status_def: 10000 mob_max_status_def: 10000 diff --git a/src/map/atcommand.c b/src/map/atcommand.c index f39c63dc3..48157c3e2 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2387,7 +2387,7 @@ int atcommand_kami( memset(atcmd_output, '\0', sizeof(atcmd_output));
- if(*(command + 5) != 'c') {
+ if(*(command + 5) != 'c' && *(command + 5) != 'C') {
if (!message || !*message) {
clif_displaymessage(fd, "Please, enter a message (usage: @kami <message>).");
@@ -2395,7 +2395,7 @@ int atcommand_kami( }
sscanf(message, "%199[^\n]", atcmd_output);
- intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
+ intif_GMmessage(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
} else {
diff --git a/src/map/skill.c b/src/map/skill.c index 405e5a109..07ef6e066 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3424,14 +3424,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case SA_SEISMICWEAPON:
if (dstsd) {
if(dstsd->status.weapon == 0 ||
- (dstsd->sc.count && (
- dstsd->sc.data[SC_FIREWEAPON].timer != -1 ||
- dstsd->sc.data[SC_WATERWEAPON].timer != -1 ||
- dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
- dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
- dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
- dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
- dstsd->sc.data[SC_ENCPOISON].timer != -1
+ (dstsd->sc.count && dstsd->sc.data[type].timer == -1 &&
+ ( //Allow re-enchanting to lenghten time. [Skotlex]
+ dstsd->sc.data[SC_FIREWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_WATERWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
+ dstsd->sc.data[SC_ENCPOISON].timer != -1
))
) {
if (sd) clif_skill_fail(sd,skillid,0,0);
@@ -3596,8 +3597,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in dstsd->sc.data[SC_WINDWEAPON].timer != -1 ||
dstsd->sc.data[SC_EARTHWEAPON].timer != -1 ||
dstsd->sc.data[SC_SHADOWWEAPON].timer != -1 ||
- dstsd->sc.data[SC_GHOSTWEAPON].timer != -1 ||
- dstsd->sc.data[SC_ENCPOISON].timer != -1) {
+ dstsd->sc.data[SC_GHOSTWEAPON].timer != -1
+ // dstsd->sc.data[SC_ENCPOISON].timer != -1 //People say you should be able to recast to lengthen the timer. [Skotlex]
+ ) {
clif_skill_nodamage(src,bl,skillid,skilllv,0);
clif_skill_fail(sd,skillid,0,0);
break;
@@ -7968,6 +7970,7 @@ int skill_check_condition(struct map_session_data *sd,int type) clif_skill_fail(sd,skill,0,0);
return 0;
}
+ break;
//SHOULD BE OPTIMALIZED [Komurka]
case SG_SUN_WARM:
if ((sd->bl.m == sd->feel_map[0].m) || (sd->sc.data[SC_MIRACLE].timer!=-1))
diff --git a/src/map/status.c b/src/map/status.c index d9f958f1e..8ceb69c06 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -343,9 +343,15 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int if (target && status_isdead(target) && skill_num != ALL_RESURRECTION && skill_num != PR_REDEMPTIO)
return 0;
- if (skill_num == PA_PRESSURE && flag)
- return 1; //Once Gloria Domini has been casted, there's nothing you can do to stop it. [Skotlex]
-
+ if (skill_num == PA_PRESSURE && flag) {
+ //Once Gloria Domini has been casted, there's nothing you can do to stop it. [Skotlex]
+ //- Except hiding from it.
+ tsc = target?status_get_sc(target):NULL;
+ if(tsc && tsc->option&OPTION_HIDE)
+ return 0;
+ return 1;
+ }
+
mode = src?status_get_mode(src):MD_CANATTACK;
if (!skill_num && !(mode&MD_CANATTACK))
@@ -3271,7 +3277,6 @@ int status_get_sc_def(struct block_list *bl, int type) {
int sc_def;
struct status_change* sc;
- struct map_session_data *sd;
nullpo_retr(0, bl);
//Status that are blocked by Golden Thief Bug card or Wand of Hermod
@@ -3351,12 +3356,6 @@ int status_get_sc_def(struct block_list *bl, int type) sc_def += 100*sc->data[SC_SIEGFRIED].val2; //Status resistance.
}
- sd = bl->type==BL_PC?(struct map_session_data*)bl:NULL;
-
- if(sd && SC_COMMON_MIN<=type && type<=SC_COMMON_MAX &&
- sd->reseff[type-SC_COMMON_MIN] > 0)
- sc_def += sd->reseff[type-SC_COMMON_MIN];
-
if(bl->type == BL_PC) {
if (sc_def > battle_config.pc_max_sc_def)
sc_def = battle_config.pc_max_sc_def;
@@ -3494,12 +3493,14 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val //Check rate
if (!(flag&(4|1))) {
rate*=100; //Pass to 10000 = 100%
- if (!(flag&8)) {
- race = status_get_sc_def(bl, type);
- if (race)
- rate -= rate*race/10000;
- }
-
+ race = flag&8?0:status_get_sc_def(bl, type); //recycling race to store the sc_def value.
+ //sd resistance applies even if the flag is &8
+ if(sd && SC_COMMON_MIN<=type && type<=SC_COMMON_MAX && sd->reseff[type-SC_COMMON_MIN] > 0)
+ race+= sd->reseff[type-SC_COMMON_MIN];
+
+ if (race)
+ rate -= rate*race/10000;
+
if (!(rand()%10000 < rate))
return 0;
}
|