Finished Full Strip, Weapon Refine, Slim Pitcher and Full Protection

git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@369 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2004-11-26 10:02:29 +00:00
parent 2e3789719e
commit af56e64377
14 changed files with 205 additions and 75 deletions

View File

@ -1,4 +1,7 @@
Date Added
11/26
* Finished Full Strip, Weapon Refine, Slim Pitcher and Full Protection. [celest]
11/25
* Added @skilltree to help GM's answer skill tree questions [MouseJstr]
* Update Spider Web; I believe you cannot use it on yourself now. [Codemaster]

View File

@ -81,7 +81,8 @@ Progess: 0%
Problem: @job/#job turns you into 2-2-1 and not into any other jobs
Assigned: N/a
Progess: 0%
Progess: 0% (Notes by Celest: Actually, check here ^_-
http://eathena.deltaanime.net/forum/viewtopic.php?p=79951#79951)
Problem: @disguise has no death sprite so the client crashes when you die, a solution would be that upon death before the sprites change you're undisguised.
Assigned: N/a

View File

@ -268,6 +268,10 @@
406,0,0,0,3000 //ASC_METEORASSAULT#メテオアサルト#
407,0,5000,0,0 //ASC_CDP
475,0,0,300000,0 //ST_PRESERVE##
476,1000,1000,75000:90000:105000:120000:135000,0 //ST_FULLSTRIP##
479,2000,0,60000:120000:180000:240000:300000,0 //CR_FULLPROTECTION##
10010,100,60000,0 //GD_BATTLEORDER##
10011,100,60000,0 //GD_REGENERATION##
10012,100,0,0 //GD_RESTORE##

View File

@ -508,6 +508,12 @@
471,0,0,0,0,0,0,0,no,0,0,0,none,0 //SL_SKE##
472,0,0,0,0,0,0,0,no,0,0,0,none,0 //SL_SKA##
475,0,0,4,0,1,1,1,yes,0,0,0,magic,0 //ST_PRESERVE##
476,1,6,1,0,1,5,1,yes,0,0,0,weapon,0 //ST_FULLSTRIP##
477,0,6,4,0,1,10,1,no,0,0,0,weapon,0 //WS_WEAPONREFINE##
478,3,6,2,0,1,10,1,no,0,0,0,none,0 //CR_SLIMPITCHER##
479,1,6,16,0,1,5,1,yes,0,0,0,weapon,0 //CR_FULLPROTECTION##
//id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count
10000,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_APPROVAL#正規ギルド承認#
10001,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_KAFRACONTRACT#カプラ雇用#
@ -525,9 +531,5 @@
10013,0,0,4,0,1,1,0,no,0,0,0,none,0 //GD_EMERGENCYCALL##
10014,0,0,0,0,0,1,0,no,0,0,0,none,0 //GD_DEVELOPMENT##
// ST_PRESERVE#프리저브#
// ST_FULLSTRIP#풀_스트립#
// WS_WEAPONREFINE#무기제련#
// CR_SLIMPITCHER#슬림_피쳐#
// CR_FULLPROTECTION#풀_케미칼프로텍션#
// ITM_TOMAHAWK#토마호크_던지기#
// ITM_TOMAHAWK#토마호크_던지기# 337

View File

@ -291,6 +291,12 @@
//407,0,0,50,0,0,0,99,none,0,937,1,952,1,939,1,7033,1,972,1,657,1,713,1,0,0,0,0,0,0 //ASC_CDP
407,0,0,50,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ASC_CDP#デッドリ?ポイズン作成#
475,0,0,40,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_PRESERVE##
476,0,0,12:14:16:18:20,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //ST_FULLSTRIP##
477,0,0,5,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //WS_WEAPONREFINE##
478,0,0,30,0,0,0,99,none,0,545,1,545,1,545,1,545,1,545,1,546,1,546,1,546,1,546,1,547,1 //CR_SLIMPITCHER##
479,0,0,30,0,0,0,99,none,0,7139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //CR_FULLPROTECTION##
10010,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_BATTLEORDER##
10011,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_REGENERATION##
10012,0,0,1,0,0,0,99,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //GD_RESTORE##

View File

@ -837,6 +837,7 @@
4011,386,3,97,3,106,1,107,5,0,0,0,0//WS_CREATENUGGET #基本スキル#
4011,387,1,39,5,153,1,154,1,105,1,0,0//WS_CARTBOOST #基本スキル#
4011,388,1,107,10,112,3,0,0,0,0,0,0//WS_SYSTEMCREATE #基本スキル#
4011,477,10,109,5,94,5,96,3,97,2,0,0//WS_WEAPONREFINE
//Sniper
4012,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #基本スキル#
4012,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #応急手当#
@ -1080,6 +1081,8 @@
4018,389,5,51,5,213,3,0,0,0,0,0,0//ST_CHASEWALK
4018,390,5,215,1,0,0,0,0,0,0,0,0//ST_REJECTSWORD
4018,391,5,215,1,0,0,0,0,0,0,0,0//ST_STEALBACKPACK
4018,475,1,219,5,225,1,0,0,0,0,0,0//ST_PRESERVE
4018,476,5,215,1,216,1,217,1,218,1,0,0//ST_FULLSTRIP
//Creator
4019,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #基本スキル#
4019,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #応急手当#
@ -1106,6 +1109,9 @@
4019,235,5,237,3,0,0,0,0,0,0,0,0//AM_CP_SHIELD #ケミカルシールドチャージ#
4019,236,5,235,3,0,0,0,0,0,0,0,0//AM_CP_ARMOR #ケミカルアーマーチャージ#
4019,237,5,228,2,0,0,0,0,0,0,0,0//AM_CP_HELM #ケミカルヘルムチャージ#
4019,478,10,228,3,0,0,0,0,0,0,0,0//CR_SLIMPITCHER
4019,479,5,234,1,235,1,236,1,237,1,0,0//CR_FULLPROTECTION
// 韓国でも未実装なので以下のツリーコメントアウト
//4019,238,1,0,0,0,0,0,0,0,0,0,0//AM_BIOETHICS #生命倫理#
//4019,239,10,238,1,0,0,0,0,0,0,0,0//AM_BIOTECHNOLOGY #生命工学研究#

View File

@ -3562,21 +3562,13 @@ static struct Damage battle_calc_pc_weapon_attack(
}
// 状態異常中のダメージ追加でクリティカルにも有効なスキル
if (sc_data) {
// エンチャントデッドリーポイズン
if(sc_data[SC_EDP].timer != -1) {
damage += damage * (150 + sc_data[SC_EDP].val1 * 50) / 100;
damage2 += damage2 * (150 + sc_data[SC_EDP].val1 * 50) / 100;
no_cardfix = 1;
}
}
// 精錬ダメージの追加
@ -4500,9 +4492,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
}
if(battle_check_target(src,target,BCT_ENEMY) <= 0 &&
!battle_check_range(src,target,0))
return 0; // 攻撃対象外
race = battle_get_race(target);

View File

@ -5030,6 +5030,33 @@ int clif_item_repair_list(struct map_session_data *sd)
return 0;
}
/*==========================================
* Weapon Refining [Celest]
*------------------------------------------
*/
int clif_item_refine_list(struct map_session_data *sd)
{
int i,c;
int fd;
nullpo_retr(0, sd);
fd=sd->fd;
WFIFOW(fd,0)=0x177; // temporarily use same packet as clif_item_identify
for(i=c=0;i<MAX_INVENTORY;i++){
if(sd->status.inventory[i].nameid > 0 && itemdb_type(sd->status.inventory[i].nameid)==4){
WFIFOW(fd,c*2+4)=i+2;
c++;
}
}
if(c > 0) {
WFIFOW(fd,2)=c*2+4;
WFIFOSET(fd,WFIFOW(fd,2));
}
return 0;
}
/*==========================================
*
*------------------------------------------

View File

@ -188,6 +188,7 @@ int clif_cart_equiplist(struct map_session_data *sd);
int clif_item_identify_list(struct map_session_data *sd);
int clif_item_identified(struct map_session_data *sd,int idx,int flag);
int clif_item_repair_list(struct map_session_data *sd);
int clif_item_refine_list(struct map_session_data *sd);
int clif_item_skill(struct map_session_data *sd,int skillid,int skilllv,const char *name);

View File

@ -62,16 +62,10 @@ int guild_skill_get_max(int id) { // Modified for new skills [Sara]
// ギルドスキルがあるか確認
int guild_checkskill(struct guild *g,int id)
{
int idx = id-GD_SKILLBASE;
if (idx < 0 || idx >= MAX_GUILDSKILL)
return 0;
return g->skill[idx].lv;
}

View File

@ -1,4 +1,4 @@
// $Id: pc.c 101 2004-11-25 4:02:51 PM Celestia $
// $Id: pc.c 101 2004-11-26 5:47:29 PM Celestia $
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -2733,23 +2733,14 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
break;
case SP_HP_DRAIN_VALUE:
if(!sd->state.lr_flag) {
sd->hp_drain_rate += type2;
sd->hp_drain_value += val;
}
else if(sd->state.lr_flag == 1) {
sd->hp_drain_rate_ += type2;
sd->hp_drain_value_ += val;
}
break;
case SP_SP_DRAIN_RATE:
if(!sd->state.lr_flag) {
@ -2762,21 +2753,13 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
break;
case SP_SP_DRAIN_VALUE:
if(!sd->state.lr_flag) {
sd->sp_drain_rate += type2;
sd->sp_drain_value += val;
}
else if(sd->state.lr_flag == 1) {
sd->sp_drain_rate_ += type2;
sd->sp_drain_value_ += val;
}
break;
@ -3448,9 +3431,10 @@ int pc_item_identify(struct map_session_data *sd,int idx)
nullpo_retr(0, sd);
// Celest
if (sd->skillid == BS_REPAIRWEAPON) {
if (sd->skillid == BS_REPAIRWEAPON)
return pc_item_repair (sd, idx);
}
else if (sd->skillid == WS_WEAPONREFINE)
return pc_item_refine (sd, idx);
if(idx >= 0 && idx < MAX_INVENTORY) {
if(sd->status.inventory[idx].nameid > 0 && sd->status.inventory[idx].identify == 0 ){
@ -3491,6 +3475,81 @@ int pc_item_repair(struct map_session_data *sd,int idx)
return !flag;
}
/*==========================================
* Weapon Refining [Celest]
*------------------------------------------
*/
int pc_item_refine(struct map_session_data *sd,int idx)
{
int flag = 1, i = 0, count = 0, ep = 0, per, refine;
int material[5] = { 0, 1010, 1011, 984, 984 };
nullpo_retr(0, sd);
struct item *item = &sd->status.inventory[idx];
if(idx >= 0 && idx < MAX_INVENTORY) {
if(item->nameid > 0 && itemdb_type(item->nameid)==4) {
// if it's no longer refineable
if (item->refine == 10) {
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
refine = item->refine + sd->skilllv > 10
? 10 - item->refine : sd->skilllv;
for (i=0; i < MAX_INVENTORY; i++)
if(sd->status.inventory[i].nameid == material [itemdb_wlv (item->nameid)])
count += sd->status.inventory[i].amount;
if (count < refine ) {
clif_skill_fail(sd,sd->skillid,0,0);
return 0;
}
per = percentrefinery [itemdb_wlv (item->nameid)][item->refine + refine - 1];
//per += pc_checkskill(sd,BS_WEAPONRESEARCH);
per *= (75 + sd->status.job_level/2)/100;
if (per > rand() % 100) {
flag = 0;
item->refine += refine;
for (i=0; i < MAX_INVENTORY; i++)
if(sd->status.inventory[i].nameid == material [itemdb_wlv (item->nameid)]) {
if (sd->status.inventory[i].amount >= refine) {
pc_delitem(sd,i,refine,0);
break;
} else {
refine -= sd->status.inventory[i].amount;
pc_delitem(sd,i,sd->status.inventory[i].amount,0);
}
}
if(item->equip) {
ep = item->equip;
pc_unequipitem(sd,idx,0, BF_NORMAL);
}
clif_refine(sd->fd,sd,0,idx,item->refine);
clif_delitem(sd,idx,1);
clif_additem(sd,idx,1,0);
if (ep)
pc_equipitem(sd,idx,ep);
clif_misceffect(&sd->bl,3);
}
else {
clif_delitem(sd,i,refine);
item->refine = 0;
if(item->equip)
pc_unequipitem(sd,idx,0, BF_NORMAL);
clif_refine(sd->fd,sd,1,idx,item->refine);
pc_delitem(sd,idx,1,0);
clif_misceffect(&sd->bl,2);
clif_emotion(&sd->bl, 23);
}
}
}
return !flag;
}
/*==========================================
* ƒXƒeƒBƒiŒöŠJ
*------------------------------------------

View File

@ -89,6 +89,7 @@ int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip);
int pc_item_identify(struct map_session_data *sd,int idx);
int pc_item_repair(struct map_session_data *sd,int idx); // [Celest]
int pc_item_refine(struct map_session_data *sd,int idx); // [Celest]
int pc_steal_item(struct map_session_data *sd,struct block_list *bl);
int pc_steal_coin(struct map_session_data *sd,struct block_list *bl);

View File

@ -1,4 +1,4 @@
// $Id: skill.c,v 1.8 2004/11/25 4:02:35 PM Celestia Exp $
// $Id: skill.c,v 1.8 2004/11/26 5:46:59 PM Celestia Exp $
/* ƒXƒLƒ?ŒW */
#include <stdio.h>
@ -3876,27 +3876,43 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
// Full Strip [Celest]
case ST_FULLSTRIP:
{
struct status_change *tsc_data = battle_get_sc_data(bl);
int c=0, i, j;
int striplist[2][4] = { { 0, 0, 0, 0 },
{ 0x0002, 0x0020, 0x0010, 0x0100 } };
if(tsc_data && tsc_data[SC_CP_HELM].timer != -1)
break;
strip_per = 5+2*skilllv+strip_fix/5;
strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
for (i=0; i<4; i++) {
if(tsc_data && tsc_data[SC_CP_WEAPON + i].timer != -1)
break;
if(rand()%100 < strip_per) {
striplist[0][i] = 1;
c++;
}
}
if (c > 0) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 );
for (j=0; j<4 && c > 0; j++) {
if (striplist[0][j]) {
skill_status_change_start(bl,SC_STRIPWEAPON + i,skilllv,0,0,0,strip_time,0 );
if(dstsd){
for(i=0;i<MAX_INVENTORY;i++){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0100){
if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & striplist[1][j]){
pc_unequipitem(dstsd,i,0,BF_SKILL);
--c;
break;
}
}
}
}
}
}
}
break;
@ -4421,7 +4437,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
break;
// Slim Pitcher [Celest]
// Weapon Refining [Celest]
case WS_WEAPONREFINE:
if(sd)
clif_item_refine_list(sd);
break;
// Slim Pitcher
case CR_SLIMPITCHER:
{
if (sd && flag&1) {
@ -4434,6 +4456,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
}
break;
// Full Chemical Protection
case CR_FULLPROTECTION:
{
int i, skilltime;
struct status_change *tsc_data = battle_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skilltime = skill_get_time(skillid,skilllv);
for (i=0; i<4; i++) {
if(tsc_data && tsc_data[SC_STRIPWEAPON + i].timer != -1)
skill_status_change_end(bl, SC_STRIPWEAPON + i, -1 );
skill_status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
}
}
break;
case RG_CLEANER: //AppleGirl
clif_skill_nodamage(src,bl,skillid,skilllv,1);

View File

@ -1,4 +1,4 @@
// $Id: skill.h,v 1.5 2004/09/25 05:32:19 MouseJstr Exp $
// $Id: skill.h,v 1.5 2004/11/26 5:47:12 PM Celestia Exp $
#ifndef _SKILL_H_
#define _SKILL_H_
@ -734,6 +734,7 @@ enum {
WE_CALLPARTNER,
NPC_SELFDESTRUCTION2 = 331,
ITM_TOMAHAWK = 337,
NPC_DARKCROSS = 338,
LK_AURABLADE = 355,
@ -855,13 +856,12 @@ enum {
SL_SKE,
SL_SKA,
// Will assign skill id's later [Celest]
ST_PRESERVE,
ST_PRESERVE = 475,
ST_FULLSTRIP,
WS_WEAPONREFINE,
CR_SLIMPITCHER,
CR_FULLPROTECTION,
ITM_TOMAHAWK,
// moved to common/mmo.h
/* GD_APPROVAL=10000,