summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 15:23:08 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 15:23:08 +0000
commit1a194c732064c612f23e55c6c0033ffea0303050 (patch)
tree6badd615f887a0a019f182e886804e3d0fd51060 /src
parent371ce27789b684a49675c463ae31328985dbd0a0 (diff)
downloadhercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.gz
hercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.bz2
hercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.xz
hercules-1a194c732064c612f23e55c6c0033ffea0303050.zip
* Updated damage calculation for Magnum Break
* Fixed #item not working properly git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1331 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c12
-rw-r--r--src/map/charcommand.c10
-rw-r--r--src/map/skill.c38
3 files changed, 35 insertions, 25 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 25aae5ec0..46d84705c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -740,7 +740,8 @@ static struct Damage battle_calc_pet_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // マグナムブレイク
- damage = damage*(5*skill_lv + (wflag?65:115))/100;
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // メマーナイト
damage = damage*(100+ 50*skill_lv)/100;
@@ -1236,7 +1237,8 @@ static struct Damage battle_calc_mob_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // マグナムブレイク
- damage = damage*(5*skill_lv +(wflag?65:115))/100;
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // メマーナイト
damage = damage*(100+ 50*skill_lv)/100;
@@ -1965,8 +1967,10 @@ static struct Damage battle_calc_pc_weapon_attack(
hitrate = (hitrate*(100+5*skill_lv))/100;
break;
case SM_MAGNUM: // マグナムブレイク
- damage = damage*(5*skill_lv +(wflag?65:115) )/100;
- damage2 = damage2*(5*skill_lv +(wflag?65:115) )/100;
+ // 20*skill level+100? i think this will do for now [based on jRO info]
+ damage = damage*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ damage2 = damage2*(wflag > 1 ? 5*skill_lv+115 : 30*skill_lv+100)/100;
+ hitrate = (hitrate*(100+10*skill_lv))/100;
break;
case MC_MAMMONITE: // メマーナイト
damage = damage*(100+ 50*skill_lv)/100;
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 15c94e51a..ed18f27a4 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -32,7 +32,7 @@
static char command_symbol = '#';
-extern char msg_table[1000][256]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
+extern char *msg_table[1000]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others)
#define CCMD_FUNC(x) int charcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message)
@@ -1067,8 +1067,8 @@ int charcommand_item(
for (i = 0; i < number; i += get_count) {
// if pet egg
if (pet_id >= 0) {
- sd->catch_target_class = pet_db[pet_id].class_;
- intif_create_pet(sd->status.account_id, sd->status.char_id,
+ pl_sd->catch_target_class = pet_db[pet_id].class_;
+ intif_create_pet(pl_sd->status.account_id, pl_sd->status.char_id,
(short)pet_db[pet_id].class_, (short)mob_db[pet_db[pet_id].class_].lv,
(short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
100, 0, 1, pet_db[pet_id].jname);
@@ -1077,8 +1077,8 @@ int charcommand_item(
memset(&item_tmp, 0, sizeof(item_tmp));
item_tmp.nameid = item_id;
item_tmp.identify = 1;
- if ((flag = pc_additem((struct map_session_data*)sd, &item_tmp, get_count)))
- clif_additem((struct map_session_data*)sd, 0, 0, flag);
+ if ((flag = pc_additem(pl_sd, &item_tmp, get_count)))
+ clif_additem(pl_sd, 0, 0, flag);
}
}
clif_displaymessage(fd, msg_table[18]); // Item created.
diff --git a/src/map/skill.c b/src/map/skill.c
index a6b7887f4..31b46820b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -807,6 +807,14 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
+ case AS_GRIMTOOTH:
+ if (bl->type == BL_MOB) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
+ status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ }
+ break;
+
case HT_FREEZINGTRAP: /* フリ?ジングトラップ */
rate=skilllv*3+35;
if(rand()%100 < rate*sc_def_mdef/100)
@@ -2346,17 +2354,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(flag&1){
/* 個別にダメ?ジを?える */
if(bl->id!=skill_area_temp[1]){
- int dist=0;
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
- 0x0500|dist );
- if (bl->type == BL_MOB && skillid == AS_GRIMTOOTH) {
- struct status_change *sc_data = status_get_sc_data(bl);
- if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
- status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
- }
+ 0x0500);
}
} else {
- int ar;
+ int ar = 1;
int x = bl->x, y = bl->y;
switch (skillid) {
case AC_SHOWER:
@@ -2365,9 +2367,6 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case NPC_SPLASHATTACK:
ar=3;
break;
- default:
- ar=1;
- break;
}
skill_area_temp[1]=bl->id;
@@ -2384,13 +2383,20 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case SM_MAGNUM: /* マグナムブレイク [celest] */
- {
- int dist = 0;
+ if(flag&1 && bl->id != skill_area_temp[1]){
int dx = abs( bl->x - skill_area_temp[2] );
int dy = abs( bl->y - skill_area_temp[3] );
- dist = ((dx>dy)?dx:dy);
- map_foreachinarea (skill_attack_area,src->m,src->x-1,src->y-1,src->x+1,src->y+1,0,
- BF_WEAPON,src,src,skillid,skilllv,tick,0x0500|dist,BCT_ENEMY);
+ int dist = ((dx>dy)?dx:dy);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
+ 0x0500|dist);
+ } else {
+ skill_area_temp[1]=src->id;
+ skill_area_temp[2]=src->x;
+ skill_area_temp[3]=src->y;
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-2,src->y-2,src->x+2,src->y+2,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
status_change_start (src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
clif_skill_nodamage (src,src,skillid,skilllv,1);
}