Add distributed digestion. When enabled, digestion damage is divided by the number...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 11:35:25 +0000 (14:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 11:35:25 +0000 (14:35 +0300)
data/balanceVT.cfg
data/qcsrc/server/vore.qc

index c7d5f57..2c559e0 100644 (file)
@@ -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"\r
 set g_balance_vore_digestion_vampire 1 "amount of health you gain from digestion"\r
 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)"\r
+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"\r
 set g_balance_vore_teamheal 1 "when enabled, having a team mate in your stomach will keep healing them by this amount"\r
 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)"\r
 set g_balance_vore_weight_gravity 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier"\r
index a9a615e..388c799 100644 (file)
@@ -371,9 +371,16 @@ void Vore_Digest()
 \r
        if(time > self.digestion_step)\r
        {\r
-               Damage(self, self.predator, self.predator, cvar("g_balance_vore_digestion_damage"), DEATH_DIGESTION, self.origin, '0 0 0');\r
+               // if distributed digestion is enabled, reduce digestion strength by the number of prey in our stomach\r
+               float reduce;\r
+               if(cvar("g_balance_vore_digestion_distribute"))\r
+                       reduce = self.predator.stomach_load;\r
+               else\r
+                       reduce = 1;\r
+\r
+               Damage(self, self.predator, self.predator, cvar("g_balance_vore_digestion_damage") / reduce, DEATH_DIGESTION, self.origin, '0 0 0');\r
                if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable"))\r
-                       self.predator.health += cvar("g_balance_vore_digestion_vampire");\r
+                       self.predator.health += cvar("g_balance_vore_digestion_vampire") / reduce;\r
 \r
                if (self.predator.digestsound_finished < time)\r
                {\r