summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-11 14:27:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-11 14:27:49 +0000
commit70afc9d7d00b346e3139363abd411a51874ce5b5 (patch)
tree13cc13f914d2fac6cba3ec1601d498d85f96e244 /src/map/skill.c
parentec5dccd7e5e955131af7cc7d0298310a81e9e272 (diff)
downloadhercules-70afc9d7d00b346e3139363abd411a51874ce5b5.tar.gz
hercules-70afc9d7d00b346e3139363abd411a51874ce5b5.tar.bz2
hercules-70afc9d7d00b346e3139363abd411a51874ce5b5.tar.xz
hercules-70afc9d7d00b346e3139363abd411a51874ce5b5.zip
- Summoned and slave mobs won't show up on @showmobs anymore.
- Moved Spider Web damage bonus from battle_calc_damage to battle_attr_fix, so that damage will be doubled based on the actual attack element. - Adjusted autospell cards to trigger only on physical weapon attacks. - Adjusted a bit the heal code, it should now show either the full heal amount, or 0, depending on whether the target was healed at all or not (this also means it shows 0 if you try to heal a full-life character.. but it's the closest I've gotten to make it display 0 on Berserked chars) - Memorize will be consumed even on instant cast spells now. - Berserk will end now if hit and remaining hp is less or equal to 100. - Guild Aura will be removed on sc-load to prevent Guild Masters from getting that bonus from the old implementation. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8705 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index aa5df9d19..92ad67ecd 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1386,8 +1386,11 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
}
//Reports say that autospell effects get triggered on skills and pretty much everything including splash attacks. [Skotlex]
- if(sd && !status_isdead(bl) && src != bl &&
- !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) {
+ //But Gravity Patched this silently, and it now seems to trigger only on
+ //weapon attacks.
+ if(sd && !status_isdead(bl) && src != bl && attack_type&BF_WEAPON
+// !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)
+ ) {
struct block_list *tbl;
struct unit_data *ud;
int i, skilllv;
@@ -3283,14 +3286,18 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
) { //Bounce back heal
if (--tsc->data[SC_KAITE].val2 <= 0)
status_change_end(bl, SC_KAITE, -1);
- if (src == bl) heal=0; //When you try to heal yourself and you are under Kaite, the heal is voided.
- clif_skill_nodamage (src, src, skillid, heal, 1);
- heal_get_jobexp = status_heal(src,heal,0,0);
- } else {
- clif_skill_nodamage (src, bl, skillid, heal, 1);
- heal_get_jobexp = status_heal(bl,heal,0,0);
+ if (src == bl)
+ heal=0; //When you try to heal yourself under Kaite, the heal is voided.
+ else {
+ bl = src;
+ dstsd = sd;
+ }
}
+ heal_get_jobexp = status_heal(bl,heal,0,0);
+ //All or nothing check for LK_BERSERK.
+ clif_skill_nodamage (src, bl, skillid, heal_get_jobexp?heal:0, 1);
+
if(sd && dstsd && heal > 0 && sd != dstsd && battle_config.heal_exp > 0){
heal_get_jobexp = heal_get_jobexp * battle_config.heal_exp / 100;
if (heal_get_jobexp <= 0)
@@ -8524,11 +8531,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
time -= time * (sc->data[SC_SUFFRAGIUM].val1 * 15) / 100;
status_change_end(bl, SC_SUFFRAGIUM, -1);
}
-
- if (time <= 0)
- return 0; //Only Suffragium gets consumed even if time is 0
-
- if (sc->data[SC_MEMORIZE].timer != -1 && time > 0) {
+ if (sc->data[SC_MEMORIZE].timer != -1) {
time>>=1;
if ((--sc->data[SC_MEMORIZE].val2) <= 0)
status_change_end(bl, SC_MEMORIZE, -1);