From: MirceaKitsune Date: Thu, 7 Jul 2011 11:35:25 +0000 (+0300) Subject: Add distributed digestion. When enabled, digestion damage is divided by the number... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=8a8d844c4ce2051264fe2ff69859bad77b1b642a Add distributed digestion. When enabled, digestion damage is divided by the number of prey in your belly (enabled by default). --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index c7d5f57e..2c559e0a 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -199,6 +199,7 @@ set g_balance_vore_action_delay 1 "how many seconds must pass before you can swa set g_balance_vore_digestion_damage 5 "amount of damage applied to victims during digestion" set g_balance_vore_digestion_vampire 1 "amount of health you gain from digestion" set g_balance_vore_digestion_vampire_stable 150 "maximum amount of health you can gain from digestion (best kept equal or less than g_balance_health_rotstable)" +set g_balance_vore_digestion_distribute 1 "if enabled, digestion is reduced by the amount of prey you have. eg: having 2 prey will reduce digestion strength by 2" set g_balance_vore_teamheal 1 "when enabled, having a team mate in your stomach will keep healing them by this amount" set g_balance_vore_teamheal_stable 150 "maximum amount of health you can gain from a teamheal (best kept equal or less than g_balance_health_rotstable)" set g_balance_vore_weight_gravity 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier" diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index a9a615e2..388c799a 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -371,9 +371,16 @@ void Vore_Digest() if(time > self.digestion_step) { - Damage(self, self.predator, self.predator, cvar("g_balance_vore_digestion_damage"), DEATH_DIGESTION, self.origin, '0 0 0'); + // if distributed digestion is enabled, reduce digestion strength by the number of prey in our stomach + float reduce; + if(cvar("g_balance_vore_digestion_distribute")) + reduce = self.predator.stomach_load; + else + reduce = 1; + + Damage(self, self.predator, self.predator, cvar("g_balance_vore_digestion_damage") / reduce, DEATH_DIGESTION, self.origin, '0 0 0'); if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable")) - self.predator.health += cvar("g_balance_vore_digestion_vampire"); + self.predator.health += cvar("g_balance_vore_digestion_vampire") / reduce; if (self.predator.digestsound_finished < time) {