Absorbed Damage - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Absorbed Damage (/Thread-Absorbed-Damage) |
Absorbed Damage - EOSCPM - 04-21-2015 03:29 PM Hi, How can i control absorbed damage ? When a player hit to another player this attack really dealt damage ?. i used @Hit trigger but it just giving me amount of damage. May another player absorb all damage but i can' learn. Thank you. RE: Absorbed Damage - Extreme - 04-21-2015 03:49 PM Try @GetHit RE: Absorbed Damage - EOSCPM - 04-21-2015 03:53 PM I know, but i have an event and i need the get value when i hit, not when i hitted. RE: Absorbed Damage - Coruja - 04-22-2015 10:28 AM damage always have 2 parts: damage before resist (@Hit) and damage after resist (@GetHit) so the damage before resist is handled by @Hit, which does all damage calculations and then the attacker will hit the target with this damage value (already calculated) and now @GetHit is called to apply resist calculations RE: Absorbed Damage - Extreme - 04-22-2015 10:31 PM Basicaly is: @Hit - Calculate the raw damage to apply on enemy. @GetHit - Receive the raw damage of @Hit and calculate the damage to absorb. Example: Code: ON=@HIT RE: Absorbed Damage - UltimaAku - 04-27-2015 03:56 AM I don't quite know what your after. Are you after a weapon that sometimes guarantees 0 damage? [EVENTS e_nodmg] ON=@HIT VAR.RAND=<EVAL {1 100}> IF (<VAR.RAND><=20) //20% chance of happening SYSMESSAGE Your attack just bounced off RETURN 1 ELSE RETURN 0 ENDIF then add this to a weapon ON=@EQUIP SRC.EVENTS=+e_nodmg ON=@UNEQUIP SRC.EVENTS=-e_nodmg If you want to control the damage dealt (e.g. make it do half damage against players and full damage on npcs) then try this: [EVENTS e_pvpdrop] ON=@HIT IF (<SRC.BRAIN>=0) //It's a human ARGN1=(<ARGN1>/2) //Reduces the damage dealt by half against players ELSE RETURN 0 //everything else receives full damage ENDIF then apply that to an @equip ON=@EQUIP SRC.EVENTS=+e_pvpdrop ON=@UNEQUIP SRC.EVENTS=-e_pvpdrop Personally, I don't see a point on making this player-related. Armour and resistances does it for you already. It's a neat idea if you was making "bane" weapons that deal extra damage against certain mobs (e.g. orc bane doubles damage against orcs). |