]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Bot AI: Base the decision to team heal around HOW damaged the team mate is. The lower...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:30:22 +0000 (23:30 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:30:22 +0000 (23:30 +0300)
data/balanceVT.cfg
data/qcsrc/server/bot/havocbot/vore_ai.qc

index de5bf6f552182e55aa7f92f16b58b2e76ceb81f6..880a74e266841288fe2539b781234ed6c7eabbcd 100644 (file)
@@ -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"\r
 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"\r
 set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone"\r
-set g_balance_vore_regurgitate_damage 5 "Predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)"\r
+set g_balance_vore_regurgitate_damage 5 "predators take this amount of damage whenever regurgitating someone (influenced by player scale difference)"\r
 set g_balance_vore_regurgitate_speedcap 1200 "when a predator is going faster than this, their prey is squeezed out of them"\r
 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)"\r
 set g_balance_vore_regurgitate_force 600 "regurgitated players rocket out at this speed, in the direction the predator is facing"\r
index 69b8424553c307abfdb7c6cfba20bddaadbb9b52..206d8c6e5dfe3d838318dd3e68555fa2a20aea17 100644 (file)
@@ -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
                }