summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
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
**/