- Made Deluge/volcano/v. gale be castable on top of each other again

- Modified unit_walktoxy and NPC_RUN to enable running even when the caster does not has the MD_CANMOVE bit on.
- PF_MINDBREAKER will now silently fail if you try to use it on someone who already has the status active.
- Cleaned up yet again skill_landprotector, now new cells of Deluge/Volcano/V.Gale will delete previous cells when they are recasted on top of each other.
- Summoned Marine Spheres no longer get the MD_CANMOVE bit.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8039 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-08-01 18:37:16 +00:00
parent 56c9df875c
commit 14b59636c7
7 changed files with 68 additions and 43 deletions

View File

@ -4,6 +4,14 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/01 2006/08/01
* Modified unit_walktoxy and NPC_RUN to enable running even when the caster
does not has the MD_CANMOVE bit on. [Skotlex]
* PF_MINDBREAKER will now silently fail if you try to use it on someone who
already has the status active. [Skotlex]
* Cleaned up yet again skill_landprotector, now new cells of
Deluge/Volcano/V.Gale will delete previous cells when they are recasted on
top of each other. [Skotlex]
* Summoned Marine Spheres no longer get the MD_CANMOVE bit. [Skotlex]
* Cleaned up some more the SC_JAILED code [Skotlex] * Cleaned up some more the SC_JAILED code [Skotlex]
* merged in atcommands jailfor, jailtime, charjailtime. Thanks to Meruru * merged in atcommands jailfor, jailtime, charjailtime. Thanks to Meruru
and Coltaro for the code. [Skotlex] and Coltaro for the code. [Skotlex]

View File

@ -20,6 +20,8 @@
========================= =========================
08/01 08/01
* Made Deluge/volcano/v. gale be castable on top of each other again
[Skotlex]
* Cleaned up some of the db files. [Skotlex] * Cleaned up some of the db files. [Skotlex]
* Fixed name of Freya's Shoes [Playtester] * Fixed name of Freya's Shoes [Playtester]
* Small item update from Haplo [Playtester] * Small item update from Haplo [Playtester]

View File

@ -52,9 +52,9 @@
220,0xb0, , 0, 0, -1,all, 0x002 //RG_GRAFFITI 220,0xb0, , 0, 0, -1,all, 0x002 //RG_GRAFFITI
229,0xb1, , 0, 1,1000,enemy, 0x006 //AM_DEMONSTRATION 229,0xb1, , 0, 1,1000,enemy, 0x006 //AM_DEMONSTRATION
254,0x86, , -1, 0, 400,enemy, 0x000 //CR_GRANDCROSS 254,0x86, , -1, 0, 400,enemy, 0x000 //CR_GRANDCROSS
285,0x9a, , 3, 0, -1,all, 0x002 //SA_VOLCANO 285,0x9a, , 3, 0, -1,all, 0x000 //SA_VOLCANO
286,0x9b, , 3, 0, -1,all, 0x002 //SA_DELUGE 286,0x9b, , 3, 0, -1,all, 0x000 //SA_DELUGE
287,0x9c, , 3, 0, -1,all, 0x002 //SA_VIOLENTGALE 287,0x9c, , 3, 0, -1,all, 0x000 //SA_VIOLENTGALE
288,0x9d,,3:3:4:4:5,0, -1,all, 0x000 //SA_LANDPROTECTOR 288,0x9d,,3:3:4:4:5,0, -1,all, 0x000 //SA_LANDPROTECTOR
306,0x9e, , 4, 0,6000,all, 0x200 //BD_LULLABY 306,0x9e, , 4, 0,6000,all, 0x200 //BD_LULLABY
307,0x9f, , 4, 0, -1,enemy, 0x210 //BD_RICHMANKIM 307,0x9f, , 4, 0, -1,enemy, 0x210 //BD_RICHMANKIM

View File

@ -1670,8 +1670,8 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage)
} }
} }
if(md->special_state.ai==2 && md->master_id == src->id) if(md->special_state.ai==2/* && md->master_id == src->id*/)
{ { //LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex]
md->state.alchemist = 1; md->state.alchemist = 1;
mobskill_use(md, gettick(), MSC_ALCHEMIST); mobskill_use(md, gettick(), MSC_ALCHEMIST);
} }

View File

@ -2180,20 +2180,6 @@ static int skill_check_unit_range_sub (struct block_list *bl, va_list ap)
if(g_skillid != MG_SAFETYWALL && g_skillid != AL_PNEUMA) if(g_skillid != MG_SAFETYWALL && g_skillid != AL_PNEUMA)
return 0; return 0;
break; break;
//Cannot stack among themselves.
case SA_VOLCANO:
case SA_DELUGE:
case SA_VIOLENTGALE:
switch (g_skillid)
{
case SA_VOLCANO:
case SA_DELUGE:
case SA_VIOLENTGALE:
break;
default:
return 0;
}
break;
case AL_WARP: case AL_WARP:
case HT_SKIDTRAP: case HT_SKIDTRAP:
case HT_LANDMINE: case HT_LANDMINE:
@ -4916,8 +4902,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}}; const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}};
int dir = (bl == src)?unit_getdir(src):map_calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. int dir = (bl == src)?unit_getdir(src):map_calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away.
unit_stop_attack(src); unit_stop_attack(src);
//Run skillv tiles. //Run skillv tiles overriding the can-move check.
unit_walktoxy(src, bl->x + skilllv * mask[dir][0], bl->y + skilllv * mask[dir][1], 0); unit_walktoxy(src, bl->x + skilllv * mask[dir][0], bl->y + skilllv * mask[dir][1], 2);
} }
break; break;
@ -5114,6 +5100,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
return 1; return 1;
} }
if (tsc && tsc->data[type].timer != -1)
{ //HelloKitty2 (?) explained that this silently fails when target is
//already inflicted. [Skotlex]
map_freeblock_unlock();
return 1;
}
//Has a 55% + skilllv*5% success chance. //Has a 55% + skilllv*5% success chance.
if (!clif_skill_nodamage(src,bl,skillid,skilllv, if (!clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,55+5*skilllv,skilllv,skill_get_time(skillid,skilllv)))) sc_start(bl,type,55+5*skilllv,skilllv,skill_get_time(skillid,skilllv))))
@ -9282,19 +9275,43 @@ int skill_landprotector (struct block_list *bl, va_list ap)
if (unit == NULL || unit->group == NULL) if (unit == NULL || unit->group == NULL)
return 0; return 0;
if (skillid == SA_LANDPROTECTOR && unit->group->skill_id == SA_LANDPROTECTOR switch (skillid)
&& battle_check_target(bl, src, BCT_ENEMY) > 0) {
{ //Check for offensive Land Protector to delete both. [Skotlex] case SA_LANDPROTECTOR:
(*alive) = 0; if (unit->group->skill_id == SA_LANDPROTECTOR &&
skill_delunit(unit); battle_check_target(bl, src, BCT_ENEMY) > 0)
return 1; { //Check for offensive Land Protector to delete both. [Skotlex]
} (*alive) = 0;
skill_delunit(unit);
if((skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN) && return 1;
skill_get_type(unit->group->skill_id) == BF_MAGIC) }
{ //Delete Magical effects //Delete the rest of types.
skill_delunit(unit); case HW_GANBANTEIN:
return 1; if(skill_get_type(unit->group->skill_id) == BF_MAGIC)
{ //Delete Magical effects
skill_delunit(unit);
return 1;
}
break;
case SA_VOLCANO:
case SA_DELUGE:
case SA_VIOLENTGALE:
switch (unit->group->skill_id)
{ //These override each other.
case SA_VOLCANO:
case SA_DELUGE:
case SA_VIOLENTGALE:
skill_delunit(unit);
return 1;
}
break;
case HP_BASILICA:
if (unit->group->skill_id == HP_BASILICA)
{ //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
(*alive) = 0;
return 1;
}
break;
} }
if (unit->group->skill_id == SA_LANDPROTECTOR && if (unit->group->skill_id == SA_LANDPROTECTOR &&
skill_get_type(skillid) == BF_MAGIC) skill_get_type(skillid) == BF_MAGIC)
@ -9302,11 +9319,7 @@ int skill_landprotector (struct block_list *bl, va_list ap)
(*alive) = 0; (*alive) = 0;
return 1; return 1;
} }
if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA)
{ //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
(*alive) = 0;
return 1;
}
return 0; return 0;
} }

View File

@ -1238,7 +1238,6 @@ int status_calc_mob(struct mob_data* md, int first)
{ // different levels of HP according to skill level { // different levels of HP according to skill level
if (ud->skillid == AM_SPHEREMINE) { if (ud->skillid == AM_SPHEREMINE) {
status->max_hp = 2000 + 400*ud->skilllv; status->max_hp = 2000 + 400*ud->skilllv;
status->mode|= MD_CANMOVE; //Needed for the skill
} else { //AM_CANNIBALIZE } else { //AM_CANNIBALIZE
status->max_hp = 1500 + 200*ud->skilllv + 10*status_get_lv(mbl); status->max_hp = 1500 + 200*ud->skilllv + 10*status_get_lv(mbl);
status->mode|= MD_CANATTACK|MD_AGGRESSIVE; status->mode|= MD_CANATTACK|MD_AGGRESSIVE;

View File

@ -258,6 +258,7 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0; return 0;
} }
//Easy parameter: &1 -> 1/2 = easy/hard, &2 -> ignore MD_CANMOVE check
int unit_walktoxy( struct block_list *bl, int x, int y, int easy) { int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
struct unit_data *ud = NULL; struct unit_data *ud = NULL;
struct status_change *sc = NULL; struct status_change *sc = NULL;
@ -271,11 +272,13 @@ int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
if( ud == NULL) return 0; if( ud == NULL) return 0;
// 移動出来ないユニットは弾く if(!(easy&2) && !status_get_mode(bl)&MD_CANMOVE)
if(!(status_get_mode(bl)&MD_CANMOVE) || !unit_can_move(bl)) return 0;
if (!unit_can_move(bl))
return 0; return 0;
ud->state.walk_easy = easy; ud->state.walk_easy = easy&1;
ud->target = 0; ud->target = 0;
ud->to_x = x; ud->to_x = x;
ud->to_y = y; ud->to_y = y;