diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-02-09 02:58:34 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-02-09 02:58:34 +0000 |
commit | 6a3573e5f5bf52330b278dd0736112bf7f6f8938 (patch) | |
tree | cff3d1c4004e3a6a8aa9556f1cecd5953bf6ed16 /src/map/battle.c | |
parent | 3d56a0bf4a4ac9da69eac47560b18e2f770d2747 (diff) | |
download | hercules-6a3573e5f5bf52330b278dd0736112bf7f6f8938.tar.gz hercules-6a3573e5f5bf52330b278dd0736112bf7f6f8938.tar.bz2 hercules-6a3573e5f5bf52330b278dd0736112bf7f6f8938.tar.xz hercules-6a3573e5f5bf52330b278dd0736112bf7f6f8938.zip |
Added renewal behavior to safety wall (exclusive to remode)
- Safety Wall now possesses a lifetime equal to 3 times the health of the caster, when the wall absorbs this much damage, the wall is removed and any remaining damage is dealt to the player.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15554 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index efcf199aa..6cf116db4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -386,10 +386,23 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag { struct skill_unit_group* group = skill_id2group(sc->data[SC_SAFETYWALL]->val3); if (group) { + /** + * in RE, SW possesses a lifetime equal to 3 times the caster's health + **/ + #if REMODE + if ( ( group->val2 - damage) > 0 ) { + group->val2 -= damage; + d->dmg_lv = ATK_BLOCK; + return 0; + } else + damage -= group->val2; + skill_delunitgroup(group); + #else if (--group->val2<=0) skill_delunitgroup(group); d->dmg_lv = ATK_BLOCK; return 0; + #endif } status_change_end(bl, SC_SAFETYWALL, INVALID_TIMER); } |