Added updated client effects list.
Corrected some doc/npc typos. Reindented some mob AI code. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13074 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9ffa1e7abb
commit
a9a32d2da8
@ -3,7 +3,7 @@
|
|||||||
//===== By ================================================
|
//===== By ================================================
|
||||||
//= Valaris, Spira, Au{R}oN, Tharis, HiddenDragon
|
//= Valaris, Spira, Au{R}oN, Tharis, HiddenDragon
|
||||||
//===== Version ===========================================
|
//===== Version ===========================================
|
||||||
//= 1.8
|
//= 2.1
|
||||||
//=========================================================
|
//=========================================================
|
||||||
//= 1.0 - Formatted to the standard
|
//= 1.0 - Formatted to the standard
|
||||||
//= 1.1 - New Effects, up to 2007/05/07 Sakexe. [Au{R}oN]
|
//= 1.1 - New Effects, up to 2007/05/07 Sakexe. [Au{R}oN]
|
||||||
@ -14,6 +14,9 @@
|
|||||||
//= 1.6 - New Effects, up to 2008/01/02 Sakexe. [Au{R}oN]
|
//= 1.6 - New Effects, up to 2008/01/02 Sakexe. [Au{R}oN]
|
||||||
//= 1.7 - New Effects, up to 2008/03/26 Sakexe. [Au{R}oN]
|
//= 1.7 - New Effects, up to 2008/03/26 Sakexe. [Au{R}oN]
|
||||||
//= 1.8 - Corrected several effect descriptions. [L0ne_W0lf]
|
//= 1.8 - Corrected several effect descriptions. [L0ne_W0lf]
|
||||||
|
//= 1.9 - New Effects, up to 2008/05/28 Sakexe. [Au{R}oN]
|
||||||
|
//= 2.0 - New Effects, up to 2008/07/15 Sakexe. [Au{R}oN]
|
||||||
|
//= 2.1 - New Effects, up to 2008/08/06a Sakexe. [Au{R}oN]
|
||||||
//===== Description =======================================
|
//===== Description =======================================
|
||||||
//= A list of client-side effects sorted by their ID
|
//= A list of client-side effects sorted by their ID
|
||||||
//=========================================================
|
//=========================================================
|
||||||
@ -722,8 +725,20 @@ number description
|
|||||||
693. Translucent yellow circle
|
693. Translucent yellow circle
|
||||||
694. Translucent green circle
|
694. Translucent green circle
|
||||||
695. Rotating green light
|
695. Rotating green light
|
||||||
696. The same of 690 and 691 but Blue/Purple.
|
696. The same of 690 and 691 but Blue/Purple
|
||||||
697. (Nothing)
|
697. (Nothing)
|
||||||
698. (Nothing)
|
698. (Nothing)
|
||||||
699. Fall of powder from the sky and raise of some leaf.
|
699. Fall of powder from the sky and raise of some leaf
|
||||||
700+. No More Effects From 2008/03/26 Sakexe.
|
700. Big Colored Green Sphere.
|
||||||
|
701. Little Colored Violet Sphere
|
||||||
|
702. Light Infltrarion from and Fall of powder from the sky
|
||||||
|
703. (Nothing)
|
||||||
|
704. (Nothing)
|
||||||
|
705. (Nothing)
|
||||||
|
706. (Nothing)
|
||||||
|
707. Client Crash :P
|
||||||
|
708. A Perfect Copy of Storm Gust Effect (Effect 89)
|
||||||
|
709. A Firework that split in 4 mini fireworks
|
||||||
|
710. A Sphere like Effect 701 but Green, and a bit more larger
|
||||||
|
711. A big violet wall
|
||||||
|
712. No More Effects From 2008/08/06a Sakexe.
|
@ -4887,7 +4887,7 @@ complete the effect.
|
|||||||
|
|
||||||
Changes the display name and/or display class of the target npc.
|
Changes the display name and/or display class of the target npc.
|
||||||
Returns 0 is successful, 1 if the npc does not exist.
|
Returns 0 is successful, 1 if the npc does not exist.
|
||||||
Size is 0 = norma 1 = small 2 = big.
|
Size is 0 = normal 1 = small 2 = big.
|
||||||
|
|
||||||
Since trunk r11779
|
Since trunk r11779
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ prt_in,61,141,2 script Inn Employee#Ahlma 53,{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//======================== Alberta ====================================
|
//======================== Alberta ====================================
|
||||||
alberta_in,32,142,3 script Inn Employee#Moira 53,{
|
alberta_in,32,142,3 script Inn Employee#Jennie 53,{
|
||||||
|
|
||||||
callfunc "F_InnMaid","[Employee Jennie]","'Fisherman Inn'!","alberta_in",26,142;
|
callfunc "F_InnMaid","[Employee Jennie]","'Fisherman Inn'!","alberta_in",26,142;
|
||||||
warp "alberta_in",18,188; end;
|
warp "alberta_in",18,188; end;
|
||||||
|
@ -1481,48 +1481,55 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for target change.
|
// Check for target change.
|
||||||
if (md->attacked_id && mode&MD_CANATTACK)
|
if( md->attacked_id && mode&MD_CANATTACK )
|
||||||
{
|
{
|
||||||
if (md->attacked_id == md->target_id)
|
if( md->attacked_id == md->target_id )
|
||||||
{ //Rude attacked check.
|
{ //Rude attacked check.
|
||||||
if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
|
if( !battle_check_range(&md->bl, tbl, md->status.rhw.range)
|
||||||
( //Can't attack back and can't reach back.
|
&& ( //Can't attack back and can't reach back.
|
||||||
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
|
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB]))
|
||||||
(battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB])) ||
|
|| !mob_can_reach(md, tbl, md->min_chase, MSS_RUSH)
|
||||||
(!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH))
|
)
|
||||||
) &&
|
&& md->state.attacked_count++ >= RUDE_ATTACKED_COUNT
|
||||||
md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
|
&& !mobskill_use(md, tick, MSC_RUDEATTACKED) //If can't rude Attack
|
||||||
!mobskill_use(md, tick, MSC_RUDEATTACKED) && //If can't rude Attack
|
&& can_move && unit_escape(&md->bl, tbl, rand()%10 +1)) //Attempt escape
|
||||||
can_move && unit_escape(&md->bl, tbl, rand()%10 +1)) //Attempt escape
|
|
||||||
{ //Escaped
|
{ //Escaped
|
||||||
md->attacked_id = 0;
|
md->attacked_id = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
if ((abl= map_id2bl(md->attacked_id)) && (!tbl || mob_can_changetarget(md, abl, mode))) {
|
else
|
||||||
if (md->bl.m != abl->m || abl->prev == NULL ||
|
if( (abl= map_id2bl(md->attacked_id)) && (!tbl || mob_can_changetarget(md, abl, mode)) )
|
||||||
(dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE ||
|
{
|
||||||
battle_check_target(&md->bl, abl, BCT_ENEMY) <= 0 ||
|
if (md->bl.m != abl->m || abl->prev == NULL
|
||||||
(battle_config.mob_ai&0x2 && !status_check_skilluse(&md->bl, abl, 0, 0)) || //Retaliate check
|
|| (dist = distance_bl(&md->bl, abl)) >= MAX_MINCHASE
|
||||||
(!battle_check_range(&md->bl, abl, md->status.rhw.range) &&
|
|| battle_check_target(&md->bl, abl, BCT_ENEMY) <= 0
|
||||||
( //Reach check
|
|| (battle_config.mob_ai&0x2 && !status_check_skilluse(&md->bl, abl, 0, 0)) //Retaliate check
|
||||||
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
|
|| (!battle_check_range(&md->bl, abl, md->status.rhw.range)
|
||||||
(battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB])) ||
|
&&
|
||||||
!mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH)
|
( //Reach check
|
||||||
)
|
(!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0 && (battle_config.mob_ai&0x2 || md->sc.data[SC_SPIDERWEB]))
|
||||||
|
|| !mob_can_reach(md, abl, dist+md->db->range3, MSS_RUSH)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
) { //Rude attacked
|
)
|
||||||
if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
|
{ //Rude attacked
|
||||||
!mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move &&
|
if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT
|
||||||
!tbl && unit_escape(&md->bl, abl, rand()%10 +1))
|
&& !mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move
|
||||||
|
&& !tbl && unit_escape(&md->bl, abl, rand()%10 +1))
|
||||||
{ //Escaped.
|
{ //Escaped.
|
||||||
//TODO: Maybe it shouldn't attempt to run if it has another, valid target?
|
//TODO: Maybe it shouldn't attempt to run if it has another, valid target?
|
||||||
md->attacked_id = 0;
|
md->attacked_id = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (!(battle_config.mob_ai&0x2) && !status_check_skilluse(&md->bl, abl, 0, 0)) {
|
}
|
||||||
|
else
|
||||||
|
if (!(battle_config.mob_ai&0x2) && !status_check_skilluse(&md->bl, abl, 0, 0))
|
||||||
|
{
|
||||||
//Can't attack back, but didn't invoke a rude attacked skill...
|
//Can't attack back, but didn't invoke a rude attacked skill...
|
||||||
} else { //Attackable
|
}
|
||||||
|
else
|
||||||
|
{ //Attackable
|
||||||
if (!tbl || dist < md->status.rhw.range || !check_distance_bl(&md->bl, tbl, dist)
|
if (!tbl || dist < md->status.rhw.range || !check_distance_bl(&md->bl, tbl, dist)
|
||||||
|| battle_gettarget(tbl) != md->bl.id)
|
|| battle_gettarget(tbl) != md->bl.id)
|
||||||
{ //Change if the new target is closer than the actual one
|
{ //Change if the new target is closer than the actual one
|
||||||
@ -1537,6 +1544,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Clear it since it's been checked for already.
|
//Clear it since it's been checked for already.
|
||||||
md->attacked_id = 0;
|
md->attacked_id = 0;
|
||||||
}
|
}
|
||||||
@ -1549,20 +1557,18 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
|
|||||||
if (!tbl && mode&MD_LOOTER && md->lootitem && DIFF_TICK(tick, md->ud.canact_tick) > 0 &&
|
if (!tbl && mode&MD_LOOTER && md->lootitem && DIFF_TICK(tick, md->ud.canact_tick) > 0 &&
|
||||||
(md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1))
|
(md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1))
|
||||||
{ // Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
|
{ // Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
|
||||||
map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl,
|
map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl, view_range, BL_ITEM, md, &tbl);
|
||||||
view_range, BL_ITEM, md, &tbl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW)
|
if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW)
|
||||||
{
|
{
|
||||||
map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl,
|
map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl, view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl);
|
||||||
view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl);
|
}
|
||||||
} else
|
else
|
||||||
if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW))
|
if (mode&MD_CHANGECHASE && (md->state.skillstate == MSS_RUSH || md->state.skillstate == MSS_FOLLOW))
|
||||||
{
|
{
|
||||||
search_size = view_range<md->status.rhw.range ? view_range:md->status.rhw.range;
|
search_size = view_range<md->status.rhw.range ? view_range:md->status.rhw.range;
|
||||||
map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl,
|
map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl, search_size, DEFAULT_ENEMY_TYPE(md), md, &tbl);
|
||||||
search_size, DEFAULT_ENEMY_TYPE(md), md, &tbl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tbl) { //No targets available.
|
if (!tbl) { //No targets available.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user