Explorar o código

* Implemented the Manuk and Splendide item status effects, thanks to Epoque.
* Implemented Manuk and Splendide consumable items.
* Added Splendide and Manuk merchants.

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

L0ne_W0lf %!s(int64=15) %!d(string=hai) anos
pai
achega
387bcdf5ae

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2010/06/01
+	* Rev. 14327 Implemented the Manuk and Splendide item status effects, thanks to Epoque. [L0ne_W0lf]
 2010/05/31
 	* Added support for using 'town', 'autotrade', 'allowks', 'monster_noteleport', 'pvp_nocalcrank' and 'battleground' mapflags in scripts (bugreport:4226). [Paradox924X]
 	* Replaced all occurrences of 'leaved' with 'withdraw'. [Paradox924X]

+ 1 - 0
db/Changelog.txt

@@ -9,6 +9,7 @@
 	13005 Angelic Wing Dagger:	NEED INFO.
 =======================
 2010/06/01
+	* Rev. 14327 Implemented Manuk and Splendide consumable items. [L0ne_W0lf]
 	* Rev. 14325 Fixed Dark Shadow having Nydhoggr's Shadow's MVP exp reward. (Bugreport:4247) [L0ne_W0lf]
 	* Corrected the races for Dark Pinguicula and Ancient Tree. (bugreport:4265)
 2010/05/31

+ 6 - 0
db/const.txt

@@ -837,6 +837,12 @@ SC_JEXPBOOST	292
 SC_HELLPOWER	294
 SC_INVINCIBLE	295
 SC_INVINCIBLEOFF	296
+SC_MANU_ATK	297
+SC_MANU_DEF	298
+SC_SPL_ATK	299
+SC_SPL_DEF	300
+SC_MANU_MATK	301
+SC_SPL_MATK	302
 
 e_gasp	0
 e_what	1

+ 6 - 6
db/item_db.txt

@@ -4331,14 +4331,14 @@
 12339,Cherish_Box_Ori,Treasure Edition Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12340,Mysterious_Rice_Powder,Chewy Rice Powder,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12341,Special_Alloy_Trap_Box,Special Alloy Trap Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12342,Manuk's_Opportunity,Manuk's Opportunity,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12343,Manuk's_Courage,Manuk's Courage,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MANU_DEF,600000,RG_Manuk;},{},{}
-12344,Pinguicula's_fruit_Jam,Pinguicula's Fruit Jam,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12345,Luciola's_Honey_Jam,Luciola's Honey Jam,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12342,Manuk's_Opportunity,Manuk's Opportunity,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MANU_ATK,600000,10; },{},{}
+12343,Manuk's_Courage,Manuk's Courage,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MANU_DEF,600000,10; },{},{}
+12344,Pinguicula's_fruit_Jam,Pinguicula's Fruit Jam,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SPL_ATK,600000,10; },{},{}
+12345,Luciola's_Honey_Jam,Luciola's Honey Jam,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SPL_DEF,600000,10; },{},{}
 12346,Unripe_Acorn,Unripe Acorn,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal -100,0; },{},{}
 12347,Acorn_Jelly,Acorn Jelly,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12348,Manuk's_Faith,Manuk's Faith,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12349,Cornus'_Tears,Cornus' Tears,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12348,Manuk's_Faith,Manuk's Faith,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MANU_MATK,600000,10; },{},{}
+12349,Cornus'_Tears,Cornus' Tears,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SPL_MATK,600000,10; },{},{}
 12350,Angeling_Potion,Angeling Potion,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12351,Shout_Megaphone,Scream Megaphone,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12352,Dun_Tele_Scroll3,Dungeon Teleport Scroll 3,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}

+ 3 - 0
npc/Changelog.txt

@@ -1,5 +1,8 @@
 Date		Added
 ======
+2010/06/01
+	* Rev. 14327 Added Splendide and Manuk merchants. [L0ne_W0lf]
+2010/05/30
 	* Rev. 14315 Shop update, and added Wanderer pet food maker NPC. [L0ne_W0lf]
 	- Added Trading merchants, (ninja& gunslinger) to Izlude and Alberta.
 	- Made Brasilis shop names unique, and uncommented.

+ 3 - 2
npc/quests/quests_13_2.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.7a
+//= 1.8
 //===== Compatible With: =====================================
 //= eAthena SVN
 //===== Description: =========================================
@@ -28,6 +28,7 @@
 //= 1.6 Added the Yggdrasil Dungeon floor 2 puzzle.
 //= 1.7 Added daily quest 'Dragon Egg collection.'
 //= 1.7a Fixed a translation typo. Tabb -> Taab.
+//= 1.8 Added a missing " in the GM only NPC.
 //============================================================ 
 
 // Cat Hand Addition.
@@ -6801,7 +6802,7 @@ mid_camp,7,3,0	script	Translator Preparation#1	708,{
 			next;
 			mes "[EP 13 Translator Quest Preparation]";
 			mes "Current report quest's item is "+ ep13_1_edq +" ";
-			mes "Start Quest?;
+			mes "Start Quest?";
 			next;
 			switch(select("Yes:No")) {
 			case 1:

+ 2 - 0
npc/scripts_athena.conf

@@ -56,6 +56,8 @@ npc: npc/merchants/gemstone.txt
 npc: npc/merchants/advanced_refiner.txt
 npc: npc/merchants/elemental_trader.txt
 npc: npc/merchants/enchan_arm.txt
+npc: npc/merchants/manuk.txt
+npc: npc/merchants/splendide.txt
 npc: npc/merchants/wander_pet_food.txt
 // Cash Shop
 // See file before enabling, as you may wish to change the

+ 39 - 0
src/map/battle.c

@@ -430,6 +430,23 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
 				damage >>= 2; //75% reduction
 		}
 
+		// Compressed code, fixed by map.h [Epoque]
+		if (src->type == BL_MOB) {
+			int i;
+			if (sc->data[SC_MANU_DEF])
+				for (i=0;ARRAYLENGTH(mob_manuk)>i;i++)
+					if (mob_manuk[i]==((TBL_MOB*)src)->class_) {
+						damage -= sc->data[SC_MANU_DEF]->val1*damage/100;
+						break;
+					}
+			if (sc->data[SC_SPL_DEF])
+				for (i=0;ARRAYLENGTH(mob_splendide)>i;i++)
+					if (mob_splendide[i]==((TBL_MOB*)src)->class_) {
+						damage -= sc->data[SC_SPL_DEF]->val1*damage/100;
+						break;
+					}
+		}
+
 		if((sce=sc->data[SC_ARMOR]) && //NPC_DEFENDER
 			sce->val3&flag && sce->val4&flag)
 			damage -= damage*sc->data[SC_ARMOR]->val2/100;
@@ -493,6 +510,28 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
 	{
 		if( sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
 			damage += damage * 75 / 100;
+		// [Epoque]
+		if (bl->type == BL_MOB)
+		{
+			int i;
+
+			if ( ((sce=sc->data[SC_MANU_ATK]) && (flag&BF_WEAPON)) ||
+				 ((sce=sc->data[SC_MANU_MATK]) && (flag&BF_MAGIC))
+				)
+				for (i=0;ARRAYLENGTH(mob_manuk)>i;i++)
+					if (((TBL_MOB*)bl)->class_==mob_manuk[i]) {
+						damage += damage*sce->val1/100;
+						break;
+					}
+			if ( ((sce=sc->data[SC_SPL_ATK]) && (flag&BF_WEAPON)) ||
+				 ((sce=sc->data[SC_SPL_MATK]) && (flag&BF_MAGIC))
+				)
+				for (i=0;ARRAYLENGTH(mob_splendide)>i;i++)
+					if (((TBL_MOB*)bl)->class_==mob_splendide[i]) {
+						damage += damage*sce->val1/100;
+						break;
+					}
+		}
 	}
 
 	if (battle_config.pk_mode && sd && bl->type == BL_PC && damage)

+ 4 - 0
src/map/mob.c

@@ -73,6 +73,10 @@ static struct {
 
 #define CLASSCHANGE_BOSS_NUM 21
 
+//Defines the Manuk/Splendide mob groups for the status reductions [Epoque]
+const int mob_manuk[] = { 1986, 1987, 1988, 1989, 1990, 1997, 1998, 1999 };
+const int mob_splendide[] = { 1991, 1992, 1993, 1994, 1995 };
+
 /*==========================================
  * Local prototype declaration   (only required thing)
  *------------------------------------------*/

+ 4 - 0
src/map/mob.h

@@ -38,6 +38,10 @@
 //Used to determine default enemy type of mobs (for use in eachinrange calls)
 #define DEFAULT_ENEMY_TYPE(md) (md->special_state.ai?BL_CHAR:BL_PC|BL_HOM|BL_MER)
 
+//Externals for the status effects. [Epoque]
+extern const int mob_manuk[];
+extern const int mob_splendide[];
+
 //Mob skill states.
 enum MobSkillState {
 	MSS_ANY = -1,

+ 17 - 0
src/map/status.c

@@ -476,6 +476,12 @@ void initChangeTables(void)
 	StatusIconChangeTable[SC_LUKFOOD] = SI_FOODLUK;
 	StatusIconChangeTable[SC_FLEEFOOD]= SI_FOODFLEE;
 	StatusIconChangeTable[SC_HITFOOD] = SI_FOODHIT;
+	StatusIconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
+	StatusIconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
+	StatusIconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
+	StatusIconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
+	StatusIconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
+	StatusIconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
 	//Cash Items
 	StatusIconChangeTable[SC_EXPBOOST] = SI_EXPBOOST;
 	StatusIconChangeTable[SC_ITEMBOOST] = SI_ITEMBOOST;
@@ -5943,6 +5949,17 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 			val2 = 20*val1; //% of life to be revived with
 			break;
 
+		case SC_MANU_DEF:
+		case SC_MANU_ATK:
+		case SC_MANU_MATK:
+			val2 = 1; // Manuk group
+			break;
+		case SC_SPL_DEF:
+		case SC_SPL_ATK:
+		case SC_SPL_MATK:
+			val2 = 2; // Splendide group
+			break;
+
 		default:
 			if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
 			{	//Status change with no calc, no icon, and no skill associated...? 

+ 9 - 1
src/map/status.h

@@ -317,6 +317,12 @@ typedef enum sc_type {
 	SC_HELLPOWER = 294,
 	SC_INVINCIBLE, //295
 	SC_INVINCIBLEOFF,
+	SC_MANU_ATK,
+	SC_MANU_DEF,
+	SC_SPL_ATK,
+	SC_SPL_DEF, //300
+	SC_MANU_MATK,
+	SC_SPL_MATK,
 
 	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
 } sc_type;
@@ -706,13 +712,15 @@ enum si_type {
 	SI_NEUTRALBARRIER_MASTER = 378,
 	SI_STEALTHFIELD = 379,
 	SI_STEALTHFIELD_MASTER = 380,
+*/
 	SI_MANU_ATK = 381, 
 	SI_MANU_DEF = 382, 
 	SI_SPL_ATK = 383, 
 	SI_SPL_DEF = 384, 
-	SI_REPRODUCE = 385,
+//	SI_REPRODUCE = 385,
 	SI_MANU_MATK = 386,
 	SI_SPL_MATK = 387,
+/*
 	SI_STR_SCROLL = 388,
 	SI_INT_SCROLL = 389,
 	SI_LG_REFLECTDAMAGE = 390,