Browse Source

- Increased Shield Chain's range by one. It is now a ranged skill.
- Added SC_CHANGEUNDEAD to differentiate it from the other elemental change skills. It now fails on Undead/Dark elemental targets.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10008 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 18 years ago
parent
commit
a132a2c72c
6 changed files with 18 additions and 6 deletions
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      conf-tmpl/battle/battle.conf
  3. 3 0
      db/Changelog.txt
  4. 1 1
      db/skill_db.txt
  5. 9 2
      src/map/status.c
  6. 1 1
      src/map/status.h

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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.
 
 2007/03/15
+	* Added SC_CHANGEUNDEAD to differentiate it from the other elemental change
+	  skills. It now fails on Undead/Dark elemental targets.
 	* Corrected party item share settings not being properly updated on logon.
 	* Corrected battle_attr_none setting applying to elemental attacks instead
 	  of neutral ones. [Skotlex]

+ 2 - 2
conf-tmpl/battle/battle.conf

@@ -69,10 +69,10 @@ multihit_delay: 80
 // (Setting to no/0  will be like always endure)
 player_damage_delay_rate: 100
 
-// Undead type differeniate.
+// Should race or element be used to consider someone undead?
 // 0 = element undead
 // 1 = race undead
-// 2 = both
+// 2 = both (either one works)
 undead_detect_type: 0
 
 // Does HP recover if hit by an attribute that's same as your own? (Note 1)

+ 3 - 0
db/Changelog.txt

@@ -19,6 +19,9 @@
 	-----
 
 ========================
+03/15
+	* Increased Shield Chain's range by one. It is now a ranged skill.
+	  [Skotlex]
 03/12
 	* Updated the "AddEffWhenHit" cards [Playtester]
 	- chances got lowered according to Aegis, Freya, cRO and euRO

+ 1 - 1
db/skill_db.txt

@@ -518,7 +518,7 @@
 477,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0	//WS_WEAPONREFINE#Upgrade Weapon#
 478,3,6,2,0,0x3,3,10,1,no,0,0,0,none,0	//CR_SLIMPITCHER#Aid Condensed Potion#
 479,1,6,16,0,0x1,0,5,1,yes,0,0,0,weapon,0	//CR_FULLPROTECTION#Full Protection#
-480,4,8,1,0,0,0,5,5,no,0,0,0,weapon,0	//PA_SHIELDCHAIN#Shield Chain#
+480,5,8,1,0,0,0,5,5,no,0,0,0,weapon,0	//PA_SHIELDCHAIN#Shield Chain#
 481,0,0,0,0,0,0,5,0,no,0,0,0,none,0	//HP_MANARECHARGE#Mana Recharge#
 482,0,6,4,0,0x1,0,5,1,no,0,0,0,magic,0	//PF_DOUBLECASTING#Double Casting#
 483,9,6,2,0,0x1,1,1,1,no,0,0,0,none,0	//HW_GANBANTEIN#Ganbantein#

+ 9 - 2
src/map/status.c

@@ -278,7 +278,7 @@ void initChangeTables(void) {
 	add_sc(NPC_STOP, SC_STOP);
 	set_sc(NPC_BREAKWEAPON, SC_BROKENWEAPON, SI_BROKENWEAPON, SCB_NONE);
 	set_sc(NPC_BREAKARMOR, SC_BROKENARMOR, SI_BROKENARMOR, SCB_NONE);
-	add_sc(NPC_CHANGEUNDEAD, SC_ELEMENTALCHANGE);
+	set_sc(NPC_CHANGEUNDEAD, SC_CHANGEUNDEAD, SI_UNDEAD, SCB_DEF_ELE);
 	set_sc(NPC_POWERUP, SC_INCDEXRATE, SI_BLANK, SCB_DEX);
 	set_sc(NPC_AGIUP, SC_INCFLEERATE, SI_BLANK, SCB_AGI);
 	add_sc(NPC_INVISIBLE, SC_CLOAKING);
@@ -421,7 +421,6 @@ void initChangeTables(void) {
 	//This seems wrong as it sets the same icon to all skills that change your 
 	//element, but alas, all of them are mob-target only with the exception of
 	//NPC_CHANGEUNDEAD, so this should be alright. [Skotlex]
-	StatusIconChangeTable[SC_ELEMENTALCHANGE] = SI_UNDEAD;
 	StatusIconChangeTable[SC_STRFOOD] = SI_FOODSTR;
 	StatusIconChangeTable[SC_AGIFOOD] = SI_FOODAGI;
 	StatusIconChangeTable[SC_VITFOOD] = SI_FOODVIT;
@@ -3871,6 +3870,8 @@ static unsigned char status_calc_element(struct block_list *bl, struct status_ch
 		return ELE_EARTH;
 	if( sc->data[SC_BENEDICTIO].timer!=-1 )
 		return ELE_HOLY;
+	if( sc->data[SC_CHANGEUNDEAD].timer!=-1)
+		return sc->data[SC_CHANGEUNDEAD].val3;
 	if( sc->data[SC_ELEMENTALCHANGE].timer!=-1)
 		return sc->data[SC_ELEMENTALCHANGE].val3;
 	return cap_value(element,0,UCHAR_MAX);
@@ -3886,6 +3887,8 @@ static unsigned char status_calc_element_lv(struct block_list *bl, struct status
 		return 1;
 	if( sc->data[SC_BENEDICTIO].timer!=-1 )
 		return 1;
+	if( sc->data[SC_CHANGEUNDEAD].timer!=-1)
+		return 1;
 	if(sc->data[SC_ELEMENTALCHANGE].timer!=-1)
 		return sc->data[SC_ELEMENTALCHANGE].val4;
 	return cap_value(lv,1,4);
@@ -4563,6 +4566,10 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
 		if (status->def_ele == ELE_DARK && !(flag&1))
 			return 0;
 	break;
+	case SC_CHANGEUNDEAD: //Undead/Dark are inmune to it.
+		if ((status->def_ele == ELE_DARK || undead_flag) && !(flag&1))
+			return 0;
+	break;
 	case SC_COMA:
 		//Dark elementals and Demons are inmune to coma.
 		if((status->def_ele == ELE_DARK || status->race == RC_DEMON) && !(flag&1))

+ 1 - 1
src/map/status.h

@@ -136,7 +136,7 @@ enum {
 	SC_REJECTSWORD,
 	SC_MARIONETTE,
 	SC_MARIONETTE2,
-	SC_UNUSED,	//Unused (was SC_MOONLIT)
+	SC_CHANGEUNDEAD,
 	SC_JOINTBEAT,
 	SC_MINDBREAKER, //130
 	SC_MEMORIZE,