|
@@ -52,6 +52,7 @@ local LimitPerpleHeroLogic = require("present.LimitPerpleHeroLogic")
|
|
|
local HeroComeLogic = require("absAct.HeroComeLogic")
|
|
local HeroComeLogic = require("absAct.HeroComeLogic")
|
|
|
local NewHeroLogic = require("absAct.NewHeroLogic")
|
|
local NewHeroLogic = require("absAct.NewHeroLogic")
|
|
|
Json = Json or require("common.Json")
|
|
Json = Json or require("common.Json")
|
|
|
|
|
+local TalismanLogic = require("talisman.TalismanLogic")
|
|
|
|
|
|
|
|
DRAWCARD_ID0 = 0 -- 积分召唤
|
|
DRAWCARD_ID0 = 0 -- 积分召唤
|
|
|
DRAWCARD_ID1 = 1 -- 基础召唤
|
|
DRAWCARD_ID1 = 1 -- 基础召唤
|
|
@@ -77,6 +78,18 @@ MAX_JIFEN = 3000
|
|
|
DRAWCARD_40 = 40 -- 40连抽,必得SSR
|
|
DRAWCARD_40 = 40 -- 40连抽,必得SSR
|
|
|
DRAWCARD_100 = 100 -- 新英雄抽卡活动期间100抽必得
|
|
DRAWCARD_100 = 100 -- 新英雄抽卡活动期间100抽必得
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+local function getTalismanAdd(human)
|
|
|
|
|
+ local jyzh_lottery10 = TalismanLogic.getTalismanAdd(human, TalismanLogic.OTHER_EFFECT_TBL.JYZH_LOTTERY10) or 0
|
|
|
|
|
+ if jyzh_lottery10 <= 0 then
|
|
|
|
|
+ jyzh_lottery10 = 100
|
|
|
|
|
+ end
|
|
|
|
|
+ jyzh_lottery10 = jyzh_lottery10 / 100
|
|
|
|
|
+ return jyzh_lottery10
|
|
|
|
|
+end
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
-- 积分
|
|
-- 积分
|
|
|
function getJifen(human)
|
|
function getJifen(human)
|
|
|
return human.db.drawCard.jifen
|
|
return human.db.drawCard.jifen
|
|
@@ -252,8 +265,8 @@ function fontDrawCardNet(net, id, human)
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
if config.item2[1] and config.item2[2] then
|
|
if config.item2[1] and config.item2[2] then
|
|
|
- net.items[0] = net.items[0] + 1
|
|
|
|
|
- Grid.makeItem(net.items[net.items[0]], config.item2[1], math.floor(config.item2[2] * vipArg / 100 ) )
|
|
|
|
|
|
|
+ net.items[0] = net.items[0] + 1
|
|
|
|
|
+ Grid.makeItem(net.items[net.items[0]], config.item2[1], math.floor(config.item2[2] * vipArg / 100 ) )
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
vipArg = 0
|
|
vipArg = 0
|
|
@@ -264,6 +277,14 @@ function fontDrawCardNet(net, id, human)
|
|
|
net.zuanshi[0] = 2
|
|
net.zuanshi[0] = 2
|
|
|
net.zuanshi[1] = config.zuanshi1
|
|
net.zuanshi[1] = config.zuanshi1
|
|
|
net.zuanshi[2] = config.zuanshi2 + vipArg
|
|
net.zuanshi[2] = config.zuanshi2 + vipArg
|
|
|
|
|
+ net.jyzhLottery10Dis = 100
|
|
|
|
|
+
|
|
|
|
|
+ if id == DRAWCARD_ID8 then
|
|
|
|
|
+ --秘宝对精英召唤10连的增益
|
|
|
|
|
+ local talisman_jyzh_lotter10 = getTalismanAdd(human)
|
|
|
|
|
+ net.jyzhLottery10Dis = talisman_jyzh_lotter10 * 100 --转成整数
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
net.isFirst = (getDraw2Cnt(human, id) < 1) and 1 or 0
|
|
net.isFirst = (getDraw2Cnt(human, id) < 1) and 1 or 0
|
|
|
net.canBuy = ItemExcel.buy[config.item1[1]] and 1 or 0
|
|
net.canBuy = ItemExcel.buy[config.item1[1]] and 1 or 0
|
|
|
end
|
|
end
|
|
@@ -355,6 +376,19 @@ function checkUseItem(human, id, op, config,isAct)
|
|
|
|
|
|
|
|
local itemID = item[1]
|
|
local itemID = item[1]
|
|
|
local itemCnt = item[2]
|
|
local itemCnt = item[2]
|
|
|
|
|
+ local finalItemCnt = itemCnt
|
|
|
|
|
+
|
|
|
|
|
+ --精英召唤10连抽的处理
|
|
|
|
|
+ if id == DRAWCARD_ID8 and op == DRAWCARD_OP_2 then
|
|
|
|
|
+ --秘宝对精英召唤10连的增益
|
|
|
|
|
+ local talisman_jyzh_lotter10 = getTalismanAdd(human)
|
|
|
|
|
+ finalItemCnt = math.floor(finalItemCnt * talisman_jyzh_lotter10)
|
|
|
|
|
+
|
|
|
|
|
+ if zuanshi and zuanshi > 0 then
|
|
|
|
|
+ zuanshi = math.floor(zuanshi * talisman_jyzh_lotter10)
|
|
|
|
|
+ end
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 then
|
|
if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 then
|
|
|
local vipArg = 100
|
|
local vipArg = 100
|
|
@@ -362,7 +396,7 @@ function checkUseItem(human, id, op, config,isAct)
|
|
|
print(" checkUseItem vipArg ", vipArg, " , old : " ,itemCnt , " , new : ", math.floor(itemCnt * vipArg / 100 ) )
|
|
print(" checkUseItem vipArg ", vipArg, " , old : " ,itemCnt , " , new : ", math.floor(itemCnt * vipArg / 100 ) )
|
|
|
itemCnt = math.floor(itemCnt * vipArg / 100 )
|
|
itemCnt = math.floor(itemCnt * vipArg / 100 )
|
|
|
end
|
|
end
|
|
|
- print(" checkUseItem itemID itemCnt ", itemID, itemCnt)
|
|
|
|
|
|
|
+ print(" checkUseItem itemID itemCnt ", itemID, finalItemCnt)
|
|
|
-- 活动只扣道具
|
|
-- 活动只扣道具
|
|
|
if isAct == AbsActDefine.ABS_ACT_TYPE_4 then
|
|
if isAct == AbsActDefine.ABS_ACT_TYPE_4 then
|
|
|
local state,id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_4)
|
|
local state,id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_4)
|
|
@@ -411,8 +445,8 @@ function checkUseItem(human, id, op, config,isAct)
|
|
|
if isFree(human, id, op) then -- 免费
|
|
if isFree(human, id, op) then -- 免费
|
|
|
setUseFree(human, id)
|
|
setUseFree(human, id)
|
|
|
return true
|
|
return true
|
|
|
- elseif BagLogic.getItemCnt(human, itemID) >= itemCnt then -- 扣道具
|
|
|
|
|
- BagLogic.delItem(human, itemID, itemCnt, "draw_card")
|
|
|
|
|
|
|
+ elseif BagLogic.getItemCnt(human, itemID) >= finalItemCnt then -- 扣道具
|
|
|
|
|
+ BagLogic.delItem(human, itemID, finalItemCnt, "draw_card")
|
|
|
return true
|
|
return true
|
|
|
elseif zuanshi > 0 then -- 扣钻石
|
|
elseif zuanshi > 0 then -- 扣钻石
|
|
|
-- 抵扣道具
|
|
-- 抵扣道具
|