From: MirceaKitsune Date: Mon, 11 Jul 2011 20:30:22 +0000 (+0300) Subject: Bot AI: Base the decision to team heal around HOW damaged the team mate is. The lower... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=c06800c1e2311fdabdfeac0e9385e1c72936bfe2 Bot AI: Base the decision to team heal around HOW damaged the team mate is. The lower the health of our team mate, the more likely the bot will decide to team heal him --- diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index de5bf6f5..880a74e2 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -196,7 +196,7 @@ set g_balance_vore_swallow_speed 1 "how long it takes to swallow a player" set g_balance_vore_swallow_stealprey 0.7 "probability of stealing someone's prey when eating them (when true their prey joins your stomach rather than popping out). 0 = never, 1 = always" set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates" set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone" -set g_balance_vore_regurgitate_damage 5 "Predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)" +set g_balance_vore_regurgitate_damage 5 "predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)" set g_balance_vore_regurgitate_speedcap 1200 "when a predator is going faster than this, their prey is squeezed out of them" set g_balance_vore_regurgitate_swallowprogress 0.5 "regurgitated prey is given this amount of swallow progress, to simulate being more vulnerable (if slow swallowing is enabled)" set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at this speed, in the direction the predator is facing" diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 69b84245..206d8c6e 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -77,7 +77,8 @@ void Vore_AI_Teamheal(entity prey) { if(time > self.decide_swallow) { - if(skill >= random() * 10) // there are 10 bot skill steps + // base the decision around HOW damaged the team mate is, centered around 100 health + if(skill * (100 / prey.health) >= random() * 10) // there are 10 bot skill steps self.hold_BUTTON_ATCK = TRUE; // swallow the team mate self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow") / self.bot_vorethinkpred; // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE quickly }