Ver Fonte

- 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://svn.code.sf.net/p/rathena/svn/trunk@5327 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex há 19 anos atrás
pai
commit
591f2d8046
5 ficheiros alterados com 44 adições e 30 exclusões
  1. 10 0
      Changelog-Trunk.txt
  2. 2 2
      conf-tmpl/battle/battle.conf
  3. 2 2
      src/map/atcommand.c
  4. 13 10
      src/map/skill.c
  5. 17 16
      src/map/status.c

+ 10 - 0
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]

+ 2 - 2
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

+ 2 - 2
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 {
 	

+ 13 - 10
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))

+ 17 - 16
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;
 	}