Songs and Dances vs. Dispell and Vanishing Buster (fixes #1824)

* Songs and Dances can no longer be dispelled by Dispell and Vanishing Buster
* Added a configuration to simulate the old behavior: Dispelling works if target not inside song area
This commit is contained in:
Playtester 2016-12-25 20:02:07 +01:00
parent 9f4587a652
commit 260655a3c4
4 changed files with 16 additions and 10 deletions

View File

@ -358,3 +358,8 @@ can_damage_skill: 1
// 7%: CHARIOT | 6%: THE HANGED MAN | 5%: DEATH, STAR | 2%: TOWER | 1%: WHEEL OF FORTUNE, DEVIL
// If you set this to "yes", the chance for each card becomes 1/14.
tarotcard_equal_chance: no
// Should Dispel work on songs when the target is not in the song area? (Note 1)
// On official servers, it's impossible to dispel songs.
// Hint: Also affects the Rebellion skill "Vanishing Buster".
dispel_song: no

View File

@ -8383,6 +8383,7 @@ static const struct _battle_data {
{ "block_account_in_same_party", &battle_config.block_account_in_same_party, 1, 0, 1, },
{ "tarotcard_equal_chance", &battle_config.tarotcard_equal_chance, 0, 0, 1, },
{ "change_party_leader_samemap", &battle_config.change_party_leader_samemap, 1, 0, 1, },
{ "dispel_song", &battle_config.dispel_song, 0, 0, 1, },
#include "../custom/battle_config_init.inc"
};

View File

@ -614,6 +614,7 @@ extern struct Battle_Config
int block_account_in_same_party;
int tarotcard_equal_chance; //Official or equal chance for each card
int change_party_leader_samemap;
int dispel_song; //Can songs be dispelled?
#include "../custom/battle_config_struct.inc"
} battle_config;

View File

@ -1830,8 +1830,8 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
case SC_WHISTLE: case SC_ASSNCROS: case SC_POEMBRAGI:
case SC_APPLEIDUN: case SC_HUMMING: case SC_DONTFORGETME:
case SC_FORTUNE: case SC_SERVICE4U:
if(tsc->data[i]->val4==0)
continue; //if in song-area don't end it
if (!battle_config.dispel_song || tsc->data[i]->val4 == 0)
continue; //If in song area don't end it, even if config enabled
break;
case SC_ASSUMPTIO:
if( bl->type == BL_MOB )
@ -7903,7 +7903,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SC_CROSSBOWCLAN:
case SC_JUMPINGCLAN:
continue;
//bugreport:4888 these songs may only be dispelled if you're not in their song area anymore
case SC_WHISTLE:
case SC_ASSNCROS:
case SC_POEMBRAGI:
@ -7912,13 +7911,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case SC_DONTFORGETME:
case SC_FORTUNE:
case SC_SERVICE4U:
if(tsc->data[i]->val4==0)
continue; //if in song-area don't end it
break;
case SC_ASSUMPTIO:
if( bl->type == BL_MOB )
continue;
break;
if (!battle_config.dispel_song || tsc->data[i]->val4 == 0)
continue; //If in song area don't end it, even if config enabled
break;
case SC_ASSUMPTIO:
if( bl->type == BL_MOB )
continue;
break;
}
if(i == SC_BERSERK) tsc->data[i]->val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.
status_change_end(bl, (sc_type)i, INVALID_TIMER);