#-------------------------------------------------------------------------------
#--------打折技能制作,任意队伍成员习得该技能后即可在商店购买物品时享受折扣
#--------by crow2006 from 66RPG-----------------------------------------------
#--------20160816---------------------------------------------------------------
module RPG
$discount1 = 75 #此处设置打折的百分比 打七五折就填75
class Item
def price
return Integer(@price * $discount1 / 100) if $game_party.discount?
return @price
end
end
class Weapon
def price
return Integer(@price * $discount1 / 100) if $game_party.discount?
return @price
end
end
class Armor
def price
return Integer(@price * $discount1 / 100) if $game_party.discount?
return @price
end
end
end
class Game_Party < Game_Unit
def discount?
$discount2 = 1 #此处设置打折技能的编号
for actor in members
return true if actor.skill_learn?($data_skills[$discount2])
end
return false
end
end