diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-24 19:33:37 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-24 19:33:37 +0000 |
commit | 34a1a63f26ecc52c524183e6aa477ebfc5dab904 (patch) | |
tree | 4da6076ebc49228099c95e6306720cf9ff02b4bc | |
parent | 6240fbceaa9a5f366bfcf7b95c3dd959ec04e60c (diff) | |
download | hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.gz hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.bz2 hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.tar.xz hercules-34a1a63f26ecc52c524183e6aa477ebfc5dab904.zip |
- NPC_MAGICALATTACK now starts a state similar to Sacrificial Ritual, in the sense that every normal attack afterwards becomes a Magical Attack. The skill duration is 15 secs.
- Corrected some trade-cancel calls in trade_traderequest.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10346 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | db/skill_cast_db.txt | 3 | ||||
-rw-r--r-- | src/map/battle.c | 8 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 6 | ||||
-rw-r--r-- | src/map/status.c | 1 | ||||
-rw-r--r-- | src/map/status.h | 1 | ||||
-rw-r--r-- | src/map/trade.c | 4 |
8 files changed, 22 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 3b743ef57..221f05537 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ 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/04/25 + * NPC_MAGICALATTACK now starts a state similar to Sacrificial Ritual, in + the sense that every normal attack afterwards becomes a Magical Attack. The + skill duration is 15 secs. [Skotlex] * Added missing Rachel quest map [Playtester] * Ganbantein now deletes individual skill cells instead of the whole skill in the area it is casted. diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt index 346d7cdb9..21db43309 100644 --- a/db/skill_cast_db.txt +++ b/db/skill_cast_db.txt @@ -323,6 +323,9 @@ //-- NPC_SLEEPATTACK 182,0,0,0,0,8000:10000:12000:14000:16000:18000:20000:22000:24000:26000 +//-- NPC_MAGICALATTACK +192,0,0,0,15000,0 + //-- NPC_KEEPING 201,0,0,0,60000:70000:80000:90000:100000:110000:120000:130000:140000:150000,0 diff --git a/src/map/battle.c b/src/map/battle.c index 60fdc0a3b..38be508dd 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2899,8 +2899,12 @@ int battle_weapon_attack(struct block_list* src, struct block_list* target, unsi if (rand()%100 < triple_rate) return skill_attack(BF_WEAPON,src,src,target,MO_TRIPLEATTACK,damage,tick,0); } - else if (sc && sc->data[SC_SACRIFICE].timer != -1) - return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE].val1,tick,0); + else if (sc) { + if (sc->data[SC_SACRIFICE].timer != -1) + return skill_attack(BF_WEAPON,src,src,target,PA_SACRIFICE,sc->data[SC_SACRIFICE].val1,tick,0); + if (sc->data[SC_MAGICALATTACK].timer != -1) + return skill_attack(BF_MAGIC,src,src,target,NPC_MAGICALATTACK,sc->data[SC_MAGICALATTACK].val1,tick,0); + } wd = battle_calc_weapon_attack(src, target, 0, 0, flag); diff --git a/src/map/clif.c b/src/map/clif.c index f3d18b702..5dd222ebd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -53,7 +53,7 @@ struct Clif_Config { struct packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB + 1]; //Converts item type in case of pet eggs. -#define itemtype(a) (a == 7)?4:a +#define itemtype(a) (a == IT_PETEGG)?IT_WEAPON:a #define WBUFPOS(p,pos,x,y,dir) \ do { \ diff --git a/src/map/skill.c b/src/map/skill.c index 36477a61d..bb895c68d 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3133,7 +3133,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case AL_HOLYLIGHT: case WZ_JUPITEL: case NPC_DARKTHUNDER: - case NPC_MAGICALATTACK: case PR_ASPERSIO: case MG_FROSTDIVER: case WZ_SIGHTBLASTER: @@ -3144,6 +3143,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); break; + case NPC_MAGICALATTACK: + skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); + sc_start(src,SkillStatusChangeTable(skillid),100,skilllv,skill_get_time(skillid,skilllv)); + break; + case HVAN_CAPRICE: //[blackhole89] { int ran=rand()%4; diff --git a/src/map/status.c b/src/map/status.c index d8921ef70..5ba30b62a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -212,6 +212,7 @@ void initChangeTables(void) { add_sc(NPC_PETRIFYATTACK, SC_STONE); add_sc(NPC_CURSEATTACK, SC_CURSE); add_sc(NPC_SLEEPATTACK, SC_SLEEP); + add_sc(NPC_MAGICALATTACK, SC_MAGICALATTACK); set_sc(NPC_KEEPING, SC_KEEPING, SI_BLANK, SCB_DEF); add_sc(NPC_DARKBLESSING, SC_COMA); set_sc(NPC_BARRIER, SC_BARRIER, SI_BLANK, SCB_MDEF|SCB_DEF); diff --git a/src/map/status.h b/src/map/status.h index cb101450c..4f51c61ab 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -259,6 +259,7 @@ enum { SC_INCDEXRATE, SC_JAILED, SC_ENCHANTARMS, + SC_MAGICALATTACK, SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex] }; int SkillStatusChangeTable(int skill); diff --git a/src/map/trade.c b/src/map/trade.c index 40f63e888..41d919daa 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -54,7 +54,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta } if ((target_sd->trade_partner != 0) || (sd->trade_partner != 0)) { - trade_tradecancel(sd); // person is in another trade + clif_tradestart(sd, 2); // person is in another trade return; } @@ -62,7 +62,7 @@ void trade_traderequest(struct map_session_data *sd, struct map_session_data *ta if ( pc_can_give_items(level) || pc_can_give_items(pc_isGM(target_sd)) ) //check if both GMs are allowed to trade { clif_displaymessage(sd->fd, msg_txt(246)); - trade_tradecancel(sd); // GM is not allowed to trade + clif_tradestart(sd, 2); // GM is not allowed to trade return; } |