summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/pc.c13
-rw-r--r--src/map/skill.c57
3 files changed, 41 insertions, 30 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 15dec2284..719f535c5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/15
+ * Made an adjustment to addspiritball() to allow Gunslingers to summon up to 10 spheres [reddozen]
* Fixed Tarot Card of Fate using time instead of time2 which is the one
that actually holds the effect duration. [Skotlex]
* Fixed mob random walk interval being set to up to 6K seconds in some
diff --git a/src/map/pc.c b/src/map/pc.c
index 559f18677..b671514ed 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -193,6 +193,8 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) {
if(max > MAX_SKILL_LEVEL)
max = MAX_SKILL_LEVEL;
+ if((sd->class_&MAPID_BASEMASK)==MAPID_GUNSLINGER)
+ max = 10;
if(sd->spiritball < 0)
sd->spiritball = 0;
@@ -623,6 +625,7 @@ int pc_isequip(struct map_session_data *sd,int n)
//Spirit of Super Novice equip bonuses. [Skotlex]
if (sd->status.base_level > 90 && item->equip & 0x301)
return 1; //Can equip all helms
+
if (sd->status.base_level > 96 && item->equip & 0x022 && item->type == 4)
switch(item->look) { //In weapons, the look determines type of weapon.
case 0x01: //Level 4 Knives are equippable.. this means all knives, I'd guess?
@@ -1305,6 +1308,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
else if(sd->state.lr_flag == 1)
sd->left_weapon.atk_ele=val;
else if(sd->state.lr_flag == 2)
+
sd->arrow_ele=val;
break;
case SP_DEFELE:
@@ -2133,6 +2137,7 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
if(sd->state.lr_flag != 2)
pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
break;
+
case SP_AUTOSPELL_WHENHIT:
if(sd->state.lr_flag != 2)
pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
@@ -2245,7 +2250,7 @@ int pc_insert_card(struct map_session_data *sd,int idx_card,int idx_equip)
}
for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){
if( sd->status.inventory[idx_equip].card[i] == 0){
- // 空きスロットがあったので差し?む
+ // 空きスロットが ったので差し?む
sd->status.inventory[idx_equip].card[i]=cardid;
// カ?ドは減らす
@@ -3152,6 +3157,7 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
if(sd->mapindex){
int ip,port;
if(map_mapname2ipport(mapindex,&ip,&port)==0){
+
skill_stop_dancing(&sd->bl);
skill_unit_move(&sd->bl,gettick(),4);
clif_clearchar_area(&sd->bl,clrtype&0xffff);
@@ -3701,6 +3707,7 @@ int pc_movepos(struct map_session_data *sd,int dst_x,int dst_y,int checkpath)
pd->to_x = dst_x;
pd->to_y = dst_y;
if (flag == 2) clif_fixpos(&pd->bl);
+
else clif_slide(&pd->bl,pd->bl.x,pd->bl.y);
}
}
@@ -4565,6 +4572,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
if(!battle_config.multi_level_up && sd->status.job_exp > next-1)
sd->status.job_exp = next-1;
+
sd->status.job_level ++;
clif_updatestatus(sd,SP_JOBLEVEL);
@@ -5163,6 +5171,7 @@ int pc_resetfeel(struct map_session_data* sd)
{
int i;
char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
+
nullpo_retr(0, sd);
for (i=0; i<3; i++)
@@ -5872,6 +5881,7 @@ int pc_heal(struct map_session_data *sd,int hp,int sp)
sp = sd->status.max_sp - sd->status.sp;
sd->status.sp+=sp;
+
if(sd->status.hp <= 0) {
sd->status.hp = 0;
pc_damage(NULL,sd,1);
@@ -6801,6 +6811,7 @@ int pc_cleareventtimer(struct map_session_data *sd)
if (p) aFree(p);
}
+
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 98010dd6f..f0e1b4a14 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1445,7 +1445,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
- rate goes from 0 to 10000 (100.00%)
- flag is a BCT_ flag to indicate which type of adjustment should be used
(BCT_ENEMY/BCT_PARTY/BCT_SELF) are the valid values.
--------------------------------------------------------------------------*/
+--------------------------------------------------------------------------*/
int skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) {
static int where_list[4] = {EQP_WEAPON, EQP_ARMOR, EQP_SHIELD, EQP_HELM};
static int scatk[4] = {SC_STRIPWEAPON, SC_STRIPARMOR, SC_STRIPSHIELD, SC_STRIPHELM };
@@ -1531,7 +1531,7 @@ int skill_break_equip(struct block_list *bl, unsigned short where, int rate, int
If count&0x10000, the direction is to the back of the target, otherwise is away from the src.
If count&0x20000, position update packets must not be sent.
IF count&0X40000, direction is random.
--------------------------------------------------------------------------*/
+--------------------------------------------------------------------------*/
int skill_blown( struct block_list *src, struct block_list *target,int count)
{
int dx=0,dy=0,nx,ny;
@@ -1913,7 +1913,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if ((!tsd->status.skill[skillid].id || tsd->status.skill[skillid].flag >= 13) &&
can_copy(tsd,skillid)) // Split all the check into their own function [Aru]
{
- //?に?んでいるスキルがあれば該?スキルを消す
+ //?に?んでいるスキルが れば該?スキルを消す
if (tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == 13){
tsd->status.skill[tsd->cloneskill_id].id = 0;
tsd->status.skill[tsd->cloneskill_id].lv = 0;
@@ -2110,7 +2110,7 @@ int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
return 0;
}
- // とりあえず?ウ方形のユニットレイアウトのみ対応
+ // とり えず?ウ方形のユニットレイアウトのみ対応
range += layout_type;
return map_foreachinarea(skill_check_unit_range_sub,m,
x-range,y-range,x+range,y+range,BL_SKILL,skillid);
@@ -2159,7 +2159,7 @@ int skill_check_unit_range2(struct block_list *bl, int m,int x,int y,int skillid
ShowError("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
return 0;
}
- // とりあえず?ウ方形のユニットレイアウトのみ対応
+ // とり えず?ウ方形のユニットレイアウトのみ対応
range = skill_get_unit_range(skillid,skilllv) + layout_type;
}
break;
@@ -5063,7 +5063,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_nodamage(src,bl,skillid,gain_hp,1);
}
break;
- case WE_FEMALE: /* あなたの?に??オになります */
+ case WE_FEMALE: /* なたの?に??オになります */
if(sd && dstsd){
int sp_rate=(skilllv <= 0)? 0:skill_db[skillid].sp_rate[skilllv-1];
int gain_sp=dstsd->status.max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
@@ -7351,7 +7351,7 @@ int skill_unit_onlimit(struct skill_unit *src,unsigned int tick)
case UNT_ICEWALL: /* アイスウォ?ル */
clif_changemapcell(src->bl.m,src->bl.x,src->bl.y,src->val2,1);
break;
- case UNT_CALLFAMILY: /* あなたに?いたい */
+ case UNT_CALLFAMILY: /* なたに?いたい */
{
struct map_session_data *sd = NULL;
if(src->val1 && (sd = map_charid2sd(src->val1))
@@ -8118,15 +8118,14 @@ int skill_check_condition(struct map_session_data *sd,int type)
clif_skill_fail(sd,skill,0,0);
return 0;
}
+ zeny = 1;
break;
+
case GS_FLING:
case GS_TRIPLEACTION:
case GS_MAGICALBULLET:
case GS_CRACKER:
- if(sd->spiritball < 1) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
+ spiritball = 1;
if (skill != GS_MAGICALBULLET)
arrow_flag = 1;
if(sd->equip_index[10] < 0) {
@@ -8134,33 +8133,31 @@ int skill_check_condition(struct map_session_data *sd,int type)
return 0;
}
break;
+
case GS_BULLSEYE:
- if(sd->spiritball < 5) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
+ spiritball = 5;
if(sd->equip_index[10] < 0) {
clif_arrow_fail(sd,0);
return 0;
}
break;
+
case GS_MADNESSCANCEL:
- if(sd->spiritball < 4 || sd->sc.data[SC_ADJUSTMENT].timer!=-1) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
+ spiritball = 4;
+ if(sd->spiritball >= 4 && sd->sc.data[SC_ADJUSTMENT].timer!=-1)
+ sd->sc.data[SC_ADJUSTMENT].timer = -1;
break;
+
case GS_ADJUSTMENT:
- if(sd->spiritball < 2 || sd->sc.data[SC_MADNESSCANCEL].timer != -1) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
+ spiritball = 2;
+ if(sd->spiritball >= 2 && sd->sc.data[SC_MADNESSCANCEL].timer != -1)
+ sd->sc.data[SC_MADNESSCANCEL].timer = -1;
+ break;
+
case GS_INCREASING:
- if(sd->spiritball < 2) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
+ spiritball = 2;
break;
+
//Bullets 13200~13202
//Nade 13203~13207
//Shuriken 13250~13254
@@ -8592,7 +8589,7 @@ int skill_use_id (struct map_session_data *sd, int target_id, int skill_num, int
return 0;
}
- //直前のスキルが何か?える必要のあるスキル
+ //直前のスキルが何か?える必要の るスキル
switch (skill_num) {
case SA_CASTCANCEL:
if (sd->skillid != skill_num){ //キャストキャンセル自?は?えない
@@ -8948,6 +8945,7 @@ int skill_castcancel (struct block_list *bl, int type)
return 1;
}
+
/*=========================================
* ブランディッシュスピア ?炎範?決定
*----------------------------------------
@@ -9755,7 +9753,7 @@ int skill_enchant_elemental_end (struct block_list *bl, int type)
return 0;
}
-/* ク??キング??ク?i周りに移動不可能地?があるか?j */
+/* ク??キング??ク?i周りに移動不可能地?が るか?j */
int skill_check_cloaking(struct block_list *bl)
{
struct map_session_data *sd = NULL;
@@ -10748,6 +10746,7 @@ int skill_produce_mix( struct map_session_data *sd, int skill_id,
case AM_PHARMACY:
case AM_TWILIGHT1:
case AM_TWILIGHT2:
+
case AM_TWILIGHT3:
flag = battle_config.produce_potion_name_input;
break;