summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/player.conf7
-rw-r--r--conf/messages.conf5
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c39
-rw-r--r--src/map/pc.h1
6 files changed, 52 insertions, 2 deletions
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index f493f6b67..ccad0afc0 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -142,4 +142,9 @@ idle_no_autoloot: 0
// Minimum distance a vending/chat room must be from a NPC in order to be placed
// Default: 3 (0: disabled).
-min_npc_vendchat_distance: 3 \ No newline at end of file
+min_npc_vendchat_distance: 3
+
+// Super Novice's fury is enabled to increments of 10%, such as at 10.0%, 20.0% - 80.0%, 90.0%
+// Changing snovice_call_type config to 1 enables its use at 0%, for maxed super novices.
+// default: 0
+snovice_call_type: 0 \ No newline at end of file
diff --git a/conf/messages.conf b/conf/messages.conf
index 987be40bf..d7b25a258 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1513,5 +1513,10 @@
//@homlv
1478: Homun reached its maximum level of '%d'
+//src/map/clif.c::clif_parse_GlobalMessage
+1479: Dear angel, can you hear my voice?
+1480: I am %s Super Novice~
+1481: Help me out~ Please~ T_T
+
//Custom translations
import: conf/import/msg_conf.txt
diff --git a/src/map/battle.c b/src/map/battle.c
index 4a31a9706..2a5e82e30 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6500,6 +6500,7 @@ static const struct _battle_data {
{ "gm_ignore_warpable_area", &battle_config.gm_ignore_warpable_area, 0, 2, 100, },
{ "packet_obfuscation", &battle_config.packet_obfuscation, 1, 0, 3, },
{ "client_accept_chatdori", &battle_config.client_accept_chatdori, 0, 0, INT_MAX, },
+ { "snovice_call_type", &battle_config.snovice_call_type, 0, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 64883069b..99856de94 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -457,6 +457,7 @@ struct Battle_Config {
int gm_ignore_warpable_area;
int client_accept_chatdori; // [Ai4rei/Mirei]
+ int snovice_call_type;
} battle_config;
diff --git a/src/map/clif.c b/src/map/clif.c
index d57d73c09..218e088f1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9414,7 +9414,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
}
if( sd->bg_id ) clif->bg_hp(sd); // BattleGround System
-
+
if(map[sd->bl.m].flag.pvp && !(sd->sc.option&OPTION_INVISIBLE)) {
if(!battle_config.pk_mode) { // remove pvp stuff for pk_mode [Valaris]
if (!map[sd->bl.m].flag.pvp_nocalcrank)
@@ -9436,6 +9436,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if( map_flag_gvg(sd->bl.m) )
clif->map_property(sd, MAPPROPERTY_AGITZONE);
+
// info about nearby objects
// must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange)
iMap->foreachinarea(clif->getareachar, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_ALL, sd);
@@ -9897,6 +9898,38 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
return;
sd->cantalk_tick = iTimer->gettick() + battle_config.min_chat_delay;
}
+
+ if( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE ) {
+ unsigned int next = pc->nextbaseexp(sd);
+ if( next == 0 ) next = pc->thisbaseexp(sd);
+ if( next ) { // 0%, 10%, 20%, ...
+ int percent = (int)( ( (float)sd->status.base_exp/(float)next )*1000. );
+ if( (battle_config.snovice_call_type || percent) && ( percent%100 ) == 0 ) {// 10.0%, 20.0%, ..., 90.0%
+ switch (sd->state.snovice_call_flag) {
+ case 0:
+ if( strstr(message, msg_txt(1479)) ) // "Dear angel, can you hear my voice?"
+ sd->state.snovice_call_flag = 1;
+ break;
+ case 1: {
+ char buf[256];
+ snprintf(buf, 256, msg_txt(1480), sd->status.name);
+ if( strstr(message, buf) ) // "I am %s Super Novice~"
+ sd->state.snovice_call_flag = 2;
+ }
+ break;
+ case 2:
+ if( strstr(message, msg_txt(1481)) ) // "Help me out~ Please~ T_T"
+ sd->state.snovice_call_flag = 3;
+ break;
+ case 3:
+ sc_start(&sd->bl, iStatus->skill2sc(MO_EXPLOSIONSPIRITS), 100, 17, skill->get_time(MO_EXPLOSIONSPIRITS, 5)); //Lv17-> +50 critical (noted by Poki) [Skotlex]
+ clif->skill_nodamage(&sd->bl, &sd->bl, MO_EXPLOSIONSPIRITS, 5, 1); // prayer always shows successful Lv5 cast and disregards noskill restrictions
+ sd->state.snovice_call_flag = 0;
+ break;
+ }
+ }
+ }
+ }
if( sd->gcbind ) {
clif->chsys_send(sd->gcbind,sd,message);
@@ -13674,6 +13707,10 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
/// "Help me out~ Please~ T_T"
void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
{
+ /* [Ind/Hercules] */
+ /* game client is currently broken on this (not sure the packetver range) */
+ /* it sends the request when the criteria doesn't match (and of course we let it fail) */
+ /* so restoring the old parse_globalmes method. */
if( ( sd->class_&MAPID_UPPERMASK ) == MAPID_SUPER_NOVICE ) {
unsigned int next = pc->nextbaseexp(sd);
if( next == 0 ) next = pc->thisbaseexp(sd);
diff --git a/src/map/pc.h b/src/map/pc.h
index 7db5c2fcc..231f369d8 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -167,6 +167,7 @@ struct map_session_data {
unsigned int prerefining : 1;
unsigned int workinprogress : 3; // 1 = disable skill/item, 2 = disable npc interaction, 3 = disable both
unsigned int hold_recalc : 1;
+ unsigned int snovice_call_flag : 3; //Summon Angel (stage 1~3)
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;