diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 18 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 81 | ||||
-rw-r--r-- | src/map/status.c | 24 | ||||
-rw-r--r-- | src/map/status.h | 1 |
5 files changed, 117 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index e1d34d7e0..f06ab2292 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1422,7 +1422,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo s_ele_ = sstatus->lhw.ele; if( sd ){ //Summoning 10 talisman will endow your weapon. ARR_FIND(1, 6, i, sd->talisman[i] >= 10); - if( i < 5) s_ele = s_ele_ = i; + if( i < 5 ) s_ele = s_ele_ = i; } if( flag.arrow && sd && sd->bonus.arrow_ele ) s_ele = sd->bonus.arrow_ele; @@ -1778,6 +1778,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo skillratio += sc->data[SC_MAXOVERTHRUST]->val2; if(sc->data[SC_BERSERK]) skillratio += 100; + if(sc->data[SC_ZENKAI] && sstatus->rhw.ele == sc->data[SC_ZENKAI]->val2 ) + skillratio += sc->data[SC_ZENKAI]->val1 * 2; } if( !skill_num ) { @@ -2599,6 +2601,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo status_change_end(target,SC_SPIRIT,INVALID_TIMER); } break; + case KO_KAIHOU: + if( sd ){ + ARR_FIND(1, 6, i, sd->talisman[i] > 0); + if( i < 5 ){ + s_ele = i; + ATK_ADDRATE(100 * sd->talisman[i]);// +100% custom value. + pc_del_talisman(sd, sd->talisman[i], i); + } + } + break; } } //Div fix. @@ -3339,8 +3351,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list if (s_ele == -1){ // pl=-1 : the skill takes the weapon's element s_ele = sstatus->rhw.ele; if( sd ){ //Summoning 10 talisman will endow your weapon - ARR_FIND(1, 6, i, sd->talisman[i] > 0); - if( i < 5) s_ele = i; + ARR_FIND(1, 6, i, sd->talisman[i] >= 10); + if( i < 5 ) s_ele = i; } }else if (s_ele == -2) //Use status element s_ele = status_get_attack_sc_element(src,status_get_sc(src)); diff --git a/src/map/pc.h b/src/map/pc.h index f7a821768..b4f10e02f 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -643,7 +643,7 @@ enum e_pc_permission { //Weapon check considering dual wielding. #define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \ - 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2))) + 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon))) //Checks if the given class value corresponds to a player class. [Skotlex] //JOB_NOVICE isn't checked for class_ is supposed to be unsigned #define pcdb_checkid_sub(class_) \ diff --git a/src/map/skill.c b/src/map/skill.c index 1b1f8a510..0b2d91287 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3437,6 +3437,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case MH_STAHL_HORN: case KO_JYUMONJIKIRI: case KO_SETSUDAN: + case KO_KAIHOU: skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); break; @@ -8721,6 +8722,29 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); break; + case KO_GENWAKU: + { + int x = src->x, y = src->y; + if (unit_movepos(src,bl->x,bl->y,0,0)) { + clif_skill_nodamage(src,src,skillid,skilllv,1); + clif_slide(src,bl->x,bl->y) ; + sc_start(src,SC_CONFUSION,80,skilllv,skill_get_time(skillid,skilllv)); + if (unit_movepos(bl,x,y,0,0)) + { + clif_skill_damage(bl,bl,tick, status_get_amotion(src), 0, -30000, 1, skillid, -1, 6); + clif_slide(bl,x,y) ; + sc_start(bl,SC_CONFUSION,80,skilllv,skill_get_time(skillid,skilllv)); + } + } + } + break; + + case KO_IZAYOI: + clif_skill_nodamage(src,bl,skillid,skilllv, + sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv))); + clif_skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6); + break; + default: if( skillid >= HM_SKILLBASE && skillid <= HM_SKILLBASE + MAX_HOMUNSKILL ) { if( src->type == BL_HOM && ((TBL_HOM*)src)->master->fd ) @@ -9443,6 +9467,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk case KO_HUUMARANKA: case KO_MUCHANAGE: case KO_BAKURETSU: + case KO_ZENKAI: //case KO_MAKIBISHI: flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete). case GS_GROUNDDRIFT: //Ammo should be deleted right away. @@ -10481,7 +10506,19 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli if( flag&1 ) limit = 3000; val3 = (x<<16)|y; - break; + break; + case KO_ZENKAI: + if( sd ){ + ARR_FIND(1, 6, i, sd->talisman[i] > 0); + if( i < 5 ){ + val1 = sd->talisman[i]; // no. of aura + val2 = i; // aura type + limit += val1 * 1000; + subunt = i - 1; + pc_del_talisman(sd, sd->talisman[i], i); + } + } + break; } nullpo_retr(NULL, group=skill_initunitgroup(src,layout->count,skillid,skilllv,skill_get_unit_id(skillid,flag&1)+subunt, limit, interval)); @@ -11459,8 +11496,36 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_FIRE_MANTLE: if( battle_check_target(&src->bl, bl, BCT_ENEMY) ) skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); - break; + break; + case UNT_ZENKAI_WATER: + case UNT_ZENKAI_GROUND: + case UNT_ZENKAI_FIRE: + case UNT_ZENKAI_WIND: + if( battle_check_target(&src->bl,bl,BCT_ENEMY) > 0 ){ + switch( sg->unit_id ){ + case UNT_ZENKAI_WATER: + sc_start(bl, SC_CRYSTALIZE, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + sc_start(bl, SC_FREEZE, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + sc_start(bl, SC_FREEZING, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + break; + case UNT_ZENKAI_GROUND: + sc_start(bl, SC_STONE, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + sc_start(bl, SC_POISON, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + break; + case UNT_ZENKAI_FIRE: + sc_start(bl, SC_BURNING, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + break; + case UNT_ZENKAI_WIND: + sc_start(bl, SC_SILENCE, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + sc_start(bl, SC_SLEEP, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + sc_start(bl, SC_DEEPSLEEP, sg->val1*5, sg->skill_lv, skill_get_time2(sg->skill_id, sg->skill_lv)); + break; + } + }else + sc_start2(bl,type,100,sg->val1,sg->val2,skill_get_time2(sg->skill_id, sg->skill_lv)); + break; + } if (bl->type == BL_MOB && ss != bl) @@ -12534,6 +12599,14 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh } } break; + case KO_KAIHOU: + case KO_ZENKAI: + ARR_FIND(1, 6, i, sd->talisman[i] > 0); + if( i > 4 ) { + clif_skill_fail(sd,skill,USESKILL_FAIL_LEVEL,0); + return 0; + } + break; } switch(require.state) { @@ -13244,6 +13317,8 @@ int skill_castfix_sc (struct block_list *bl, int time, int skill_id, int skill_l } if (sc->data[SC_POEMBRAGI]) time -= time * sc->data[SC_POEMBRAGI]->val2 / 100; + if (sc->data[SC_IZAYOI]) + time -= time * 50 / 100; #ifdef RENEWAL_CAST if( sc->data[SC__LAZINESS] ) fixed += fixed * sc->data[SC__LAZINESS]->val2 / 100; @@ -13254,6 +13329,8 @@ int skill_castfix_sc (struct block_list *bl, int time, int skill_id, int skill_l fixed -= fixed * sc->data[SC_SECRAMENT]->val2 / 100; if( sc->data[SC_MANDRAGORA] && (skill_id >= SM_BASH && skill_id <= RETURN_TO_ELDICASTES) ) fixed += 2000; + if (sc->data[SC_IZAYOI] && (skill_id >= NJ_TOBIDOUGU && skill_id <= NJ_ISSEN)) + fixed = 0; #endif } #ifdef RENEWAL_CAST diff --git a/src/map/status.c b/src/map/status.c index 987de30fe..a89253a2d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -716,6 +716,8 @@ void initChangeTables(void) { set_sc( KO_MEIKYOUSISUI , SC_MEIKYOUSISUI , SI_MEIKYOUSISUI , SCB_NONE ); set_sc( KO_KYOUGAKU , SC_KYOUGAKU , SI_KYOUGAKU , SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK ); add_sc( KO_JYUSATSU , SC_CURSE ); + set_sc( KO_ZENKAI , SC_ZENKAI , SI_ZENKAI , SCB_NONE ); + set_sc( KO_IZAYOI , SC_IZAYOI , SI_IZAYOI , SCB_MATK ); add_sc( MH_STAHL_HORN , SC_STUN ); set_sc( MH_ANGRIFFS_MODUS , SC_ANGRIFFS_MODUS , SI_ANGRIFFS_MODUS , SCB_BATK|SCB_WATK|SCB_DEF|SCB_FLEE ); @@ -4501,7 +4503,9 @@ static unsigned short status_calc_matk(struct block_list *bl, struct status_chan if(sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3) matk += 50; if(sc->data[SC_ODINS_POWER]) - matk += 70; + matk += 70; + if(sc->data[SC_IZAYOI]) + matk += 50 * sc->data[SC_IZAYOI]->val1; return (unsigned short)cap_value(matk,0,USHRT_MAX); } @@ -6291,9 +6295,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_SLEEP: case SC_STUN: case SC_FREEZING: + case SC_CRYSTALIZE: if (sc->opt1) return 0; //Cannot override other opt1 status changes. [Skotlex] - if((type == SC_FREEZE || type == SC_FREEZING) && sc->data[SC_WARMER]) + if((type == SC_FREEZE || type == SC_FREEZING || type == SC_CRYSTALIZE) && sc->data[SC_WARMER]) return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie] break; @@ -8263,7 +8268,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val2 = 2*val1 + rand()%val1; clif_status_change(bl,SI_ACTIVE_MONSTER_TRANSFORM,1,0,1002,0,0); // Temporarily shows Poring need official [malufett] break; - + case SC_IZAYOI: + val2 = tick/1000; + tick_time = 1000; + break; default: if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 ) { //Status change with no calc, no icon, and no skill associated...? @@ -10199,6 +10207,16 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data) return 0; } break; + case SC_IZAYOI: + case SC_KAGEMUSYA: + if( --(sce->val2) > 0 ) + { + if(!status_charge(bl, 0, 1)) + break; + sc_timer_next(1000+tick, status_change_timer, bl->id, data); + return 0; + } + break; } // default for all non-handled control paths is to end the status diff --git a/src/map/status.h b/src/map/status.h index 8b27af328..0c684bcf9 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -628,6 +628,7 @@ typedef enum sc_type { SC_JYUMONJIKIRI, SC_KYOUGAKU, SC_IZAYOI, + SC_ZENKAI, SC_KAGEHUMI, SC_KYOMU, SC_KAGEMUSYA, |