diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-20 10:57:30 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-20 10:57:30 +0000 |
commit | 492443cd3a0eddabb24212e6b04a3f7d3c9bce88 (patch) | |
tree | f59fa26b969e4426a9758b0dc2307088785907e8 /src | |
parent | 8d5b0ca9a5f8129a6e3cba71adc9bfea21f9ddb6 (diff) | |
download | hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.gz hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.bz2 hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.tar.xz hercules-492443cd3a0eddabb24212e6b04a3f7d3c9bce88.zip |
* Updated Acid Terror, Sword Reject, Double Strafe
* Replaced checking whether items can be refined or not with a new function
* Fixed npctalk outputting to chat [celest]
* Allowed some values in script_config to be customised in script_athena.conf
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@654 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/itemdb.c | 28 | ||||
-rw-r--r-- | src/map/itemdb.h | 1 | ||||
-rw-r--r-- | src/map/script.c | 27 | ||||
-rw-r--r-- | src/map/skill.c | 18 |
6 files changed, 67 insertions, 13 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index c43e9bb61..ba8d22197 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1608,6 +1608,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i ((src->type==BL_PC && ((struct map_session_data *)src)->status.weapon == (1 || 2 || 3)) || src->type==BL_MOB )){ if(rand()%100 < (15*sc_data[SC_REJECTSWORD].val1)){ //反射確率は15*Lv damage = damage*50/100; + clif_damage(bl,src,gettick(),0,0,damage,0,0,0); battle_damage(bl,src,damage,0); //ダメージを与えたのは良いんだが、ここからどうして表示するんだかわかんねぇ //エフェクトもこれでいいのかわかんねぇ @@ -2048,6 +2049,7 @@ static struct Damage battle_calc_pet_weapon_attack( damage2 = damage2*(100+ 20*skill_lv)/100; break; case AM_ACIDTERROR: // アシッドテラー + hitrate = 1000000; damage = damage*(100+ 40*skill_lv)/100; damage2 = damage2*(100+ 40*skill_lv)/100; break; @@ -2542,6 +2544,7 @@ static struct Damage battle_calc_mob_weapon_attack( damage2 = damage2*(100+ 20*skill_lv)/100; break; case AM_ACIDTERROR: // アシッドテラー + hitrate = 1000000; damage = damage*(100+ 40*skill_lv)/100; damage2 = damage2*(100+ 40*skill_lv)/100; break; @@ -3326,6 +3329,7 @@ static struct Damage battle_calc_pc_weapon_attack( damage2 = damage2*(100+ 20*skill_lv)/100; break; case AM_ACIDTERROR: // アシッドテラー + hitrate = 1000000; damage = damage*(100+ 40*skill_lv)/100; damage2 = damage2*(100+ 40*skill_lv)/100; break; diff --git a/src/map/clif.c b/src/map/clif.c index 1f7130676..7eb2670ae 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7772,7 +7772,7 @@ int clif_message(struct block_list *bl, char* msg) WBUFL(buf, 4) = bl->id; memcpy(WBUFP(buf, 8), msg, msg_len); - clif_send(buf, WBUFW(buf,2), bl, AREA); + clif_send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC); // by Gengar return 0; } diff --git a/src/map/itemdb.c b/src/map/itemdb.c index a68afd61f..a68fb3664 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -41,6 +41,7 @@ static int itemdb_read_randomitem(); static int itemdb_read_itemavail(void); static int itemdb_read_itemnametable(void); static int itemdb_read_noequip(void); +static int itemdb_read_norefine(void); void itemdb_reload(void); /*========================================== @@ -292,6 +293,7 @@ static void itemdb_read(void) itemdb_read_randomitem(); itemdb_read_itemavail(); itemdb_read_noequip(); + itemdb_read_norefine(); if (!battle_config.item_name_override_grffile) itemdb_read_itemnametable(); @@ -637,6 +639,31 @@ static int itemdb_read_noequip(void) ShowStatus(tmp_output); return 0; } + +/*================================================ + * Whether the item can be refined or not [Celest] + *------------------------------------------------ + */ +static int itemdb_read_norefine(void) +{ + int i, nameid; + struct item_data *id; + // To-do: let it read from a text file later + int cant_refine[] = { + 0, 1243, 1530, 2110, 2112, 2264, 2298, 2352, 2410, 2413, + 2414, 2509, 2510, 5008, 5046, 5049, 5050, 5053, 5055, 5098 + }; + + for (i=0; i < (int)(sizeof(cant_refine) / sizeof(cant_refine[0])); i++) { + nameid = cant_refine[i]; + if(nameid<=0 || nameid>=20000 || !(id=itemdb_exists(nameid))) + continue; + id->flag.no_refine = 1; + } + + return 1; +} + #ifndef TXT_ONLY /*====================================== @@ -870,6 +897,7 @@ static void itemdb_read(void) itemdb_read_randomitem(); itemdb_read_itemavail(); itemdb_read_noequip(); + itemdb_read_norefine(); itemdb_read_cardillustnametable(); if (!battle_config.item_name_override_grffile) itemdb_read_itemnametable(); diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 0edfad243..9ff3981a2 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -33,6 +33,7 @@ struct item_data { unsigned no_equip : 3; unsigned no_drop : 1; unsigned no_use : 1; + unsigned no_refine : 1; // [celest] } flag; int view_id; }; diff --git a/src/map/script.c b/src/map/script.c index bf6c577cb..5c6b89092 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2921,10 +2921,13 @@ int buildin_getequipisenableref(struct script_state *st) num=conv_num(st,& (st->stack->stack_data[st->start+2])); sd=script_rid2sd(st); i=pc_checkequip(sd,equip[num-1]); - if(i >= 0 && num<7 && sd->inventory_data[i] && (num!=1 + if(i >= 0 && num<7 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine) + // replaced by Celest + /*(num!=1 || sd->inventory_data[i]->def > 1 || (sd->inventory_data[i]->def==1 && sd->inventory_data[i]->equip_script==NULL) - || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL))) + || (sd->inventory_data[i]->def<=0 && sd->inventory_data[i]->equip_script!=NULL)))*/ + { push_val(st->stack,C_INT,1); } else { @@ -6983,7 +6986,25 @@ int script_config_read(char *cfgName) if(strcmpi(w1,"refine_posword")==0) { set_posword(w2); } - if(strcmpi(w1,"import")==0){ + else if(strcmpi(w1,"warn_func_no_comma")==0) { + script_config.warn_func_no_comma = battle_config_switch(w2); + } + else if(strcmpi(w1,"warn_cmd_no_comma")==0) { + script_config.warn_cmd_no_comma = battle_config_switch(w2); + } + else if(strcmpi(w1,"warn_func_mismatch_paramnum")==0) { + script_config.warn_func_mismatch_paramnum = battle_config_switch(w2); + } + else if(strcmpi(w1,"warn_cmd_mismatch_paramnum")==0) { + script_config.warn_cmd_mismatch_paramnum = battle_config_switch(w2); + } + else if(strcmpi(w1,"check_cmdcount")==0) { + script_config.check_cmdcount = battle_config_switch(w2); + } + else if(strcmpi(w1,"check_gotocount")==0) { + script_config.check_gotocount = battle_config_switch(w2); + } + else if(strcmpi(w1,"import")==0){ script_config_read(w2); } } diff --git a/src/map/skill.c b/src/map/skill.c index 1f0e689f4..273b14f1a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5435,7 +5435,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case BA_WHISTLE: /* 口笛 */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1; @@ -5445,7 +5445,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case DC_HUMMING: /* ハミング */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1; @@ -5456,14 +5456,14 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case DC_UGLYDANCE: /* 自分勝手なダンス */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_ENEMY; break; case DC_DONTFORGETME: /* 私を忘れないで… */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_ENEMY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1; @@ -5473,7 +5473,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case BA_POEMBRAGI: /* ブラギの詩 */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON); @@ -5483,7 +5483,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case BA_APPLEIDUN: /* イドゥンの林檎 */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = ((pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON))&0xffff)<<16; @@ -5495,7 +5495,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case DC_SERVICEFORYOU: /* サ?ビスフォ?ユ? */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_PARTY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1; @@ -5504,7 +5504,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case BA_ASSASSINCROSS: /* 夕陽のアサシンクロス */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1; @@ -5513,7 +5513,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case DC_FORTUNEKISS: /* 幸運のキス */ count=49; limit=skill_get_time(skillid,skilllv); - range=5; + range=3; target=BCT_NOENEMY; if(src->type == BL_PC) val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1; |