summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 14:38:23 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-07 14:38:23 +0000
commit71f8d31bc902a66649bf467264196444be93950e (patch)
treeb9e551c51c7e2d95ae5c6df4c2f0416ea7662edf /src/map/skill.c
parent9cd710dada5378af7fde118f5239c0ecda7c4c26 (diff)
downloadhercules-71f8d31bc902a66649bf467264196444be93950e.tar.gz
hercules-71f8d31bc902a66649bf467264196444be93950e.tar.bz2
hercules-71f8d31bc902a66649bf467264196444be93950e.tar.xz
hercules-71f8d31bc902a66649bf467264196444be93950e.zip
- Adjusted Battle_check_target so that alchemist summoned mobs are targetted by everyone as long as 1. The top-level master is a player and 2. the actual attacker is not a mob-type.
- Added config force_random_spawn which overrides the spawn-files defined coordinates to make all mobs always spawn randomly on the map. - SC_SPEEDUP0 is no longer dispellable by SA_DISPEL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8159 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6e9d5c9ff..2cd3ff4e6 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4438,14 +4438,24 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
int strip_fix, equip = 0;
int sclist[4] = {0,0,0,0};
- if (skillid == RG_STRIPWEAPON || skillid == ST_FULLSTRIP || skillid == GS_DISARM)
- equip |= EQP_WEAPON;
- if (skillid == RG_STRIPSHIELD || skillid == ST_FULLSTRIP)
- equip |= EQP_SHIELD;
- if (skillid == RG_STRIPARMOR || skillid == ST_FULLSTRIP)
- equip |= EQP_ARMOR;
- if (skillid == RG_STRIPHELM || skillid == ST_FULLSTRIP)
- equip |= EQP_HELM;
+ switch (skillid) {
+ case RG_STRIPWEAPON:
+ case GS_DISARM:
+ equip = EQP_WEAPON;
+ break;
+ case RG_STRIPSHIELD:
+ equip = EQP_SHIELD;
+ break;
+ case RG_STRIPARMOR:
+ equip = EQP_ARMOR;
+ break;
+ case RG_STRIPHELM:
+ equip = EQP_HELM;
+ break;
+ case ST_FULLSTRIP:
+ equip = EQP_WEAPON|EQP_SHIELD|EQP_ARMOR|EQP_HELM;
+ break;
+ }
strip_fix = sstatus->dex - tstatus->dex;
if(strip_fix < 0)
@@ -4462,7 +4472,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
continue;
switch (i) {
case EQI_HAND_L: //Shield / left-hand weapon
- if(dstsd->inventory_data[dstsd->equip_index[EQI_HAND_L]]->type == IT_ARMOR)
+ if(dstsd->inventory_data[dstsd->equip_index[i]]->type == IT_ARMOR)
{ //Shield
if (equip&EQP_SHIELD &&
!(dstsd->unstripable_equip&EQP_SHIELD) &&
@@ -4475,7 +4485,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
//Continue to weapon
case EQI_HAND_R:
- if (equip &EQP_WEAPON &&
+ if (equip&EQP_WEAPON &&
!(dstsd->unstripable_equip&EQP_WEAPON) &&
!(tsc && tsc->data[SC_CP_WEAPON].timer != -1)
) {
@@ -4663,7 +4673,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|| i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR || i==SC_CP_HELM
|| i==SC_COMBO || i==SC_DANCING || i==SC_GUILDAURA || i==SC_EDP
|| i==SC_AUTOBERSERK || i==SC_CARTBOOST || i==SC_MELTDOWN || i==SC_MOONLIT
- || i==SC_SAFETYWALL || i==SC_SMA
+ || i==SC_SAFETYWALL || i==SC_SMA || i==SC_SPEEDUP0
)
continue;
if(i==SC_BERSERK) tsc->data[i].val2=0; //Mark a dispelled berserk to avoid setting hp to 100 by setting hp penalty to 0.