Jump to content

Can you change zombie damage with a buff?

Recommended Posts

I've tried using <passive_effect name="EntityDamage" operation="perc_set" value="@roll"/>, applied to the zombie, with @roll being 0 or 1. But this does nothing. I only see damage change with .xml files, but I don't want that. I want something like a blind debuff, with x% change for zombie missing the attack. My original logic was this:

	<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="roll" operation="set" value="1"/>
	<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="15"/>
		<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="roll" operation="set" value="0"/>
	<passive_effect name="EntityDamage" operation="perc_set" value="@roll"/>


Edited by calaverinha (see edit history)
Link to comment
Share on other sites

Maybe something like this?


<effect_group name="hit_rating">
	<triggered_effect trigger="onSelfPrimaryActionStart" action="ModifyCVar" target="self" cvar="hit_rating" operation="set" value="randomint(0,100)"/>
	<triggered_effect trigger="onSelfSecondaryActionStart" action="ModifyCVar" target="self" cvar="hit_rating" operation="set" value="randomint(0,100)"/>

<effect_group name="hit_chance">
	<requirement name="CVarCompare" cvar="hit_rating" operation="LTE" value="25"/>
		<passive_effect name="EntityDamage" operation="perc_add" value="-5"/>		



The idea is, only when the entity with the buff begins their attack, their hit_rating will change between 0 and 100.

Then the requirement tag checks if hit_rating is below 25, then sets the EntityDamage to -500% (which should be 0 damage).

Whatever value you set for the requirement will be the % chance of a miss, so in my code, it is a 25% chance to miss.

  - If you want 15%, you'd change the 25 to 15

  - If you want 75%, you'd change the 25 to 75

One issue that comes to mind with my method, is you'll still be getting hit, just with 0 damage taken, this is bad because Im thinking you can still be inflicted with debuffs, like CriticalHitsDebuffs, Bleeding, Concussion, etc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...