summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-08-06 15:07:26 +0100
committerMichieru <Michieru@users.noreply.github.com>2014-08-06 15:07:26 +0100
commit356a83b11ae56778992b27b0c9b358d7d79722cd (patch)
treef113b57f6276ff0ed4c26c9042b7e41c11382e51 /src/map/battle.c
parent254f47e4f04141f6ceeb68d0dbbb4a0001d01a24 (diff)
downloadhercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.gz
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.bz2
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.xz
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.zip
- Fix 3rd class skills on pre-renewal.
- When under Mind Break Matk Effect and Mdef reduction should not show on ALT Q(bug:7915) - Plagiarism should not copy New 3rd class skills. Thanks to OmegaRed (bug:8118) - Update Runstone Lux Anima to official formula (bug:8285) - Add official formula for Demonic Fire - Update damage formula for Unlimit, apply Def and Mdef to 1 during the skill and adjust the cooldown to official. (bug:8227) - Flash Combo should not consume hp-sp and the skill not ignore the distance. - Fix a bug with Full Throttle that not consuming sp correctly and adjust the cooldown to official. - All WoE items are inactive outside WoE or PVP - Add bonus3 bSPVanishRate for Vellum Items. - Script Vellum Items. - Add 2 new bonus bSetDefRace and bSetMDefRace for the Vellum Items. (rAthena c046668034) - Fixed Bowling Bash, Brandish Spear, Grand Darkness and Meteor Assault reducing def during cast; the only skill that does this officially is Grand Cross (rAthena 694719048e) - Implemented official Bowling Bash with all its special behaviors including the gutter line * As many servers probably want to remove the gutter line problem, it is configurable; just adjust the bowling_bash_area setting in skill.conf (Bug:4209) - Sonic Blow now has a fixed range of 1, even for monsters; a monster can't use this skill if you tank it from farther away (rAthena a15cee063d)
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7610d97b2..a83767728 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1693,19 +1693,17 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
if( sc && sc->data[SC_CURSED_SOIL_OPTION] )
skillratio += sc->data[SC_CURSED_SOIL_OPTION]->val3;
break;
- case GN_DEMONIC_FIRE:
- if( skill_lv > 20)
- { // Fire expansion Lv.2
- skillratio += 110 + 20 * (skill_lv - 20) + status_get_int(src) * 3; // Need official INT bonus. [LimitLine]
- }
- else if( skill_lv > 10 )
- { // Fire expansion Lv.1
- skillratio += 110 + 20 * (skill_lv - 10) / 2;
- }
- else
- skillratio += 110 + 20 * skill_lv;
- break;
- // Magical Elemental Spirits Attack Skills
+ case GN_DEMONIC_FIRE: {
+ int fire_expansion_lv = skill_lv / 100;
+ skill_lv = skill_lv % 100;
+ skillratio = 110 + 20 * skill_lv;
+ if ( fire_expansion_lv == 1 )
+ skillratio += status_get_int(src) + (sd?sd->status.job_level:50);
+ else if ( fire_expansion_lv == 2 )
+ skillratio += status_get_int(src) * 10;
+ }
+ break;
+ // Magical Elemental Spirits Attack Skills
case EL_FIRE_MANTLE:
case EL_WATER_SCREW:
skillratio += 900;
@@ -4651,7 +4649,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
case RA_WUGBITE:
break;
default:
- ATK_ADD( 50 * sc->data[SC_UNLIMIT]->val1 );
+ ATK_ADDRATE( 50 * sc->data[SC_UNLIMIT]->val1 );
}
}
@@ -5261,6 +5259,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,uint16 skill_id,uint16 skill_lv,int count)
{
struct Damage d;
+ struct map_session_data *sd=BL_CAST(BL_PC,bl);
switch(attack_type) {
case BF_WEAPON: d = battle->calc_weapon_attack(bl,target,skill_id,skill_lv,count); break;
case BF_MAGIC: d = battle->calc_magic_attack(bl,target,skill_id,skill_lv,count); break;
@@ -5299,6 +5298,13 @@ struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct bl
d.dmotion = 0;
} else // Some skills like Weaponry Research will cause damage even if attack is dodged
d.dmg_lv = ATK_DEF;
+
+ if(sd && d.damage+d.damage2>1) {
+ if(sd->bonus.sp_vanish_rate && sd->bonus.sp_vanish_trigger && rnd()%10000<sd->bonus.sp_vanish_rate &&
+ ( (d.flag&sd->bonus.sp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.sp_vanish_trigger&BF_RANGEMASK)
+ || (d.flag&sd->bonus.sp_vanish_trigger&BF_SKILLMASK) ))
+ status_percent_damage(&sd->bl,target,0,-sd->bonus.sp_vanish_per,false);
+ }
return d;
}
//Performs reflect damage (magic (maya) is performed over skill.c).
@@ -5523,8 +5529,8 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldama
}
}
- if (sd->bonus.sp_vanish_rate && rnd()%1000 < sd->bonus.sp_vanish_rate)
- status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->bonus.sp_vanish_per, false);
+ if (sd->bonus.sp_vanish_rate && rnd()%1000 < sd->bonus.sp_vanish_rate && !sd->bonus.sp_vanish_trigger)
+ status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->bonus.sp_vanish_per, false);
if( sd->sp_gain_race_attack[race] )
tsp += sd->sp_gain_race_attack[race];
@@ -6728,6 +6734,7 @@ static const struct battle_data {
{ "homunculus_max_level", &battle_config.hom_max_level, 99, 0, MAX_LEVEL, },
{ "homunculus_S_max_level", &battle_config.hom_S_max_level, 150, 0, MAX_LEVEL, },
{ "mob_size_influence", &battle_config.mob_size_influence, 0, 0, 1, },
+ { "bowling_bash_area", &battle_config.bowling_bash_area, 0, 0, 20, },
/**
* Hercules
**/