summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt10
-rw-r--r--conf-tmpl/Changelog.txt3
-rw-r--r--conf-tmpl/mapflag/gvg.txt50
-rw-r--r--db/Changelog.txt6
-rw-r--r--db/skill_cast_db.txt10
-rw-r--r--db/skill_castnodex_db.txt6
-rw-r--r--src/map/pc.c45
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c103
9 files changed, 128 insertions, 107 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9325b699e..c680f43d0 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,16 @@ 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.
+2006/10/19
+ * Phantasmic arrow now knockbacks even if it misses. [Skotlex]
+ * Adjusted the way Monk combo times work. The combo time is now always
+ 300ms (adjusted by combo_delay_rate) which takes effect inmediately AFTER
+ your current skill's canact-delay (which is why the particular skill delays
+ were moved to skillcast_db) [Skotlex]
+ * Modified skill_delayfix so it performs the can-act reduction from agi/dex
+ for combos there. [Skotlex]
+ * Modified pc_steal_item so that it behaves more closely to the way it does
+ on Aegis. [Skotlex]
2006/10/18
* Added a overflow check when calculating party exp share. [Skotlex]
2006/10/16
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt
index 386a9f5d3..f927a624f 100644
--- a/conf-tmpl/Changelog.txt
+++ b/conf-tmpl/Changelog.txt
@@ -1,5 +1,8 @@
Date Added
+2006/10/19
+ * Commented out the monster_noteleport mapflag from the guild castles as
+ this is the Aegis behaviour [Skotlex]
2006/10/18
* Added monster_noteleport mapflag to the guild castle maps to prevent
"avoiding MVPs" by forcing them to teleport from rude-attacks. [Skotlex]
diff --git a/conf-tmpl/mapflag/gvg.txt b/conf-tmpl/mapflag/gvg.txt
index a271d0510..db3d08f2f 100644
--- a/conf-tmpl/mapflag/gvg.txt
+++ b/conf-tmpl/mapflag/gvg.txt
@@ -41,27 +41,27 @@ prtg_cas02.gat mapflag gvg_castle
prtg_cas03.gat mapflag gvg_castle
prtg_cas04.gat mapflag gvg_castle
prtg_cas05.gat mapflag gvg_castle
-//Also set monster_noteleport to prevent MVPs from "escaping".
-aldeg_cas01.gat mapflag monster_noteleport
-aldeg_cas02.gat mapflag monster_noteleport
-aldeg_cas03.gat mapflag monster_noteleport
-aldeg_cas04.gat mapflag monster_noteleport
-aldeg_cas05.gat mapflag monster_noteleport
-gefg_cas01.gat mapflag monster_noteleport
-gefg_cas02.gat mapflag monster_noteleport
-gefg_cas03.gat mapflag monster_noteleport
-gefg_cas04.gat mapflag monster_noteleport
-gefg_cas05.gat mapflag monster_noteleport
-payg_cas01.gat mapflag monster_noteleport
-payg_cas02.gat mapflag monster_noteleport
-payg_cas03.gat mapflag monster_noteleport
-payg_cas04.gat mapflag monster_noteleport
-payg_cas05.gat mapflag monster_noteleport
-prtg_cas01.gat mapflag monster_noteleport
-prtg_cas02.gat mapflag monster_noteleport
-prtg_cas03.gat mapflag monster_noteleport
-prtg_cas04.gat mapflag monster_noteleport
-prtg_cas05.gat mapflag monster_noteleport
+//Uncomment to disable monsters teleporting (prevents them from "escaping" when rude attacked)
+//aldeg_cas01.gat mapflag monster_noteleport
+//aldeg_cas02.gat mapflag monster_noteleport
+//aldeg_cas03.gat mapflag monster_noteleport
+//aldeg_cas04.gat mapflag monster_noteleport
+//aldeg_cas05.gat mapflag monster_noteleport
+//gefg_cas01.gat mapflag monster_noteleport
+//gefg_cas02.gat mapflag monster_noteleport
+//gefg_cas03.gat mapflag monster_noteleport
+//gefg_cas04.gat mapflag monster_noteleport
+//gefg_cas05.gat mapflag monster_noteleport
+//payg_cas01.gat mapflag monster_noteleport
+//payg_cas02.gat mapflag monster_noteleport
+//payg_cas03.gat mapflag monster_noteleport
+//payg_cas04.gat mapflag monster_noteleport
+//payg_cas05.gat mapflag monster_noteleport
+//prtg_cas01.gat mapflag monster_noteleport
+//prtg_cas02.gat mapflag monster_noteleport
+//prtg_cas03.gat mapflag monster_noteleport
+//prtg_cas04.gat mapflag monster_noteleport
+//prtg_cas05.gat mapflag monster_noteleport
// Novice Guild Castles ===
//n_castle.gat mapflag gvg_castle
@@ -70,10 +70,10 @@ nguild_gef.gat mapflag gvg_castle
nguild_pay.gat mapflag gvg_castle
nguild_prt.gat mapflag gvg_castle
-nguild_alde.gat mapflag monster_noteleport
-nguild_gef.gat mapflag monster_noteleport
-nguild_pay.gat mapflag monster_noteleport
-nguild_prt.gat mapflag monster_noteleport
+//nguild_alde.gat mapflag monster_noteleport
+//nguild_gef.gat mapflag monster_noteleport
+//nguild_pay.gat mapflag monster_noteleport
+//nguild_prt.gat mapflag monster_noteleport
// Guild Dungeons =========
gld_dun01.gat mapflag gvg_dungeon
diff --git a/db/Changelog.txt b/db/Changelog.txt
index d3f8d31d8..33b5efbd2 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -19,6 +19,12 @@
-----
========================
+10/19
+ * Added the actual skill delay of 1000ms to Triple Attack and Chain combo
+ in skill_cast_db. Added Combo Finish and TigerFist as well with a delay of
+ 700ms. [Skotlex]
+ * Added the Monk combos to skill_castnodex so their delay is not decreased
+ by skills. [Skotlex]
10/18
* Updated the packetdb for the 2006-10-17a client. [Zephiris]
10/16
diff --git a/db/skill_cast_db.txt b/db/skill_cast_db.txt
index bcc587ea6..a037f1a35 100644
--- a/db/skill_cast_db.txt
+++ b/db/skill_cast_db.txt
@@ -414,7 +414,8 @@
261,1000,0,0,600000,0
//-- MO_ABSORBSPIRITS
262,2000,0,0,0,0
-
+//-- MO_TRIPLEATTACK
+263,0,1000,0,0,0
//-- MO_INVESTIGATE
266,1000,500,0,0,0
//-- MO_FINGEROFFENSIVE
@@ -427,9 +428,12 @@
270,0,0,0,180000,0
//-- MO_EXTREMITYFIST
271,4000:3500:3000:2500:2000,3000:2500:2000:1500:1000,0,0,300000
+//-- MO_CHAINCOMBO
+272,0,1000,0,0,0
+//-- MO_COMBOFINISH
+273,0,700,0,0,0
//==========================================
-
//===== Sage ===============================
//-- SA_MAGICROD
276,0,1500,0,400:600:800:1000:1200,0
@@ -595,7 +599,7 @@
//-- CH_PALMSTRIKE
370,0,300,0,0,0
//-- CH_TIGERFIST
-371,0,0,0,0,2000:4000:6000:8000:10000
+371,0,700,0,0,2000:4000:6000:8000:10000
//-- CH_CHAINCRUSH
372,0,800:800:800:800:800:1000:1000:1000:1000:1000,0,0,0
//==========================================
diff --git a/db/skill_castnodex_db.txt b/db/skill_castnodex_db.txt
index f80859840..6639dce22 100644
--- a/db/skill_castnodex_db.txt
+++ b/db/skill_castnodex_db.txt
@@ -8,10 +8,14 @@
// Delay: With 0, dex affects the skill's delay rate
// Example - 46,1,1 = Double Strafe's casting time and delay is not affected by dex.
// By default, dex NEVER affects after-cast delay, so no need of putting 'x,0,1' in this file
-
+263,0,2 //MO_TRIPLEATTACK
+272,0,2 //MO_CHAINCOMBO
+273,0,2 //MO_COMBOFINISH
336,1 //WE_CALLPARTNER
366,1 //HW_MAGICPOWER
370,1 //CH_PALMSTRIKE
+371,0,2 //CH_TIGERFIST
+372,0,2 //CH_CHAINCRUSH
403,3 //PF_MEMORIZE
408,1 //WE_BABY
409,1 //WE_CALLPARENT
diff --git a/src/map/pc.c b/src/map/pc.c
index a69d63e29..e615b1807 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3179,9 +3179,10 @@ int pc_show_steal(struct block_list *bl,va_list ap)
*------------------------------------------
*/
//** pc.c:
-int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
+int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
{
- int i,skill,itemid,flag;
+ static int i = 0;
+ int rate,itemid,flag;
struct status_data *sd_status, *md_status;
struct mob_data *md;
struct item tmp_item;
@@ -3193,33 +3194,43 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
md_status= status_get_status_data(bl);
md = (TBL_MOB *)bl;
- if(md->state.steal_flag>=battle_config.skill_steal_max_tries || md_status->mode&MD_BOSS || md->master_id ||
+ if(md->state.steal_flag>=battle_config.skill_steal_max_tries ||
+ md_status->mode&MD_BOSS || md->master_id ||
(md->class_>=1324 && md->class_<1364) || // prevent stealing from treasure boxes [Valaris]
map[md->bl.m].flag.nomobloot || // check noloot map flag [Lorky]
- md->sc.data[SC_STONE].timer != -1 || md->sc.data[SC_FREEZE].timer != -1 //status change check
+ md->sc.opt1 //status change check
)
return 0;
- skill = battle_config.skill_steal_type == 1
- ? (sd_status->dex - md_status->dex)/2 + pc_checkskill(sd,TF_STEAL)*6 + 10
- : sd_status->dex - md_status->dex + pc_checkskill(sd,TF_STEAL)*3 + 10;
+ rate = battle_config.skill_steal_type
+ ? (sd_status->dex - md_status->dex)/2 + lv*6 + 10
+ : sd_status->dex - md_status->dex + lv*3 + 10;
- skill+= sd->add_steal_rate; //Better make the steal_Rate addition affect % rather than an absolute on top of the total drop rate. [Skotlex]
+ rate += sd->add_steal_rate; //Better make the steal_Rate addition affect % rather than an absolute on top of the total drop rate. [Skotlex]
- if (skill < 1)
+ if (rate < 1)
return 0;
md->state.steal_flag++; //increase steal tries number
- for(i = 0; i<MAX_MOB_DROP; i++)//Pick one mobs drop slot.
- {
- itemid = md->db->dropitem[i].nameid;
- if(itemid <= 0 || (itemid>4000 && itemid<5000 && pc_checkskill(sd,TF_STEAL) <= 5))
- continue;
- if(rand() % 10000 < md->db->dropitem[i].p*skill/100)
- break;
+ //preliminar statistical data hints at this behaviour:
+ //each steal attempt: try to steal against ONE mob drop, and no more.
+ //We use a static index to prevent giving priority to any of the slots.
+ old_i = i;
+ do {
+ i++;
+ if (i == MAX_MOB_DROP-1 && lv <= 5)
+ continue; //Cannot steal "last slot" (card slot)
+ if (i == MAX_MOB_DROP)
+ i = 0;
+ } while (md->db->dropitem[i].p <= 0 && old_i != i);
+
+ if(old_i == i) {
+ md->state.steal_flag = UCHAR_MAX; //Tag for speed up in case you reinsist
+ return 0; //Mob has nothing stealable!
}
- if (i == MAX_MOB_DROP)
+
+ if(rand() % 10000 >= md->db->dropitem[i].p*rate/100)
return 0;
md->state.steal_flag = UCHAR_MAX; //you can't steal from this mob any more
diff --git a/src/map/pc.h b/src/map/pc.h
index d0928c203..a9ec1dd09 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -171,7 +171,7 @@ int pc_skill(struct map_session_data*,int,int,int);
int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
-int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
+int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int skilllv);
int pc_steal_coin(struct map_session_data *sd,struct block_list *bl);
int pc_modifybuyvalue(struct map_session_data*,int);
diff --git a/src/map/skill.c b/src/map/skill.c
index 6a4993ec8..d9af46f18 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1031,7 +1031,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
if(dstmd && dstmd->state.steal_flag<battle_config.skill_steal_max_tries && sd->status.weapon != W_BOW &&
(skill=pc_checkskill(sd,RG_SNATCHER)) > 0 &&
(skill*15 + 55) + pc_checkskill(sd,TF_STEAL)*10 > rand()%1000) {
- if(pc_steal_item(sd,bl))
+ if(pc_steal_item(sd,bl,pc_checkskill(sd,TF_STEAL)))
clif_skill_nodamage(src,bl,TF_STEAL,skill,1);
else
clif_skill_fail(sd,RG_SNATCHER,0,0);
@@ -1896,7 +1896,9 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
type=(skillid==0)?5:skill_get_hit(skillid);
if(damage < dmg.div_
- && skillid != CH_PALMSTRIKE) //Palm Strike is the only skill that will knockback even if it misses. [Skotlex]
+ //Only skills that knockback even when they miss. [Skotlex]
+ && skillid != CH_PALMSTRIKE
+ && skillid != HT_PHANTASMIC)
dmg.blewcount = 0;
if(skillid == CR_GRANDCROSS||skillid == NPC_GRANDDARKNESS) {
@@ -1906,8 +1908,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
if(sd) {
- //Sorry for removing the Japanese comments, but they were actually distracting
- //from the actual code and I couldn't understand a thing anyway >.< [Skotlex]
+ int flag = 0; //Used to signal if this skill can be combo'ed later on.
if (sd->sc.data[SC_COMBO].timer!=-1)
{ //End combo state after skill is invoked. [Skotlex]
switch (skillid) {
@@ -1933,65 +1934,29 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
switch(skillid)
{
case MO_TRIPLEATTACK:
- {
- int delay = 1000 - 4*sstatus->agi - 2*sstatus->dex;
- if (pc_checkskill(sd, MO_CHAINCOMBO) > 0)
- delay += 300 * battle_config.combo_delay_rate / 100;
- sc_start(src,SC_COMBO,100,MO_TRIPLEATTACK,delay);
- clif_combo_delay(src, delay);
-
if (sd->status.party_id>0) //bonus from SG_FRIEND [Komurka]
party_skill_check(sd, sd->status.party_id, MO_TRIPLEATTACK, skilllv);
+ if (pc_checkskill(sd, MO_CHAINCOMBO) > 0)
+ flag=1;
break;
- }
case MO_CHAINCOMBO:
- {
- int delay = 1000 - 4*sstatus->agi - 2*sstatus->dex;
if(pc_checkskill(sd, MO_COMBOFINISH) > 0 && sd->spiritball > 0)
- delay += 300 * battle_config.combo_delay_rate /100;
- sc_start(src,SC_COMBO,100,MO_CHAINCOMBO,delay);
- clif_combo_delay(src,delay);
+ flag=1;
break;
- }
case MO_COMBOFINISH:
- {
- int delay = 700 - 4*sstatus->agi - 2*sstatus->dex;
- if (
- (pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc.data[SC_EXPLOSIONSPIRITS].timer != -1) ||
- (pc_checkskill(sd, CH_TIGERFIST) > 0 && sd->spiritball > 0) ||
- (pc_checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1)
- )
- delay += 300 * battle_config.combo_delay_rate /100;
- sc_start(src,SC_COMBO,100,MO_COMBOFINISH,delay);
- clif_combo_delay(src,delay);
- break;
- }
+ if (pc_checkskill(sd, CH_TIGERFIST) > 0 && sd->spiritball > 0)
+ flag=1;
case CH_TIGERFIST:
- { //Tigerfist is now a combo-only skill. [Skotlex]
- int delay = 1000 - 4*sstatus->agi - 2*sstatus->dex;
- if(
- (pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 3 && sd->sc.data[SC_EXPLOSIONSPIRITS].timer != -1) ||
- (pc_checkskill(sd, CH_CHAINCRUSH) > 0)
- )
- delay += 300 * battle_config.combo_delay_rate /100;
- sc_start(src,SC_COMBO,100,CH_TIGERFIST,delay);
- clif_combo_delay(src,delay);
- break;
- }
+ if (!flag && pc_checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1)
+ flag=1;
case CH_CHAINCRUSH:
- {
- int delay = 1000 - 4*sstatus->agi - 2*sstatus->dex;
- if(pc_checkskill(sd, MO_EXTREMITYFIST) > 0 &&
- sd->spiritball >= 1 &&
- sd->sc.data[SC_EXPLOSIONSPIRITS].timer != -1)
- delay += 300 * battle_config.combo_delay_rate /100;
- sc_start(src,SC_COMBO,100,CH_CHAINCRUSH,delay);
- clif_combo_delay(src,delay);
+ if (!flag && pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball > 0 && sd->sc.data[SC_EXPLOSIONSPIRITS].timer != -1)
+ flag=1;
break;
- }
case AC_DOUBLE:
if((tstatus->race == RC_BRUTE || tstatus->race == RC_INSECT) &&
- pc_checkskill(sd, HT_POWER)) {
+ pc_checkskill(sd, HT_POWER))
+ {
//TODO: This code was taken from Triple Blows, is this even how it should be? [Skotlex]
sc_start4(src,SC_COMBO,100,HT_POWER,bl->id,0,0,2000);
clif_combo_delay(src,2000);
@@ -2014,6 +1979,13 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
sd->ud.attackabletime = sd->canuseitem_tick = sd->ud.canact_tick;
break;
} //Switch End
+ if (flag) { //Possible to chain
+ flag = DIFF_TICK(sd->ud.canact_tick, tick);
+ if (flag < 0) flag = 0;
+ flag += 300 * battle_config.combo_delay_rate/100;
+ sc_start(src,SC_COMBO,100,skillid,flag);
+ clif_combo_delay(src, flag);
+ }
}
//Display damage.
@@ -4223,7 +4195,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case TF_STEAL:
if(sd) {
- if(pc_steal_item(sd,bl))
+ if(pc_steal_item(sd,bl,skilllv))
clif_skill_nodamage(src,bl,skillid,skilllv,1);
else
clif_skill_fail(sd,skillid,0x0a,0);
@@ -8613,7 +8585,7 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
if (bl->type&battle_config.no_skill_delay)
return battle_config.min_skill_delay_limit;
-
+
// instant cast attack skills depend on aspd as delay [celest]
if (time == 0) {
if (skill_get_type(skill_id)&(BF_WEAPON|BF_MISC) && !(skill_get_nk(skill_id)&NK_NO_DAMAGE))
@@ -8623,13 +8595,24 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
} else if (time < 0)
time = -time + status_get_amotion(bl); // if set to <0, the attack motion is added.
else //Agi reduction should apply only to non-zero delay skills.
- if (battle_config.delay_dependon_agi && !(delaynochange&1))
- { // if skill casttime is allowed to be reduced by dex
- int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
- if (scale > 0)
- time = time * scale / battle_config.castrate_dex_scale;
- else //To be capped later to minimum.
- time = 0;
+ switch (skill_id)
+ { //Monk combo skills have their delay reduced by agi/dex.
+ case MO_TRIPLEATTACK:
+ case MO_CHAINCOMBO:
+ case MO_COMBOFINISH:
+ case CH_TIGERFIST:
+ case CH_CHAINCRUSH:
+ time -= 4*status_get_agi(bl) - 2*status_get_dex(bl);
+ break;
+ default:
+ if (battle_config.delay_dependon_agi && !(delaynochange&1))
+ { // if skill casttime is allowed to be reduced by dex
+ int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
+ if (scale > 0)
+ time = time * scale / battle_config.castrate_dex_scale;
+ else //To be capped later to minimum.
+ time = 0;
+ }
}
if (bl->type == BL_PC && ((TBL_PC*)bl)->delayrate != 100)