From: MirceaKitsune Date: Sat, 19 Nov 2011 20:30:51 +0000 (+0200) Subject: Allow distributed digestion to be tweaked. Hopefully done properly X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=12fb3835a0bec5f13b0eb1c46e7063d493452887;p=voretournament%2Fvoretournament.git Allow distributed digestion to be tweaked. Hopefully done properly --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index 55d1f071..fc4fce28 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -224,7 +224,7 @@ set g_balance_vore_digestion_limit_regurgitate 1 "the predator automatically reg set g_balance_vore_digestion_limit_blockrespawn 1 "dead prey cannot respawn if it's still being digested" set g_balance_vore_digestion_vampire 0.15 "amount of health you gain from digestion off the damage you deal" 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_digestion_distribute 0.1 "if enabled, digestion is reduced by the amount of stomach load you have by this amount" set g_balance_vore_digestion_scalediff 0.5 "if enabled, digestion damage is affected by the size of the predator compared to the size of the prey by this amount" 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)" diff --git a/data/qcsrc/server/t_items.qc b/data/qcsrc/server/t_items.qc index 4ec0ed2a..2e6a3f7a 100644 --- a/data/qcsrc/server/t_items.qc +++ b/data/qcsrc/server/t_items.qc @@ -256,8 +256,7 @@ void Item_Consumable_Think() damage_offset = 1; if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage - damage_offset *= self.predator.stomach_load / self.predator.stomach_maxload; - damage_offset = ceil(damage_offset); + damage_offset *= (self.predator.stomach_load / self.predator.stomach_maxload) / cvar("g_balance_vore_digestion_distribute"); damage = cvar("g_balance_vore_digestion_damage_item") / damage_offset; self.health -= damage; diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 300dfc73..6c07ac13 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -459,10 +459,9 @@ void Vore_Digest() damage_offset = 1; if(cvar("g_balance_vore_digestion_distribute")) // apply distributed digestion damage - damage_offset *= self.predator.stomach_load / self.predator.stomach_maxload; + damage_offset *= (self.predator.stomach_load / self.predator.stomach_maxload) / cvar("g_balance_vore_digestion_distribute"); if(cvar("g_healthsize") && cvar("g_balance_vore_digestion_scalediff")) // apply player scale to digestion damage damage_offset *= pow(self.scale / self.predator.scale, cvar("g_balance_vore_digestion_scalediff")); - damage_offset = ceil(damage_offset); damage = cvar("g_balance_vore_digestion_damage") / damage_offset; if(cvar("g_balance_vore_digestion_damage_death") && self.deadflag != DEAD_NO) // amplify digestion damage for dead prey