diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-23 18:54:09 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-23 18:54:09 +0000 |
commit | ac46c901463f925504b6a3872a21e64605e3db10 (patch) | |
tree | 4b7d5b9db8f19ee6d416a1524ecafb0d65744807 /src/map/battle.c | |
parent | 300facbcd059becdc8addac8a2f392452fea5fa0 (diff) | |
download | hercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.gz hercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.bz2 hercules-ac46c901463f925504b6a3872a21e64605e3db10.tar.xz hercules-ac46c901463f925504b6a3872a21e64605e3db10.zip |
memory bugs fixed
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1278 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 54e1ba484..15f192ec4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2291,8 +2291,42 @@ static struct Damage battle_calc_pc_weapon_attack( case ASC_BREAKER: // -- moonsoul (special damage for ASC_BREAKER skill) if(sd){ // calculate physical part of damage +#ifndef TWILIGHT damage = damage * skill_lv; damage2 = damage2 * skill_lv; +#else /* TWILIGHT */ + damage = damage * skill_lv * 0.5; //Halved by Krel + damage2 = damage2 * skill_lv * 0.5; //Halved by Krel + // element modifier added right after this + + // calculate magic part of damage + damage3 = skill_lv * status_get_int(src) * 5 * 0.5; //Krel + // ignores magic defense now [Celest] + /*if(sd->ignore_mdef_ele & (1<<t_ele) || sd->ignore_mdef_race & (1<<t_race)) + imdef_flag = 1; + if(t_mode & 0x20) { + if(sd->ignore_mdef_race & (1<<10)) + imdef_flag = 1; + } + else { + if(sd->ignore_mdef_race & (1<<11)) + imdef_flag = 1; + } + if(!imdef_flag){ + if(battle_config.magic_defense_type) { + damage3 = damage3 - (mdef1 * battle_config.magic_defense_type) - mdef2; + } + else{ + damage3 = (damage3*(100-mdef1))/100 - mdef2; + } + } + + if(damage3<1) + damage3=1; + + damage3=battle_attr_fix(damage2,s_ele_, status_get_element(target) );*/ + +#endif /* TWILIGHT */ flag=(flag&~BF_RANGEMASK)|BF_LONG; } break; |