Star Gladiator Miracle Chance (#8460)

- Reduced default chance of Miracle to occur from 0.02% to 0.005%
- Chance of Miracle to occur is now further reduced if AGI is above 46
- Fixes #8445
This commit is contained in:
Playtester 2024-06-26 11:38:46 +02:00 committed by GitHub
parent 21359386be
commit 30f8cb1f6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View File

@ -270,8 +270,10 @@ allow_skill_without_day: no
// Allow use of ES-type magic on players?
allow_es_magic_player: no
// Miracle of the Sun, Moon and Stars skill ratio (100% = 10000)
sg_miracle_skill_ratio: 2
// Miracle of the Sun, Moon and Stars skill ratio
// Valid values range from 1 (0.005% per hit) to 20000 (100% per hit)
// This chance is further reduced if AGI is above 46 (92 = halved chance)
sg_miracle_skill_ratio: 1
// Miracle of the Sun, Moon and Stars skill duration in milliseconds
sg_miracle_skill_duration: 3600000

View File

@ -11247,7 +11247,7 @@ static const struct _battle_data {
{ "mob_status_def_rate", &battle_config.mob_sc_def_rate, 100, 0, INT_MAX, },
{ "pc_max_status_def", &battle_config.pc_max_sc_def, 100, 0, INT_MAX, },
{ "mob_max_status_def", &battle_config.mob_max_sc_def, 100, 0, INT_MAX, },
{ "sg_miracle_skill_ratio", &battle_config.sg_miracle_skill_ratio, 1, 0, 10000, },
{ "sg_miracle_skill_ratio", &battle_config.sg_miracle_skill_ratio, 1, 0, 20000, },
{ "sg_angel_skill_ratio", &battle_config.sg_angel_skill_ratio, 10, 0, 10000, },
{ "autospell_stacking", &battle_config.autospell_stacking, 0, 0, 1, },
{ "override_mob_names", &battle_config.override_mob_names, 0, 0, 2, },

View File

@ -2625,8 +2625,12 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
}
if(sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&
map_getmapflag(sd->bl.m, MF_NOSUNMOONSTARMIRACLE) == 0) //SG_MIRACLE [Komurka]
status_change_start(src,src,SC_MIRACLE,battle_config.sg_miracle_skill_ratio,1,0,0,0,battle_config.sg_miracle_skill_duration,SCSTART_NONE);
map_getmapflag(sd->bl.m, MF_NOSUNMOONSTARMIRACLE) == 0) { //SG_MIRACLE [Komurka]
// 0.005% chance per sg_miracle_skill_ratio
// Chance is further reduced if agi is above 46
if (rnd_chance(battle_config.sg_miracle_skill_ratio, 20000) && rnd_chance(46, (int)sd->battle_status.agi))
sc_start(src, src, SC_MIRACLE, 100, 1, battle_config.sg_miracle_skill_duration);
}
if(sd && skill_id && attack_type&BF_MAGIC && status_isdead(bl) &&
!(skill_get_inf(skill_id)&(INF_GROUND_SKILL|INF_SELF_SKILL)) &&