=begin
# ============================================================================ #
# Secret Hunt System
# **Author: SoulPour777
# Web URL: infinitytears.wordpress.com
# ============================================================================ #

Description: When a killing blow is used, a secret item is gained.
Note: This is a script request by: Gleason of rpgmakervxace.net

Original Thread:
http://www.rpgmakervxace.net/topic/21621-looking-for-a-secret-hunt-type-script-ive-seen-before/

Instructions:

Place a note tag on your skill:
<killingblow>

for all killing blows. When this killing blow is applied, then you can gain
a secret item.

Terms of Use:
You are free to use the script on any non-commercial projects.
You are free to adapt the script. Any modifications are allowed as long as it is provided as a note on the script.
Credits to SoulPour777 for the script.
Preserve the Script Header.
Claiming the script as your own is prohibited.
=end

module SecretItems
SI = #item id of all secret items
SI_VALUE = 1 #value of secret items or number
end


class Game_Battler < Game_BattlerBase
include SecretItems
def use_item(item)
random_secret_item = rand(6)
pay_skill_cost(item) if item.is_a?(RPG::Skill)
if item.is_a?(RPG::Skill)
if $data_skills.note =~ /<killingblow>/i
$game_party.gain_item($data_items[SI], SI_VALUE)
end
end
end
end