summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 19:14:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 19:14:21 +0000
commit6b2019eb1d741abd4dad3f52534cbeeb3bdf2615 (patch)
tree57022ad8a22913a78f4e4267b851352ae4100687
parent3241a51ac2689e7ffa63e01bf9e81ec08d0b0187 (diff)
downloadhercules-6b2019eb1d741abd4dad3f52534cbeeb3bdf2615.tar.gz
hercules-6b2019eb1d741abd4dad3f52534cbeeb3bdf2615.tar.bz2
hercules-6b2019eb1d741abd4dad3f52534cbeeb3bdf2615.tar.xz
hercules-6b2019eb1d741abd4dad3f52534cbeeb3bdf2615.zip
- Made Magic Crasher a BF_WEAPON attack.
- Made skill_unit_range a per-level setting. meteor and Lov now have their unit range adjusted in the skill_unit_db rather than hardcoded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5536 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--db/skill_db.txt2
-rw-r--r--db/skill_unit_db.txt4
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/skill.c42
-rw-r--r--src/map/skill.h2
6 files changed, 26 insertions, 30 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 26aba40ca..4639fc6b4 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,10 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/09
+ * Made Magic Crasher a BF_WEAPON attack. [Skotlex]
+ * Made skill_unit_range a per-level setting. meteor and Lov now have their
+ unit range for bosses adjusted in the skill_unit_db rather than
+ hardcoded. [Skotlex]
* Added Gunslinger/Ninja Status Change icons. Somebody needs to look into
them though for not all SCs have a matching SI. [blackhole89]
* Changed ITEM_NAME_LENGTH to 50. [Skotlex]
diff --git a/db/skill_db.txt b/db/skill_db.txt
index f14795f5e..ff5b6846d 100644
--- a/db/skill_db.txt
+++ b/db/skill_db.txt
@@ -382,7 +382,7 @@
362,4,6,4,0,1,0,5,1,yes,0,0,0,magic,2 //HP_BASILICA#Basilica#
363,0,0,0,0,0,0,10,0,no,0,0,0,magic,0 //HP_MEDITATIO#Meditatio#
364,0,0,0,0,0,0,10,1,no,0,0,0,magic,0 //HW_SOULDRAIN#Soul Drain#
-365,9,8,1,-1,0,0,1,1,yes,0,0,0,magic,0 //HW_MAGICCRASHER#Stave Crasher#
+365,9,8,1,-1,0,0,1,1,yes,0,0,0,weapon,0 //HW_MAGICCRASHER#Stave Crasher#
366,0,6,4,0,1,0,10,1,no,0,0,0,magic,0 //HW_MAGICPOWER#Mystical Amplification#
367,9,8,1,0,0,0,5,1,no,0,0,0,misc,0 //PA_PRESSURE#Gloria Domini#
368,0,6,4,0,1,0,5,1,yes,0,0,0,weapon,0 //PA_SACRIFICE# Martyr's Reckoning#
diff --git a/db/skill_unit_db.txt b/db/skill_unit_db.txt
index 36fdac212..45240d82a 100644
--- a/db/skill_unit_db.txt
+++ b/db/skill_unit_db.txt
@@ -29,8 +29,8 @@
70,0x83, , -1, 1,1000,all, 0x008 //PR_SANCTUARY#サンクチュアリ
79,0x84, , -1, 1,3000,enemy, 0x008 //PR_MAGNUS#マグヌスエクソシズム
80,0x87,0x88, 0, 1,2000,enemy, 0x002 //WZ_FIREPILLAR#ファイアーピラー
- 83,0x86, , 0, 3,1000,enemy, 0x000 //WZ_METEOR#メテオストーム
- 85,0x86, , 0, 6,1250,enemy, 0x008 //WZ_VERMILION#ロードオブヴァーミリオン
+ 83,0x86, , 0,3:3:3:3:3:3:3:3:3:3:10,1000,enemy, 0x000 //WZ_METEOR#メテオストーム
+ 85,0x86, , 0,6:6:6:6:6:6:6:6:6:6:25,1250,enemy, 0x008 //WZ_VERMILION#ロードオブヴァーミリオン
87,0x8d, , -1, 0, -1,all, 0x000 //WZ_ICEWALL#アイスウォール
88,0x86, , 0, 2,1000,enemy, 0x000 //WZ_FROSTNOVA#フロストノヴァ
89,0x86, , 0, 5, 450,enemy, 0x008 //WZ_STORMGUST#ストームガスト
diff --git a/src/map/battle.c b/src/map/battle.c
index 992ed62e3..526b0dc68 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -699,7 +699,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(!(skill_get_inf(skill_num)&INF_GROUND_SKILL) && rand()%100 < 75)
return 0;
} else
- damage /=2;
+ damage >>=1;
}
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 72865d9c0..8525858a1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -669,7 +669,7 @@ int skill_get_type( int id ){ skill_get (skill_db[id].skill_type, id, 1); }
int skill_get_unit_id ( int id, int flag ){ skill_get (skill_db[id].unit_id[flag], id, 1); }
int skill_get_unit_layout_type( int id ,int lv ){ skill_get (skill_db[id].unit_layout_type[lv-1], id, lv); }
int skill_get_unit_interval( int id ){ skill_get (skill_db[id].unit_interval, id, 1); }
-int skill_get_unit_range( int id ){ skill_get (skill_db[id].unit_range, id, 1); }
+int skill_get_unit_range( int id, int lv ){ skill_get (skill_db[id].unit_range[lv-1], id, lv); }
int skill_get_unit_target( int id ){ skill_get ((skill_db[id].unit_target&BCT_ALL), id, 1); }
int skill_get_unit_bl_target( int id ){ skill_get ((skill_db[id].unit_target&BL_ALL), id, 1); }
int skill_get_unit_flag( int id ){ skill_get (skill_db[id].unit_flag, id, 1); }
@@ -2104,7 +2104,7 @@ static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
{
int c = 0;
- int range = skill_get_unit_range(skillid);
+ int range = skill_get_unit_range(skillid, skilllv);
int layout_type = skill_get_unit_layout_type(skillid,skilllv);
if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
ShowError("skill_check_unit_range: unsupported layout type %d for skill %d\n",layout_type,skillid);
@@ -2163,7 +2163,7 @@ int skill_check_unit_range2(struct block_list *bl, int m,int x,int y,int skillid
return 0;
}
// とりあえず?ウ方形のユニットレイアウトのみ対応
- range = skill_get_unit_range(skillid) + layout_type;
+ range = skill_get_unit_range(skillid,skilllv) + layout_type;
}
break;
}
@@ -6448,7 +6448,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
nullpo_retr(0, src);
limit = skill_get_time(skillid,skilllv);
- range = skill_get_unit_range(skillid);
+ range = skill_get_unit_range(skillid,skilllv);
interval = skill_get_unit_interval(skillid);
target = skill_get_unit_target(skillid);
unit_flag = skill_get_unit_flag(skillid);
@@ -6486,14 +6486,6 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
limit=1000;
val1=skilllv+2;
break;
- case WZ_METEOR:
- if (skilllv > skill_get_max(skillid)) //?L範囲?テオ
- range = 10;
- break;
- case WZ_VERMILION:
- if (skilllv > skill_get_max(skillid)) //?L範囲LOV
- range = 25;
- break;
case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex]
case AM_DEMONSTRATION:
if (map_flag_vs(src->m) && battle_config.vs_traps_bctall)
@@ -9507,9 +9499,9 @@ int skill_frostjoke_scream(struct block_list *bl,va_list ap)
* バジリカのセルを?ン定する
*------------------------------------------
*/
-void skill_unitsetmapcell(struct skill_unit *src, int skill_num, int flag)
+void skill_unitsetmapcell(struct skill_unit *src, int skill_num, int skill_lv, int flag)
{
- int i,x,y,range = skill_get_unit_range(skill_num);
+ int i,x,y,range = skill_get_unit_range(skill_num,skill_lv);
int size = range*2+1;
for (i=0;i<size*size;i++) {
@@ -9951,19 +9943,19 @@ struct skill_unit *skill_initunit(struct skill_unit_group *group,int idx,int x,i
switch (group->skill_id) {
case AL_PNEUMA:
- skill_unitsetmapcell(unit,AL_PNEUMA,CELL_SETPNEUMA);
+ skill_unitsetmapcell(unit,AL_PNEUMA,group->skill_lv,CELL_SETPNEUMA);
break;
case MG_SAFETYWALL:
- skill_unitsetmapcell(unit,MG_SAFETYWALL,CELL_SETSAFETYWALL);
+ skill_unitsetmapcell(unit,MG_SAFETYWALL,group->skill_lv,CELL_SETSAFETYWALL);
break;
case SA_LANDPROTECTOR:
- skill_unitsetmapcell(unit,SA_LANDPROTECTOR,CELL_SETLANDPROTECTOR);
+ skill_unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_SETLANDPROTECTOR);
break;
case HP_BASILICA:
- skill_unitsetmapcell(unit,HP_BASILICA,CELL_SETBASILICA);
+ skill_unitsetmapcell(unit,HP_BASILICA,group->skill_lv,CELL_SETBASILICA);
break;
case WZ_ICEWALL:
- skill_unitsetmapcell(unit,WZ_ICEWALL,CELL_SETICEWALL);
+ skill_unitsetmapcell(unit,WZ_ICEWALL,group->skill_lv,CELL_SETICEWALL);
break;
}
return unit;
@@ -9993,19 +9985,19 @@ int skill_delunit(struct skill_unit *unit)
switch (group->skill_id) {
case AL_PNEUMA:
- skill_unitsetmapcell(unit,AL_PNEUMA,CELL_CLRPNEUMA);
+ skill_unitsetmapcell(unit,AL_PNEUMA,group->skill_lv,CELL_CLRPNEUMA);
break;
case MG_SAFETYWALL:
- skill_unitsetmapcell(unit,MG_SAFETYWALL,CELL_CLRSAFETYWALL);
+ skill_unitsetmapcell(unit,MG_SAFETYWALL,group->skill_lv,CELL_CLRSAFETYWALL);
break;
case SA_LANDPROTECTOR:
- skill_unitsetmapcell(unit,SA_LANDPROTECTOR,CELL_CLRLANDPROTECTOR);
+ skill_unitsetmapcell(unit,SA_LANDPROTECTOR,group->skill_lv,CELL_CLRLANDPROTECTOR);
break;
case HP_BASILICA:
- skill_unitsetmapcell(unit,HP_BASILICA,CELL_CLRBASILICA);
+ skill_unitsetmapcell(unit,HP_BASILICA,group->skill_lv,CELL_CLRBASILICA);
break;
case WZ_ICEWALL:
- skill_unitsetmapcell(unit,WZ_ICEWALL,CELL_CLRICEWALL);
+ skill_unitsetmapcell(unit,WZ_ICEWALL,group->skill_lv,CELL_CLRICEWALL);
break;
}
@@ -11469,7 +11461,7 @@ int skill_readdb(void)
skill_db[i].unit_id[0] = strtol(split[1],NULL,16);
skill_db[i].unit_id[1] = strtol(split[2],NULL,16);
skill_split_atoi(split[3],skill_db[i].unit_layout_type);
- skill_db[i].unit_range = atoi(split[4]);
+ skill_split_atoi(split[4],skill_db[i].unit_range);
skill_db[i].unit_interval = atoi(split[5]);
if( strcmpi(split[6],"noenemy")==0 ) skill_db[i].unit_target=BCT_NOENEMY;
diff --git a/src/map/skill.h b/src/map/skill.h
index 141d465a5..54982bd4d 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -60,7 +60,7 @@ struct skill_db {
int nocast;
int unit_id[2];
int unit_layout_type[MAX_SKILL_LEVEL];
- int unit_range;
+ int unit_range[MAX_SKILL_LEVEL];
int unit_interval;
int unit_target;
int unit_flag;