stk-code_catmod/data
Alayan-stk-2 8fae521a94 AI item handling improvements (#3143)
* Prepares for advanced item and nitro usage strategy

Replace the bool determining if usage is random or not by an int allowing several levels of AI item usage.

Add NITRO_ADVANCED mode for nitro usage.

* Adapt for more item and nitro levels

The XML files have to be changed. The logic for the item_skill still has to be done.

* Preparation for the preferred kart in GP

* Preparation for the preferred kart in GP

* Preparation for the preferred kart in GP

* Prepares for advanced item and nitro usage strategy

*  Prepares for advanced item usage strategy

* Preparation for the preferred kart in GP

* Parametrized AI_skill level

* Fix typo

* Fix typo

* Fix typo

* Fire items with a shield on in unrestricted mode

* New function allowing AI to know what flyable is incoming

* New function allowing AI to know what flyable is incoming

* Fix typo

* Update bubble gum AI to new system

In addition of making some functionality depends on AI levels, there are a few overall improvements for the better AIs :
1)Remove the "drop the gum in the last lap" logic. Bad strategy since ever the shield has been added to the gum
2)The protection against flyable is not used if the user holds a swatter and the flyable is a plunger 
3)Holding a swatter no longer blocks the AI from using the shield against a flyable nor from using the gum behind
4)The shield is used to remove bad attachments (bomb, parachute, anvil)
5)Reduce the distance with the kart behind when dropping the gum to reduce misses

* Update swatter AI to new system

The swatter could benefit from several kind of usage improvement. This patch introduce only one, but probably the more important : the better AIs now use it to remove bad attachments

* Fixing #3139

* Fix compile error

* Fix

* Fix compilation

* Fix compilation

* Fix compilation

* Update variable

* Update variable

* Fix non-breaking space issue

* Fix typos

* Revert for compilation

* Revert for compilation

* Update cake AI to new system

* Redefine HandleItems to be position aware

* Redefine HandleItems to be position aware

Also changes bowling ball for the new system.

* Activate shield before hitting box or bad item

Meant for higher AIs.

* Increase lookup distance

Some distance will be needed for the switch

* Temporary fix to avoid a nitro regression

* Fix typo

* Fix typo

* Bubble gum improvements ; explicitely calculate distances to items

* Update Switch to the new system ; use item-distance awareness

Also fix a missing parenthesis

* Change nitro-usage to a numerical parameter

* Change nitro-usage to a numerical parameter

Also update comments to explain the new item-skill

* Change nitro-usage to a numerical parameter

* Change nitro-usage to a numerical parameter

* Change nitro-usage to a numerical parameter

* Update handleNitroAndZipper to the new system

Also fix a naming error, remove the 95% speed limitation on nitro usage

* Adds a small engine boost to nitro

Currently, nitro is very counter-intuitive as it only affects max_speed. This change corrects it. The effect remains small to not upset balance. It is mostly felt when below max_speed, so the can of nitro potential power doesn't change much.

* Improve AI nitro handling

Summary :
1)Makes the AI use nitro by bursts, greatly improving its efficiency
2)Makes the AI use nitro when close to max speed (to unlock the max speed increase)
3)Remove the overtaking logic as the AI will now use its nitro anyway
4)The AI tries to keep a reserve of nitro for use towards the end of the race.

* Allows estimated finish time to be checked at any lap, fix a crash

* Makes the AI use its nitro reserves

* Better tuning for nitro reserve usage to reduce the probability of unused nitro

* Remember last used powerup for AI

* Remember last used powerup for AI

* Remember last used powerup for AI

* Remember last used powerup for AI

* Remember last used powerup for AI

* Remember last used powerup for AI

* Fix compilation

* AI don't wait between usage of items of different types

* Use floats for Parachute duration

* Revert

* Nitro use when trying to pass a bomb improved

* Fix broken time check

* Take into account the kart-specific fadeout to calculate time between bursts

* Improvements to bursts and to use of the reserve at the end

* Improve comments explaining item_usage_skill and nitro_usage

* Make LastUsedPowerup a PowerupType

* Make LastUsedPowerup a PowerupType

* Make LastUsedPowerup a PowerupType

* Make LastUsedPowerup a PowerupType

* Make last_used_powerup a PowerupType

* Make last_used_powerup a PowerupType

* Fix compilation

* Fix compilation

* Revert

* Revert

* Finally fix compilation

* Finally fix compilation

* Change shield radius per difficulty

A reduced non-null shield radius reduces false positives as long as it is big enough to get a few frames during which the object is inside the radius.

* Improve Projectile closeness management

* Improve projectileCloseType

* Improve projectileCloseType

* Fixes indentation

* Fix lastUsedPowerup initialization

* Fix the last used powerup type

* Rename projectileCloseType

* Rename projectilCloseType

* Clarify comment and update projectileCloseType to new name

* Reuse a member RandomGenerator

* Fixes getLastUsedPowerup type

* Fixes comparison

* Fixes type
2018-03-31 21:09:57 -04:00
..
challenges Made Old Mine Expert challenge a bit more challenging. 2018-01-29 18:51:43 +01:00
gfx Add different explosion effect for Android. 2017-10-17 23:34:19 +02:00
grandprix Update GPs and challenges for the new farm track replacement 2017-01-13 20:06:41 -05:00
gui More UI scaling improvements, see #3146 2018-03-26 21:24:48 -04:00
po Updates translations with 0.9.3 version from transifex (no author credits updated). 2017-11-15 08:11:51 +11:00
replay Replace broken abyss replay with candela city 2017-10-08 11:16:25 +08:00
shaders Add a shader to use the day/night cycle for lamps, etc 2018-02-27 23:38:28 +01:00
skins Unlimited Split-Screen (#3104) 2018-02-05 20:01:32 -05:00
ttf Auto embolden glyph of bold face, without fallback font 2016-07-21 12:26:19 +08:00
achievements.xml Update achivements.xml, fixes #2940 2017-09-19 18:44:05 -04:00
addons.supertuxkart.net.pem
CREDITS Updated credits to include all doncators and other contributors. 2017-10-26 10:21:32 +11:00
graphical_restrictions.xml Force legacy device for sandy bridge generation celeron graphics cards 2018-01-23 22:40:42 +01:00
items.xml Add SP for correct normal and easier shader system 2017-12-25 14:00:10 +08:00
kart_characteristics.xml Tweaked physics so that wheel raycasts happen from inside the collision shape 2017-09-06 09:06:04 +10:00
localized_name.txt All languages capitalized 2017-11-03 14:00:34 +01:00
optimize_data.sh Strip ICC headers from png files to silence warning 2015-06-05 03:32:26 +02:00
powerup.xml Remove .b3d usage in stk-code 2017-08-21 16:02:06 +08:00
stk_config.xml AI item handling improvements (#3143) 2018-03-31 21:09:57 -04:00
supertuxkart_48.png Minor tweak for linux icon. 2017-07-30 12:56:25 +02:00
supertuxkart_128.png
SuperTuxKart-Info.plist
supertuxkart.appdata.xml Update appdata file to latest standard 2016-08-12 00:48:57 +08:00
supertuxkart.desktop Add danish translation 2017-07-14 00:40:56 +02:00
supertuxkart.git Added a file with a 'unique filename' with version number which is used by STK 2015-07-31 22:06:21 +10:00
supertuxkart.icns