diff options
-rw-r--r-- | Changelog-Trunk.txt | 5 | ||||
-rw-r--r-- | db/Changelog.txt | 1 | ||||
-rw-r--r-- | db/const.txt | 2 | ||||
-rw-r--r-- | db/item_db.txt | 4 | ||||
-rw-r--r-- | src/common/cbasetypes.h | 4 | ||||
-rw-r--r-- | src/common/strlib.h | 3 | ||||
-rw-r--r-- | src/map/battle.c | 9 | ||||
-rw-r--r-- | src/map/party.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 8 | ||||
-rw-r--r-- | src/map/skill.c | 23 | ||||
-rw-r--r-- | src/map/status.c | 4 |
11 files changed, 33 insertions, 31 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ac588aa68..0fc5c4ab2 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,11 @@ 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/21 + * Removed the +25% mdef, -50% def effect from Freeze status + * Changed autocast skills, they now only work with normal attacks! + Ref: http://www.eathena.ws/board/index.php?showtopic=138159 + * Fixed a few spots where attack_type was getting truncated + * Hopefully fixed the cygwin + size_t problem (using stddef.h as source) * Added ntows() to properly handle that client port number deficiency * Adjusted the packet_db array for a more consistent look [ultramage] 2007/04/20 diff --git a/db/Changelog.txt b/db/Changelog.txt index 15e9a9804..9e8225520 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -20,6 +20,7 @@ ======================== 04/21 + * Added entries to const.txt, updated the new autocast cards * Reorganized some entries in packet_db.txt [ultramage] 04/20 * Fixed Aegis onspawn bug [Playtester] diff --git a/db/const.txt b/db/const.txt index 7a7ad1d22..b439e75d5 100644 --- a/db/const.txt +++ b/db/const.txt @@ -446,6 +446,8 @@ BF_MAGIC 0x0002 BF_MISC 0x0004 BF_SHORT 0x0010 BF_LONG 0x0040 +BF_SKILL 0x0100 +BF_NORMAL 0x0200 IG_BlueBox 1 IG_VioletBox 2 diff --git a/db/item_db.txt b/db/item_db.txt index e1a24dced..57585c217 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -1549,8 +1549,8 @@ 4360,Eremes_Card,Eremes Guile Card,6,,10,10,,,,,,,,2,,,,,{ bonus2 bCriticalAddRace,RC_DemiHuman,10; },{},{} 4361,Whitesmith_Card,Whitesmith Card,6,,10,10,,,,,,,,2,,,,,{ bonus bBreakWeaponRate,1000; bonus bBreakArmorRate,700; },{},{} 4362,Harword_Card,Howard Alt-Eisen Card,6,,10,10,,,,,,,,2,,,,,{ bonus bAspdRate,-5; bonus bHit,30; },{},{} -4363,High_Priest_Card,High Priest Card,6,,10,10,,,,,,,,16,,,,,{ bonus5 bAutoSpellWhenHit,361,1,10,BF_WEAPON|BF_MAGIC|BF_LONG|BF_SHORT,0; },{},{} -4364,Magaleta_Card,Margaretha Solin Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus5 bAutoSpellWhenHit,76,5,150,BF_MAGIC|BF_LONG|BF_SHORT,1; },{},{} +4363,High_Priest_Card,High Priest Card,6,,10,10,,,,,,,,16,,,,,{ bonus5 bAutoSpellWhenHit,361,1,10,BF_WEAPON|BF_MAGIC|BF_SHORT|BF_LONG|BF_SKILL|BF_NORMAL,0; },{},{} +4364,Magaleta_Card,Margaretha Solin Card,6,,10,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus5 bAutoSpellWhenHit,76,5,150,BF_MAGIC|BF_LONG|BF_SHORT|BF_SKILL|BF_NORMAL,1; },{},{} 4365,High_Wizard_Card,High Wizard Card,6,,10,10,,,,,,,,769,,,,,{ bonus bIgnoreMDefRace,RC_NonBoss; bonus bCastrate,100; bonus bSPrecovRate,-100; },{},{ heal 0,-2000; } 4366,Katrinn_Card,Kathryne Keyron Card,6,,10,10,,,,,,,,769,,,,,{ bonus bCastrate,getrefine()*-1; if(getrefine()>=9) { bonus bMatkRate,2; } },{},{} 4367,Sniper_Card,Sniper Card,6,,10,10,,,,,,,,2,,,,,{ bonus bNoRegen,1; bonus2 bHpDrainRate,50,20; },{},{} diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index ae6430a62..00296588e 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -136,9 +136,8 @@ typedef unsigned long int ppuint32; ////////////////////////////////////////////////////////////////////////// // integer with exact processor width (and best speed) -// size_t already defined in stdio.h ////////////////////////////// -#include <string.h>// size_t +#include <stddef.h> // size_t #if defined(WIN32) && !defined(MINGW) // does not have a signed size_t ////////////////////////////// @@ -308,5 +307,4 @@ typedef char bool; #define TOLOWER(c) (tolower((unsigned char)(c))) #define TOUPPER(c) (toupper((unsigned char)(c))) - #endif /* _CBASETYPES_H_ */ diff --git a/src/common/strlib.h b/src/common/strlib.h index 5abd07e90..a3753b918 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -4,6 +4,8 @@ #ifndef _STRLIB_H_ #define _STRLIB_H_ +#include <stddef.h> // size_t + char* jstrescape (char* pt); char* jstrescapecpy (char* pt, const char* spt); int jmemescapecpy (char* pt, const char* spt, int size); @@ -26,5 +28,4 @@ size_t strnlen (const char* string, size_t maxlen); int e_mail_check(char* email); int config_switch(const char* str); - #endif /* _STRLIB_H_ */ diff --git a/src/map/battle.c b/src/map/battle.c index f1679024e..358eb5746 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -149,7 +149,7 @@ struct delay_damage { unsigned short skill_lv; unsigned short skill_id; unsigned short dmg_lv; - unsigned char attack_type; + unsigned short attack_type; }; int battle_delay_damage_sub (int tid, unsigned int tick, int id, int data) @@ -163,7 +163,7 @@ int battle_delay_damage_sub (int tid, unsigned int tick, int id, int data) if ((dat->dmg_lv == ATK_DEF || dat->damage > 0) && dat->attack_type) { if (!status_isdead(target)) - skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type, tick); + skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick); skill_counter_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick); } @@ -2785,8 +2785,7 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage, * ’Ê?í?UŒ‚?ˆ—?‚Ü‚Æ‚ß *------------------------------------------ */ -int battle_weapon_attack( struct block_list *src,struct block_list *target, - unsigned int tick,int flag) +int battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag) { struct map_session_data *sd = NULL, *tsd = NULL; struct status_data *sstatus, *tstatus; @@ -2929,7 +2928,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target, map_freeblock_lock(); - battle_delay_damage(tick+wd.amotion, src, target, BF_WEAPON, 0, 0, damage, wd.dmg_lv, wd.dmotion); + battle_delay_damage(tick+wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion); if (sc && sc->data[SC_AUTOSPELL].timer != -1 && rand()%100 < sc->data[SC_AUTOSPELL].val4) { int sp = 0; diff --git a/src/map/party.h b/src/map/party.h index 4c87dd501..f8ceb67f8 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -46,5 +46,4 @@ int party_send_dot_remove(struct map_session_data *sd); int party_sub_count(struct block_list *bl, va_list ap); int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_session_data *sd,int type,...); - #endif /* _PARTY_H_ */ diff --git a/src/map/pc.c b/src/map/pc.c index cff5069d5..06161cffe 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2329,11 +2329,11 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) break; case SP_AUTOSPELL: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, type2, type3, val, BF_WEAPON|BF_SHORT|BF_LONG, current_equip_card_id); + pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, type2, type3, val, BF_WEAPON|BF_SHORT|BF_LONG|BF_NORMAL, current_equip_card_id); break; case SP_AUTOSPELL_WHENHIT: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, type2, type3, val, BF_WEAPON|BF_SHORT|BF_LONG, current_equip_card_id); + pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, type2, type3, val, BF_WEAPON|BF_SHORT|BF_LONG|BF_NORMAL, current_equip_card_id); break; case SP_HP_LOSS_RATE: if(sd->state.lr_flag != 2) { @@ -2422,12 +2422,12 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4 switch(type){ case SP_AUTOSPELL: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_WEAPON|BF_SHORT|BF_LONG, current_equip_card_id); + pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_WEAPON|BF_SHORT|BF_LONG|BF_NORMAL, current_equip_card_id); break; case SP_AUTOSPELL_WHENHIT: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_WEAPON|BF_SHORT|BF_LONG, current_equip_card_id); + pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, BF_WEAPON|BF_SHORT|BF_LONG|BF_NORMAL, current_equip_card_id); break; default: if(battle_config.error_log) diff --git a/src/map/skill.c b/src/map/skill.c index 34c07dd51..1279aa822 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1349,7 +1349,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int break; case TK_TURNKICK: case MO_BALKYOUNG: //Note: attack_type is passed as BF_WEAPON for the actual target, BF_MISC for the splash-affected mobs. - if(attack_type == BF_MISC) //70% base stun chance... + if(attack_type&BF_MISC) //70% base stun chance... sc_start(bl,SC_STUN,70,skilllv,skill_get_time2(skillid,skilllv)); break; case GS_BULLSEYE: //0.1% coma rate. @@ -1410,18 +1410,18 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int src = sd?&sd->bl:src; } - //Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex] - //But Gravity Patched this silently, and it now seems to trigger only on - //weapon attacks. + // Autospell when attacking if(sd && !status_isdead(bl) && src != bl && sd->autospell[0].id) { struct block_list *tbl; struct unit_data *ud; int i, skilllv; + for (i = 0; i < MAX_PC_BONUS && sd->autospell[i].id; i++) { - if(!(sd->autospell[i].flag&attack_type&BF_RANGEMASK && - sd->autospell[i].flag&attack_type&BF_WEAPONMASK)) - continue; //Attack type or range type did not match. + if(!(sd->autospell[i].flag&attack_type&BF_WEAPONMASK && + sd->autospell[i].flag&attack_type&BF_RANGEMASK && + sd->autospell[i].flag&attack_type&BF_SKILLMASK)) + continue; // one or more trigger conditions were not fulfilled skill = (sd->autospell[i].id > 0) ? sd->autospell[i].id : -sd->autospell[i].id; @@ -1583,7 +1583,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * } } - //Trigger counter-spells to retaliate against damage causing skills. [Skotlex] + // Trigger counter-spells to retaliate against damage causing skills. if(dstsd && !status_isdead(bl) && src != bl && dstsd->autospell2[0].id && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) { @@ -1593,9 +1593,10 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * for (i = 0; i < MAX_PC_BONUS && dstsd->autospell2[i].id; i++) { - if(!(dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK && - dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK)) - continue; //Attack type or range type did not match. + if(!(dstsd->autospell2[i].flag&attack_type&BF_WEAPONMASK && + dstsd->autospell2[i].flag&attack_type&BF_RANGEMASK && + dstsd->autospell2[i].flag&attack_type&BF_SKILLMASK)) + continue; // one or more trigger conditions were not fulfilled skillid = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id; skilllv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1; diff --git a/src/map/status.c b/src/map/status.c index 564d10d08..24d347b72 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3539,8 +3539,6 @@ static signed char status_calc_def(struct block_list *bl, struct status_change * def += sc->data[SC_DEFENCE].val2 ; if(sc->data[SC_INCDEFRATE].timer!=-1) def += def * sc->data[SC_INCDEFRATE].val1/100; - if(sc->data[SC_FREEZE].timer!=-1) - def >>=1; if(sc->data[SC_STONE].timer!=-1 && sc->opt1 == OPT1_STONE) def >>=1; if(sc->data[SC_SIGNUMCRUCIS].timer!=-1) @@ -3606,8 +3604,6 @@ static signed char status_calc_mdef(struct block_list *bl, struct status_change return 90; if(sc->data[SC_SKA].timer != -1) // [marquis007] return 90; - if(sc->data[SC_FREEZE].timer!=-1) - mdef += 25*mdef/100; if(sc->data[SC_STONE].timer!=-1 && sc->opt1 == OPT1_STONE) mdef += 25*mdef/100; if(sc->data[SC_ENDURE].timer!=-1 && sc->data[SC_ENDURE].val4 == 0) |