Old Eleanor work :

-Implement  MH_TINDER_BREAKER, STYLE_CHANGE

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17059 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
glighta 2012-12-29 04:41:25 +00:00
parent 8085260aa9
commit f82e7eb077
11 changed files with 124 additions and 86 deletions

View File

@ -1758,7 +1758,7 @@
//-- MH_ANGRIFFS_MODUS
8035,200:400:600:800:1000,0,0,30000:45000:60000:75000:90000,0,0,-1
//-- MH_TINDER_BREAKER
//8036,0,0,0,0,0,0,0
//8036,0,0,0,5000,0,0,0
//-- MH_CBC
//8037,0,0,0,0,0,0,0
//-- MH_EQC

View File

@ -26,6 +26,8 @@
// poisonweapon = Requires to be under Poisoning Weapon.
// rollingcutter = Requires at least one Rotation Counter from Rolling Cutter.
// elementalspirit = Requires to have an Elemental Spirit summoned.
// mh_fighting = eleanor fighthing mode
// mh_grappling = eleanor grappling mode
5,0,0,8:8:8:8:8:15:15:15:15:15,0,0,0,0:1:2:3:4:5:6:7:8:9:10:12:13:14:15:16:17:18:19:20:21:22,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_BASH#ƒoƒbƒVƒ…#
6,0,0,4:5:6:7:8:9:10:11:12:13,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //SM_PROVOKE#ƒvƒ<76>ƒ{ƒbƒN#
@ -855,7 +857,7 @@
8025,0,0,90:100:110:120:130,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_XENO_SLASHER#Xeno Slasher#
8026,0,0,45:54:63:72:81,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_SILENT_BREEZE#Silent Breeze#
8027,0,0,35,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_STYLE_CHANGE#Style Change#
8028,0,0,20:25:30:35:40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_SONIC_CRAW#Sonic Claw#
8028,0,0,20:25:30:35:40,0,0,0,99,0,0,mh_fighting,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_SONIC_CRAW#Sonic Claw#
8029,0,0,10:15:20:25:30,0,0,0,99,0,0,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_SILVERVEIN_RUSH#Silver Bain Rush#
8030,0,0,8:16:24:32:40,0,0,0,99,0,0,none,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_MIDNIGHT_FRENZY#Midnight Frenzy#
8031,0,0,40:45:50:55:60,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_STAHL_HORN#Steel Horn#
@ -863,8 +865,8 @@
8033,0,0,80:90:100:110:120,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_STEINWAND#Stone Wall#
8034,0,0,60:68:76:84:100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_HEILIGE_STANGE#Holy Pole#
8035,0,0,60:65:70:75:80,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_ANGRIFFS_MODUS#Attack Mode#
8036,0,0,20:25:30:35:40,0,0,0,99,0,0,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_TINDER_BREAKER#Tinder Breaker#
8037,0,0,10:20:30:40:50,0,0,0,99,0,0,none,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_CBC#Continual Break Combo#
8036,0,0,20:25:30:35:40,0,0,0,99,0,0,mh_grappling,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_TINDER_BREAKER#Tinder Breaker#
8037,0,0,10:20:30:40:50,0,0,0,99,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_CBC#Continual Break Combo#
8038,0,0,24:28:32:36:40,0,0,0,99,0,0,none,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_EQC#Eternal Quick Combo#
8039,0,0,34:38:42:46:50,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_MAGMA_FLOW#Magma Flow#
8040,0,0,54:58:62:66:70,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //MH_GRANITIC_ARMOR#Granitic Armor#

View File

@ -292,6 +292,8 @@ struct s_homunculus { //[orn]
int int_ ;
int dex ;
int luk ;
char spiritball; //for homun S [lighta]
};
struct s_mercenary {

View File

@ -1121,7 +1121,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 )
pc_addspiritball(sd,skill_get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3);
if (sc->data[SC_STYLE_CHANGE] && rnd() % 100 < 50) {
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
TBL_HOM *hd = BL_CAST(BL_HOM,bl);
if (hd) hom_addspiritball(hd, 10); //add a sphere
}
@ -1184,7 +1184,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
sc_start(bl,sc->data[SC_POISONINGWEAPON]->val2,100,sc->data[SC_POISONINGWEAPON]->val1,skill_get_time2(GC_POISONINGWEAPON, 1));
if( sc->data[SC__DEADLYINFECT] && damage > 0 && rnd()%100 < 65 + 5 * sc->data[SC__DEADLYINFECT]->val1 )
status_change_spread(src, bl);
if (sc->data[SC_STYLE_CHANGE] && rnd() % 100 < 50) {
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
TBL_HOM *hd = BL_CAST(BL_HOM,bl);
if (hd) hom_addspiritball(hd, 10);
}
@ -2928,6 +2928,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
case MH_LAVA_SLIDE:
skillratio = 70 * skill_lv;
break;
case MH_TINDER_BREAKER:
case MH_MAGMA_FLOW:
skillratio += -100 + 100 * skill_lv;
break;
@ -3049,9 +3050,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
if(sc->data[SC_STYLE_CHANGE]){
TBL_HOM *hd = BL_CAST(BL_HOM,src);
if (hd) ATK_ADD(hd->spiritball * 3);
if (hd) ATK_ADD(hd->homunculus.spiritball * 3);
}
}
switch (skill_num) {

View File

@ -6916,7 +6916,7 @@ void clif_spiritball(struct block_list *bl) {
WBUFW(buf, 6) = 0; //init to 0
switch(bl->type){
case BL_PC: WBUFW(buf, 6) = sd->spiritball; break;
case BL_HOM: WBUFW(buf, 6) = hd->spiritball; break;
case BL_HOM: WBUFW(buf, 6) = hd->homunculus.spiritball; break;
}
clif_send(buf, packet_len(0x1d0), bl, AREA);
}

View File

@ -86,14 +86,14 @@ int hom_addspiritball(TBL_HOM *hd, int max) {
if (max > MAX_SKILL_LEVEL)
max = MAX_SKILL_LEVEL;
if (hd->spiritball < 0)
hd->spiritball = 0;
if (hd->homunculus.spiritball < 0)
hd->homunculus.spiritball = 0;
if (hd->spiritball && hd->spiritball >= max) {
hd->spiritball = max;
if (hd->homunculus.spiritball && hd->homunculus.spiritball >= max) {
hd->homunculus.spiritball = max;
}
else
hd->spiritball++;
hd->homunculus.spiritball++;
clif_spiritball(&hd->bl);
@ -103,18 +103,18 @@ int hom_addspiritball(TBL_HOM *hd, int max) {
int hom_delspiritball(TBL_HOM *hd, int count, int type) {
nullpo_ret(hd);
if (hd->spiritball <= 0) {
hd->spiritball = 0;
if (hd->homunculus.spiritball <= 0) {
hd->homunculus.spiritball = 0;
return 0;
}
if (count <= 0)
return 0;
if (count > MAX_SKILL_LEVEL)
count = MAX_SKILL_LEVEL;
if (count > hd->spiritball)
count = hd->spiritball;
if (count > hd->homunculus.spiritball)
count = hd->homunculus.spiritball;
hd->spiritball -= count;
hd->homunculus.spiritball -= count;
if (!type)
clif_spiritball(&hd->bl);

View File

@ -25,6 +25,8 @@ struct s_homunculus_db {
extern struct s_homunculus_db homunculus_db[MAX_HOMUNCULUS_CLASS];
enum { HOMUNCULUS_CLASS, HOMUNCULUS_FOOD };
enum { MH_MD_FIGHTING=1, MH_MD_GRAPPLING };
enum {
SP_ACK = 0x0,
SP_INTIMATE = 0x1,
@ -45,8 +47,6 @@ struct homun_data {
int hungry_timer; //[orn]
unsigned int exp_next;
char blockskill[MAX_SKILL]; // [orn]
int spiritball; //for homun S [lighta]
};
#define MAX_HOM_SKILL_REQUIRE 5

View File

@ -4608,10 +4608,23 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag | BCT_ENEMY | SD_SPLASH | 1, skill_castend_damage_id);
}
break;
case MH_STAHL_HORN:
case MH_NEEDLE_OF_PARALYZE:
skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
break;
case MH_TINDER_BREAKER:
if (unit_movepos(src, bl->x, bl->y, 1, 1)) {
#if PACKETVER >= 20111005
clif_snap(src, bl->x, bl->y);
#else
clif_skill_poseffect(src,skillid,skilllv,bl->x,bl->y,tick);
#endif
}
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start4(bl,SC_CLOSECONFINE2,100,skilllv,src->id,0,0,skill_get_time(skillid,skilllv)));
skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
break;
case 0:/* no skill - basic/normal attack */
if(sd) {
@ -13139,6 +13152,16 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
return 0;
}
break;
case ST_MH_FIGHTING:
if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_FIGHTING)){
clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
return 0;
}
case ST_MH_GRAPPLING:
if (!(sc && sc->data[SC_STYLE_CHANGE] && sc->data[SC_STYLE_CHANGE]->val2 == MH_MD_GRAPPLING)){
clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0);
return 0;
}
}
if(require.mhp > 0 && get_percentage(status->hp, status->max_hp) > require.mhp) {
@ -17576,6 +17599,8 @@ static bool skill_parse_row_requiredb(char* split[], int columns, int current)
else if( strcmpi(split[10],"elementalspirit")==0 ) skill_db[i].state = ST_ELEMENTALSPIRIT;
else if (strcmpi(split[10], "poisonweapon") == 0) skill_db[i].state = ST_POISONINGWEAPON;
else if (strcmpi(split[10], "rollingcutter") == 0) skill_db[i].state = ST_ROLLINGCUTTER;
else if (strcmpi(split[10], "mh_fighting") == 0) skill_db[i].state = ST_MH_FIGHTING;
else if (strcmpi(split[10], "mh_grappling") == 0) skill_db[i].state = ST_MH_GRAPPLING;
/**
* Unknown or no state

View File

@ -402,6 +402,8 @@ enum {
ST_ELEMENTALSPIRIT,
ST_POISONINGWEAPON,
ST_ROLLINGCUTTER,
ST_MH_FIGHTING,
ST_MH_GRAPPLING,
};
enum e_skill {

View File

@ -509,6 +509,8 @@ void initChangeTables(void) {
set_sc(MH_PAIN_KILLER, SC_PAIN_KILLER, SI_PAIN_KILLER, SCB_ASPD);
add_sc(MH_STYLE_CHANGE, SC_STYLE_CHANGE);
set_sc( MH_TINDER_BREAKER , SC_CLOSECONFINE2 , SI_CLOSECONFINE2 , SCB_NONE );
set_sc( MH_TINDER_BREAKER , SC_CLOSECONFINE , SI_CLOSECONFINE , SCB_FLEE );
add_sc( MER_CRASH , SC_STUN );
@ -8593,6 +8595,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if(sc->data[SC_PARALYSIS])
sc_start(bl, SC_ENDURE, 100, val1, tick); //start endure for same duration
break;
case SC_STYLE_CHANGE: //[Lighta] need real info
tick = -1;
if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING;
else val2 = MH_MD_FIGHTING;
break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?